Script VLC mosaic

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
mathtoolin
New Cone
New Cone
Posts: 1
Joined: 05 Dec 2017 10:06

Script VLC mosaic

Postby mathtoolin » 05 Dec 2017 11:00

So I've been working on this for three days and have hit a wall and don't know what to do. I am using the latest VLC 2.2.6 on windows 10. I am trying to setup a Mosaic to display rtsp in one instance of VLC.

Code: Select all

del all new channel1 broadcast enabled setup channel1 input "rtsp://192.168.85.90:554/s1" setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=360,width=640},select=video,dst=bridge-out{id=1}} setup channel1 option network-caching=1000 new channel2 broadcast enabled setup channel2 input "rtsp://192.168.85.91:554/s1" setup channel2 output #duplicate{dst=mosaic-bridge{id=2,height=360,width=640},select=video,dst=bridge-out{id=2}} new channel3 broadcast enabled setup channel3 input "rtsp://192.168.85.90:554/s1" setup channel3 output #duplicate{dst=mosaic-bridge{id=3,height=360,width=640},select=video,dst=bridge-out{id=3}} new channel4 broadcast enabled setup channel4 input "rtsp://192.168.85.91:554/s1" setup channel4 output #duplicate{dst=mosaic-bridge{id=4,height=360,width=640},select=video,dst=bridge-out{id=4}} new background broadcast enabled setup background input "file:///C:\Test\backgroundvlc.png" setup background option image-duration=-1 setup background output #transcode{sfilter=mosaic,vcodec=mp4v,vb=1000500,scale=1}:bridge-in{delay=400,id-offset=100}:display control background play control channel1 play control channel2 play control channel3 play control channel4 play
and my result...

Image

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: Script VLC mosaic

Postby Jean-Baptiste Kempf » 20 Jan 2018 19:38

Are you sure your rtsp server can have 4 streams taken out of it?
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.

aszovathy@gmail.com
New Cone
New Cone
Posts: 2
Joined: 27 Jan 2018 07:48
VLC version: 2.2.6
Operating System: Windows 7 x64

Re: Script VLC mosaic

Postby aszovathy@gmail.com » 28 Jan 2018 00:56

Hi,

Can you please post the command you're using?
I've tried this but no success :(

Code: Select all

vlc.exe --color --vlm-conf --mosaic-width=1920 --mosaic-height=1080 --mosaic-keep-picture --mosaic-rows=3 --mosaic-cols=3 --mosaic-position=1 --mosaic-order=1,2,3,4,5,6 "C:\Program Files (x86)\VideoLAN\VLC\mosaicx4.vlm" --ttl 12 --udp-caching 800
Here's my script:

Code: Select all

del all new channel1 broadcast enabled setup channel1 input "rtp://239.13.130.1:5501/s1" setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=360,width=640},select=video,dst=bridge-out{id=1}} setup channel1 option network-caching=1000 new channel2 broadcast enabled setup channel2 input "rtp://239.13.130.2:5501/s1" setup channel2 output #duplicate{dst=mosaic-bridge{id=2,height=360,width=640},select=video,dst=bridge-out{id=2}} new channel3 broadcast enabled setup channel3 input "rtp://239.13.130.3:5501/s1" setup channel3 output #duplicate{dst=mosaic-bridge{id=3,height=360,width=640},select=video,dst=bridge-out{id=3}} new channel4 broadcast enabled setup channel4 input "rtp://239.13.130.4:5501/s1" setup channel4 output #duplicate{dst=mosaic-bridge{id=4,height=360,width=640},select=video,dst=bridge-out{id=4}} new background broadcast enabled setup background input "file:///C:\VLC_background\Black-1920x1080.png" setup background option image-duration=-1 setup background output #transcode{sfilter=mosaic,vcodec=mp4v,vb=1000500,scale=1}:bridge-in{delay=400,id-offset=100}:display control background play control channel1 play control channel2 play control channel3 play control channel4 play
Thanks,
Sovy

ovideo
New Cone
New Cone
Posts: 1
Joined: 14 Apr 2020 11:18

Re: Script VLC mosaic

Postby ovideo » 14 Apr 2020 11:29

mathtoolin - any news on this? Have you manage to do it in one way or another?

BillyBoy
New Cone
New Cone
Posts: 1
Joined: 21 Apr 2020 12:11

Re: Script VLC mosaic

Postby BillyBoy » 21 Apr 2020 12:21

Hi everyone,

I'm creating a mosaic too, but with 3.0.8 version.
I would like to know how adding bargraphs and label for each of my 6 video tiles ? If someone can help me please !?
I've seen theses subfilters (--audio-filter=audiobargraph_a --sub-filter=audiobargraph_v) and (marq:marquee) but I don't know how/where to add them properly in my code

Here is my code :

del all

# Background options
new bg broadcast enabled
setup bg input "C:\MOSAVLC\Image1.png"
setup bg option image-duration=-1
setup bg output #transcode{sfilter=mosaic{width=1920,height=1080,cols=3,rows=2,position=1,order="1,2,3,4,5,6",keep-aspect-ratio=enabled,keep-picture=1,mosaic-align=5},vcodec=mp4v,vb=15000,fps=25}:duplicate{dst=display}

# Input options
new 1 broadcast enabled
setup 1 input "C:\MOSAVLC\FormatFactoryWildlife1.mp4"
setup 1 option dshow-fps=25
setup 1 option dshow-size="640x540"
setup 1 output #duplicate{dst=mosaic-bridge{id=1,width=640,height=540},select=video,dst=bridge-out{id=1}}

new 2 broadcast enabled
setup 2 input "C:\MOSAVLC\FormatFactoryWildlife2.mp4"
setup 2 option dshow-fps=25
setup 2 option dshow-size="640x540"
setup 2 output #duplicate{dst=mosaic-bridge{id=2,width=640,height=540},select=video,dst=bridge-out{id=2}}

new 3 broadcast enabled
setup 3 input "C:\MOSAVLC\FormatFactoryWildlife3.mp4"
setup 3 option dshow-fps=25
setup 3 option dshow-size="640x540"
setup 3 output #duplicate{dst=mosaic-bridge{id=3,width=640,height=540},select=video,dst=bridge-out{id=3}}

new 4 broadcast enabled
setup 4 input "C:\MOSAVLC\FormatFactoryWildlife4.mp4"
setup 4 option dshow-fps=25
setup 4 option dshow-size="640x540"
setup 4 output #duplicate{dst=mosaic-bridge{id=4,width=640,height=540},select=video,dst=bridge-out{id=4}}

new 5 broadcast enabled loop
setup 5 input "C:\MOSAVLC\FormatFactoryWildlife5.mp4"
setup 5 option dshow-fps=25
setup 5 option dshow-size="640x540"
setup 5 output #duplicate{dst=mosaic-bridge{id=5,width=640,height=540},select=video,dst=bridge-out{id=5}}

new 6 broadcast enabled
setup 6 input "C:\MOSAVLC\FormatFactoryWildlife6.mp4"
setup 6 option dshow-fps=25
setup 6 option dshow-size="640x540"
setup 6 output #duplicate{dst=mosaic-bridge{id=6,width=640,height=540},select=video,dst=bridge-out{id=6}}

# Launch everything
control bg play
control 1 play
control 2 play
control 3 play
control 4 play
control 5 play
control 6 play

#end of mosaic batch


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 10 guests