Page 1 of 1

Quad view using libVLC

Posted: 19 Jan 2009 09:27
by GunnarK
Is there a possibility to enable quad view in a vlc window using libVLC.
I want to stream four cameras, and only one output window
*********************************
* 1. camera | 2. camera *
*-------------------------------*
* 3. camera | 4. camera *
*********************************

Re: Quad view using libVLC

Posted: 19 Jan 2009 09:45
by Jean-Baptiste Kempf
Yes, you can. You can do that with VLC also and Mosaic option of VLC.

Re: Quad view using libVLC

Posted: 19 Jan 2009 11:27
by GunnarK
What functions in libVLC can do this?
Or is it another mosaic library for C++?
Is there any example anywhere? I prefer C or C++

Re: Quad view using libVLC

Posted: 19 Jan 2009 14:47
by Jean-Baptiste Kempf
No, just use plain VLC and setup your mosaic with the documentation and VLM.

Once you've done it with VLC, doing it with libVLC will be easy.

Re: Quad view using libVLC

Posted: 29 Jan 2009 08:05
by GunnarK
I have still not figured out how to use mosaic and libVLC.
Which library and which header files I am supposed to use to achieve a quad view?

Re: Quad view using libVLC

Posted: 21 Nov 2011 04:11
by lujunli
Use vlc optional (mosaic), for four input source
And only one input source within the four images, how to quad view control or one signal control

Re: Quad view using libVLC

Posted: 20 Mar 2013 16:10
by freiborg
I was figuring this out and thought I'd provide the solution I found. Basically once you get your vlm.config setup, it is a direct translation to the libvlc methods. You just need to figure out which methods. And once that is figured out, the translation is fairly obvious.

Code: Select all

/* new Camera1 broadcast enabled setup Camera1 input "c:\Code\Pride Demolition disc1.avi" setup Camera1 output #mosaic-bridge{id=1,width=512,height=384} */ libvlc_vlm_add_broadcast(pVLCInstance, "Camera1", "c:\\Code\\Pride Demolition disc1.avi", "#mosaic-bridge{id=1,width=512,height=384}", 0, NULL, true, 0); libvlc_vlm_add_broadcast(pVLCInstance, "Camera2", "c:\\Code\\Pride Demolition disc2.avi", "#mosaic-bridge{id=2,width=512,height=384}", 0, NULL, true, 0); libvlc_vlm_add_broadcast(pVLCInstance, "Camera3", "c:\\Code\\Pride Final Conflict 2004 disc1.avi", "#mosaic-bridge{id=3,width=512,height=384}", 0, NULL, true, 0); libvlc_vlm_add_broadcast(pVLCInstance, "Camera4", "c:\\Code\\Pride Final Conflict 2004 disc2.avi", "#mosaic-bridge{id=4,width=512,height=384}", 0, NULL, true, 0); /* new mosaic broadcast enabled setup mosaic input Hydrangeas.jpg 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=239.255.12.42,dst=display} */ char* mosaicOptions[] = {"image-fps=25/1", "image-duration=-1"}; libvlc_vlm_add_broadcast(pVLCInstance, "mosaic", backgroundPath, "#transcode{sfilter=mosaic,vcodec=mp4v,vb=8500,fps=25,scale=1}:bridge-in{delay=400,id-offset=100}:duplicate{dst=http{dst=:56789/Mosaic},dst=display}", 2, mosaicOptions, true, 0); /* control Camera1 play control Camera2 play control Camera3 play control Camera4 play control mosaic play */ libvlc_vlm_play_media(pVLCInstance, "Camera1"); libvlc_vlm_play_media(pVLCInstance, "Camera2"); libvlc_vlm_play_media(pVLCInstance, "Camera3"); libvlc_vlm_play_media(pVLCInstance, "Camera4"); libvlc_vlm_play_media(pVLCInstance, "mosaic");