I have a question about specifying the individual broadcast inputs resolution for a mosaic. Currently, when I load a static file twice as two independent inputs, I'm seeing them at a fixed resolution. I set the resolution in the output, but it doesn't affect the resolution. I read:
[0]"Since vlc 2.0, the mosaic options must be passed in the command line, and not in the vlm file."
How would I pass resolution specific settings for the individual video inputs? I've attempted the options to no avail. Any help is appreciated. Thank you.
Code: Select all
void Mosaic::configure_double_input_mosaic()
{
/*
new Camera1 broadcast enabled
setup Camera1 input "C:\root\src\vlc_player_project\vlc_streaming_server_windows\res\vid\test.flv"
setup Camera1 output #mosaic-bridge{id=1,width=512,height=384}
*/
// Create a new instance of libVLC.
vlc = libvlc_new(0, NULL);
char* input_options[] = {"width=800", "height=450"};
libvlc_vlm_add_broadcast(vlc, "FirstCam", "C:\\root\\src\\vlc_player_project\\vlc_streaming_server_windows\\res\\vid\\test.flv", "#duplicate{dst=mosaic-bridge{id=1,width=200,height=200},select=video,dst=bridge-out{id=1},select=audio}", 0, NULL, true, 0);
libvlc_vlm_add_broadcast(vlc, "SecondCam", "C:\\root\\src\\vlc_player_project\\vlc_streaming_server_windows\\res\\vid\\test.flv", "#duplicate{dst=mosaic-bridge{id=2,width=900,height=900},select=video,dst=bridge-out{id=2},select=audio}", 0, NULL, true, 0);
/*
new mosaic broadcast enabled
setup mosaic input test.flv
setup mosaic option image-fps=25/1
setup mosaic option image-duration=-1
setup mosaic output #transcode{sfilter=mosaic,vcodec=mp4v,vb=8500,fps=25,scale=1}:bridge-in{delay=400,id-offset=100}:duplicate{access=udp,url=localhost,dst=display}
*/
char* mosaicOptions[] = { "image-fps=25/1", "image-duration=-1", "mosaic-height=900", "mosaic-width=1600", "mosaic-alpha=255", "mosaic-xoffset=250", "mosaic-keep-picture --no-media-library --mosaic-rows=2 --mosaic-cols=2 --mosaic-position=0 --mosaic-order=\"1,2\" --mosaic-position=1" };
//libvlc_vlm_add_broadcast(vlc, "mosaic", quadruple_input_background_path, "#transcode{sfilter=mosaic,vcodec=mp4v,vb=800,fps=25,scale=1}:bridge-in{delay=400,id-offset=100}:duplicate{dst=http{dst=:56789/Mosaic},dst=display}", 1, mosaicOptions, true, false);
libvlc_vlm_add_broadcast(vlc, "mosaic", quadruple_input_background_path, "#transcode{sfilter=mosaic,vcodec=mp4v,vb=8500,fps=25,scale=0.25}:bridge-in{delay=400,id-offset=100}:duplicate{dst=http{dst=:56789/Mosaic},dst=display}", 0, NULL, true, 0);
/*
control Camera1 play
control Camera2 play
control mosaic play
*/
libvlc_vlm_play_media(vlc, "FirstCam");
libvlc_vlm_play_media(vlc, "SecondCam");
libvlc_vlm_play_media(vlc, "mosaic");
}
[0] https://wiki.videolan.org/VLC_HowTo/Make_a_mosaic/