Difference between revisions of "Documentation:Modules/mosaic"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Remove line breaks between options)
(Insert verbose descriptions, copy-edit, add table explaining alignment)
Line 1: Line 1:
{{Module|name=mosaic|type=Video subfilter|first_version=0.8.2|description=blend sub-videos on a video}}
+
{{Module|name=mosaic|type=Video subfilter|first_version=0.8.2|description=Mosaic video sub source}}
  
Use this filter to blend videos on top of another video. This can be used to create TV channels mosaics, setup a weather channel like stream (with the [[Documentation:Modules/bluescreen|bluescreen]] video filter) and lots of other fun stuff.
+
Use this filter to blend videos on top of another video. This can be used to create TV channels mosaics, setup a weather channel-like stream (with the {{docmod|bluescreen}} video filter) and lots of other fun stuff.
  
Since VLC 0.8.6, you can also use the [[Documentation:Modules/http_intf|HTTP interface]]'s mosaic wizard to configure a mosaic easily.
+
Since VLC 0.8.6, you can also use the [[Documentation:Modules/http intf|HTTP interface]]'s mosaic wizard to configure a mosaic easily.
  
 
== Options ==
 
== Options ==
Line 9: Line 9:
 
|name=mosaic-alpha
 
|name=mosaic-alpha
 
|value=integer
 
|value=integer
 +
|min=0
 +
|max=255
 
|default=255
 
|default=255
|description=Global alpha blending level. 0 means fully transparent, 255 means fully opaque (0 to 255)
+
|description=Alpha blending (transparency) of the mosaic foreground pictures. 0 means transparent, 255 opaque.
 
}}
 
}}
 
{{Option
 
{{Option
Line 16: Line 18:
 
|value=integer
 
|value=integer
 
|default=100
 
|default=100
|description=The mosaic's height
+
|description=Total height of the mosaic, in pixels.
 
}}
 
}}
 
{{Option
 
{{Option
Line 22: Line 24:
 
|value=integer
 
|value=integer
 
|default=100
 
|default=100
|description=The mosaic's width
+
|description=Total width of the mosaic, in pixels.
 
}}
 
}}
 
