but I would want it to look like this, with the video's centered in their container:
This is the command I'm using:
Code: Select all
vlc -I telnet --ttl 12 --fake-aspect-ratio "16:9" --vlm-conf mosaic.conf --fake-file mosaic.jpg
Code: Select all
# reset VLM configuration
del all
# Background options
new bg broadcast enabled
setup bg input fake:
setup bg output #transcode{acodec=mpga,ab=128,vcodec=mpgv,vb=4096,scale=1,sfilter=mosaic}:bridge-in:std{access=udp{ttl=5},mux=ts,dst=225.1.1.1:2000}
# Mosaic options
setup bg option mosaic-height=932
setup bg option mosaic-width=1526
setup bg option mosaic-xoffset=235
setup bg option mosaic-yoffset=103
setup bg option mosaic-position=1
setup bg option mosaic-rows=3
setup bg option mosaic-cols=4
setup bg option mosaic-order=een,two,[...]
setup bg option mosaic-keep-picture
new one broadcast enabled
setup one input "udp://192.168.1.1@224.1.1.1:2000"
setup one output #duplicate{dst=mosaic-bridge{id=one,width=360},select=video,dst=bridge-out{id=one}}
new two broadcast enabled
setup two input "udp://192.168.1.1@224.1.1.2:2000"
setup two output #duplicate{dst=mosaic-bridge{id=two,width=360},select=video,dst=bridge-out{id=two}}
[...]
control bg play
control one play
control two play
[...]
Code: Select all
* mosaic-align <integer> : Alignment of the mosaic in the parent video. default value: 5
That's not the problem, it's aligned ok in the global video, it's the internal aligning I want to change.
Code: Select all
* mosaic-position <integer> : 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).. default value: 0
I browsed through the source to find out where the positioning is taking place. I figured that somehow, the images were not aligned right inside their bounding box in the vertical direction. I found following code-snippet in mosaic.c:
Code: Select all
if( fmt_out.i_width > col_inner_width ||
p_sys->b_ar || p_sys->b_keep )
{
/* we don't have to center the video since it takes the
whole rectangle area or it's larger than the rectangle */
p_region->i_x = p_sys->i_xoffset
+ i_col * ( p_sys->i_width / p_sys->i_cols )
+ ( i_col * p_sys->i_borderw ) / p_sys->i_cols;
}
else
{
/* center the video in the dedicated rectangle */
p_region->i_x = p_sys->i_xoffset
+ i_col * ( p_sys->i_width / p_sys->i_cols )
+ ( i_col * p_sys->i_borderw ) / p_sys->i_cols
+ ( col_inner_width - fmt_out.i_width ) / 2;
}
Code: Select all
if( fmt_out.i_height < row_inner_height
|| p_sys->b_ar || p_sys->b_keep )
{
/* we don't have to center the video since it takes the
whole rectangle area or it's taller than the rectangle */
p_region->i_y = p_sys->i_yoffset
+ i_row * ( p_sys->i_height / p_sys->i_rows )
+ ( i_row * p_sys->i_borderh ) / p_sys->i_rows;
}
else
{
/* center the video in the dedicated rectangle */
p_region->i_y = p_sys->i_yoffset
+ i_row * ( p_sys->i_height / p_sys->i_rows )
+ ( i_row * p_sys->i_borderh ) / p_sys->i_rows
+ ( row_inner_height - fmt_out.i_height ) / 2;
}
Any hints an thoughts are appreciated.