Difference between revisions of "Documentation:Modules/alphamask"

From VideoLAN Wiki
Jump to navigation Jump to search
m
m
Line 3: Line 3:
 
This filter can be used in the mosaic framework to set a video's alpha channel (or transparency) based on a PNG image's alpha channel. You can thus blend only parts of the mosaic substream on the background.
 
This filter can be used in the mosaic framework to set a video's alpha channel (or transparency) based on a PNG image's alpha channel. You can thus blend only parts of the mosaic substream on the background.
  
 +
== Options ==
 
{{Option
 
{{Option
 
|name=alphamask-mask
 
|name=alphamask-mask
Line 10: Line 11:
 
}}
 
}}
  
Example use:
+
== Example ==
 
  % '''vlc -I telnet --color -vvv --vlm-conf mosaic.vlm --mosaic-keep-picture \'''
 
  % '''vlc -I telnet --color -vvv --vlm-conf mosaic.vlm --mosaic-keep-picture \'''
 
   '''--fake-file ~/images/mire.jpg --fake-width 360 --fake-height 270 \'''
 
   '''--fake-file ~/images/mire.jpg --fake-width 360 --fake-height 270 \'''
Line 29: Line 30:
 
The files used are available on http://people.videolan.org/~dionoea/mosaic/ if you want to test. (This will blend the redefined nintendo video in a cone like region)
 
The files used are available on http://people.videolan.org/~dionoea/mosaic/ if you want to test. (This will blend the redefined nintendo video in a cone like region)
  
See also:
+
== See also ==
 
* [[Documentation:Modules/mosaic]]
 
* [[Documentation:Modules/mosaic]]
 
* [[Documentation:Modules/mosaic-bridge]]
 
* [[Documentation:Modules/mosaic-bridge]]

Revision as of 13:05, 22 January 2008

Module: alphamask
Type Video filter
First VLC version 0.9.0
Last VLC version -
Operating system(s) all
Description change the video's alpha channel
Shortcut(s) -

This filter can be used in the mosaic framework to set a video's alpha channel (or transparency) based on a PNG image's alpha channel. You can thus blend only parts of the mosaic substream on the background.

Options

  • alphamask-mask <string> : PNG file to use as a mask. The alpha channel only will be used to build the mask. This image needs to have the same size as the video it will be used with.

Example

% vlc -I telnet --color -vvv --vlm-conf mosaic.vlm --mosaic-keep-picture \
  --fake-file ~/images/mire.jpg --fake-width 360 --fake-height 270 \
  --no-audio --sub-filter mosaic

And the vlm config:

new channel0 broadcast enabled
setup channel0 input redefined-nintendo.mpg
setup channel0 output #duplicate{dst=mosaic-bridge{height=270,width=360,chroma=YUVA,vfilter=alphamask{mask=cone_360x270.png}},select=video}
 
new background broadcast enabled
setup background input fake:
control background play
 
control channel0 play

The files used are available on http://people.videolan.org/~dionoea/mosaic/ if you want to test. (This will blend the redefined nintendo video in a cone like region)

See also