{{Option
 
{{Option
|name=mosaic-align
+
|name=mosaic-align<span id="select_mosaic-align"></span>
 
|value=integer
 
|value=integer
 +
|select=[[#appendix_select_mosaic-align|{ 0, 1, 2, 4, 8, 5, 6, 9, 10 }]]
 
|default=5
 
|default=5
|description=Alignment of the mosaic in the parent video
+
|description=You can enforce the mosaic alignment on the parent video.
 
}}
 
}}
 
{{Option
 
{{Option
Line 34: Line 37:
 
|value=integer
 
|value=integer
 
|default=0
 
|default=0
|description=Upper left corner's x coordinate
+
|description=X Coordinate of the top-left corner of the mosaic.
 
}}
 
}}
 
{{Option
 
{{Option
Line 40: Line 43:
 
|value=integer
 
|value=integer
 
|default=0
 
|default=0
|description=Upper left corner's y coordinate
+
|description=Y Coordinate of the top-left corner of the mosaic.
 
}}
 
}}
 
{{Option
 
{{Option
Line 46: Line 49:
 
|value=integer
 
|value=integer
 
|default=0
 
|default=0
|description=Border width (in pixels) between mosaic elements
+
|description=Border width between mosaic elements, in pixels.
 
}}
 
}}
 
{{Option
 
{{Option
Line 52: Line 55:
 
|value=integer
 
|value=integer
 
|default=0
 
|default=0
|description=Border height (in pixels) between mosaic elements
+
|description=Border height between mosaic elements, in pixels.
 
}}
 
}}
 
{{Option
 
{{Option
|name=mosaic-position
+
|name=mosaic-position<span id="mosaic-position"></span>
 
|value=integer
 
|value=integer
 +
|select={ 0, 1, 2 }
 
|default=0
 
|default=0
|description=Positioning method of the mosaic elements. Use 0 to position the elements automatically on the grid, 1 to position the elements in fixed positions on the grid (see mosaic-order) and 2 to use grid independant offsets (see mosaic-offsets).
+
|description=Positioning method of the mosaic elements. Use <kbd>0</kbd> to position the elements automatically on the grid, <kbd>1</kbd> to position the elements in fixed positions on the grid (see mosaic-order) and <kbd>2</kbd> to use grid-independent offsets (see [[#mosaic-offsets|mosaic-offsets]]).
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=mosaic-rows
 
|name=mosaic-rows
 
|value=integer
 
|value=integer
 +
|min=1
 +
|max=<var>INT_MAX</var>
 
|default=2
 
|default=2
|description=Number of rows in the mosaic grid
+
|description=Number of image rows in the mosaic (only used if [[#mosaic-position|positioning method]] is set to "fixed").
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=mosaic-cols
 
|name=mosaic-cols
 
|value=integer
 
|value=integer
 +
|min=1
 +
|max=<var>INT_MAX</var>
 
|default=2
 
|default=2
|description=Number of columns in the mosaic grid
+
|description=Number of image columns in the mosaic (only used if [[#mosaic-position|positioning method]] is set to "fixed").
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=mosaic-keep-aspect-ratio
 
|name=mosaic-keep-aspect-ratio
 +
|value=boolean
 
|default=disabled
 
|default=disabled
|description=Keep the element's aspect ratio when resizing.
+
|description=Keep the original [[aspect ratio]] when resizing mosaic elements.
 
}}
 
}}
 
{{Option
 
{{Option
 
|name=mosaic-keep-picture
 
|name=mosaic-keep-picture
 +
|value=boolean
 
|default=disabled
 
|default=disabled
|description=Do not resize or do any other transformation on the mosaic pictures. Should be enabled when using the [[Documentation:Modules/mosaic-bridge|mosaic-bridge]]'s resizing options.
+
|description=Do not resize or do any other transformation on the mosaic pictures. Should be enabled when using the {{docmod|mosaic-bridge}}'s resizing options.
 
}}
 
}}
 
{{Option
 
{{Option
Line 86: Line 96:
 
|value=string
 
|value=string
 
|default=""
 
|default=""
|description=Comma seperated list of picture IDs. For example: tf1,fr2,fr3,m6.
+
|description=You can enforce the order of the elements on the mosaic. You must give a comma-separated list of picture ID(s) (For example: <kbd>tf1,fr2,fr3,m6</kbd>). These IDs are assigned in the {{docmod|mosaic-bridge}} module.
 
}}
 
}}
 
{{Option
 
{{Option
|name=mosaic-offsets
+
|name=mosaic-offsets<span id="mosaic-offsets"></span>
 
|value=string
 
|value=string
 
|default=""
 
|default=""
|description=Comma seperated list of x,y coordinates. For example: 0,0,10,100 if you want to position the first picture at coordinates (0,0) and the second one at coordinates (10,100).
+
|description=You can enforce the <code>(x,y)</code> offsets of the elements on the mosaic (only used if [[#mosaic-position|positioning method]] is set to "offsets"). You must give a comma-separated list of coordinates. For example: <kbd>10,10,150,10</kbd> if you want to position the first picture at coordinates <code>(10,10)</code> and the second one at coordinates <code>(150,10)</code>.
 
}}
 
}}
 
{{Option
 
{{Option
Line 98: Line 108:
 
|value=integer
 
|value=integer
 
|default=0
 
|default=0
|description=Delay in ms to apply to the mosaic elements.
+
|description=Pictures coming from the mosaic elements will be delayed according to this value (in milliseconds). For high values you will need to raise caching at input.
 
}}
 
}}
 +
 +
== Source code ==
 +
* {{VLCSourceFile|modules/spu/mosaic.c}}
  
 
== See also ==
 
== See also ==
 
* [[Documentation:Modules/mosaic-bridge]]
 
* [[Documentation:Modules/mosaic-bridge]]
 
* [[Mosaic|The original Mosaic How-To]]
 
* [[Mosaic|The original Mosaic How-To]]
 +
 +
== Appendix ==
 +
<span id="appendix_select_mosaic-align"></span>
 +
{| class="mw-datatable sortable"
 +
|+ Key: [[#select_mosaic-align|--mosaic-align]]
 +
! scope="col" | Integer !! scope="col" | Effect !! scope="col" | Comment
 +
|- style="font-weight:bold;"
 +
| 0 || Center ||
 +
|- style="font-weight:bold;"
 +
| 1 || Left ||
 +
|- style="font-weight:bold;"
 +
| 2 || Right ||
 +
|- style="font-weight:bold;"
 +
| 4 || Top ||
 +
|- style="font-weight:bold;"
 +
| 8 || Bottom ||
 +
|-
 +
| 5 || Top-Left || 4 + 1
 +
|-
 +
| 6 || Top-Right || 4 + 2
 +
|-
 +
| 9 || Bottom-Left || 8 + 1
 +
|-
 +
| 10 || Bottom-Right || 8 + 2
 +
|-
 +
| 3 || {{n/a}} || contradictory
 +
|-
 +
| 7 || {{n/a}} || contradictory
 +
|}
  
 
{{Documentation}}
 
{{Documentation}}

Revision as of 04:27, 23 May 2019

Module: mosaic
Type Video sub-filter
First VLC version 0.8.2
Last VLC version -
Operating system(s) all
Description Mosaic video sub source
Shortcut(s) -

Use this filter to blend videos on top of another video. This can be used to create TV channels mosaics, setup a weather channel-like stream (with the bluescreen video filter) and lots of other fun stuff.

Since VLC 0.8.6, you can also use the HTTP interface's mosaic wizard to configure a mosaic easily.

Options

  • mosaic-alpha <integer [0 .. 255]> : Alpha blending (transparency) of the mosaic foreground pictures. 0 means transparent, 255 opaque. default value: 255
  • mosaic-height <integer> : Total height of the mosaic, in pixels. default value: 100
  • mosaic-width <integer> : Total width of the mosaic, in pixels. default value: 100
  • mosaic-align <integer> { 0, 1, 2, 4, 8, 5, 6, 9, 10 } : You can enforce the mosaic alignment on the parent video. default value: 5
  • mosaic-xoffset <integer> : X Coordinate of the top-left corner of the mosaic. default value: 0
  • mosaic-yoffset <integer> : Y Coordinate of the top-left corner of the mosaic. default value: 0
  • mosaic-borderw <integer> : Border width between mosaic elements, in pixels. default value: 0
  • mosaic-borderh <integer> : Border height between mosaic elements, in pixels. default value: 0
  • mosaic-position <integer> { 0, 1, 2 } : Positioning method of the mosaic elements. Use 0 to position the elements automatically on the grid, 1 to position the elements in fixed positions on the grid (see mosaic-order) and 2 to use grid-independent offsets (see mosaic-offsets). default value: 0
  • mosaic-rows <integer [1 .. INT_MAX]> : Number of image rows in the mosaic (only used if positioning method is set to "fixed"). default value: 2
  • mosaic-cols <integer [1 .. INT_MAX]> : Number of image columns in the mosaic (only used if positioning method is set to "fixed"). default value: 2
  • mosaic-keep-aspect-ratio <boolean> : Keep the original aspect ratio when resizing mosaic elements. default value: disabled
  • mosaic-keep-picture <boolean> : Do not resize or do any other transformation on the mosaic pictures. Should be enabled when using the mosaic-bridge's resizing options. default value: disabled
  • mosaic-order <string> : You can enforce the order of the elements on the mosaic. You must give a comma-separated list of picture ID(s) (For example: tf1,fr2,fr3,m6). These IDs are assigned in the mosaic-bridge module. default value: ""
  • mosaic-offsets <string> : You can enforce the (x,y) offsets of the elements on the mosaic (only used if positioning method is set to "offsets"). You must give a comma-separated list of coordinates. For example: 10,10,150,10 if you want to position the first picture at coordinates (10,10) and the second one at coordinates (150,10). default value: ""
  • mosaic-delay <integer> : Pictures coming from the mosaic elements will be delayed according to this value (in milliseconds). For high values you will need to raise caching at input. default value: 0

Source code

See also

Appendix

Key: --mosaic-align
Integer Effect Comment
0 Center
1 Left
2 Right
4 Top
8 Bottom
5 Top-Left 4 + 1
6 Top-Right 4 + 2
9 Bottom-Left 8 + 1
10 Bottom-Right 8 + 2
3 n/a contradictory
7 n/a contradictory
This page is part of official VLC media player Documentation (User GuideStreaming HowToHacker GuideModules)
Please read the Documentation Editing Guidelines before you edit the documentation
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.