Quad view using libVLC

This forum is about all development around libVLC.
GunnarK
Blank Cone
Blank Cone
Posts: 18
Joined: 16 Oct 2008 12:27

Quad view using libVLC

Postby GunnarK » 19 Jan 2009 09:27

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 *
*********************************

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Quad view using libVLC

Postby Jean-Baptiste Kempf » 19 Jan 2009 09:45

Yes, you can. You can do that with VLC also and Mosaic option of VLC.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

GunnarK
Blank Cone
Blank Cone
Posts: 18
Joined: 16 Oct 2008 12:27

Re: Quad view using libVLC

Postby GunnarK » 19 Jan 2009 11:27

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++

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Quad view using libVLC

Postby Jean-Baptiste Kempf » 19 Jan 2009 14:47

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.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

GunnarK
Blank Cone
Blank Cone
Posts: 18
Joined: 16 Oct 2008 12:27

Re: Quad view using libVLC

Postby GunnarK » 29 Jan 2009 08:05

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?

lujunli
New Cone
New Cone
Posts: 1
Joined: 21 Nov 2011 03:53

Re: Quad view using libVLC

Postby lujunli » 21 Nov 2011 04:11

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

freiborg
New Cone
New Cone
Posts: 3
Joined: 20 Mar 2013 16:02

Re: Quad view using libVLC

Postby freiborg » 20 Mar 2013 16:10

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");


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests