Skip to content

Instantly share code, notes, and snippets.

@Vankalif
Last active October 13, 2025 12:55
Show Gist options
  • Select an option

  • Save Vankalif/c61bd6c227c938572b3f2788b0e2c615 to your computer and use it in GitHub Desktop.

Select an option

Save Vankalif/c61bd6c227c938572b3f2788b0e2c615 to your computer and use it in GitHub Desktop.
VLC 6 ip cameras mosaic config via RTSP
# Runs on windows by command -> vlc --vlm-conf path_to_file.vlm
# Background options
new bg broadcast enabled
# bg just plain black background jpg image
setup bg input "C:\Users\full_path_to\back.jpg"
setup bg option image-duration=-1
setup bg output #transcode{sfilter=mosaic{width=1920,height=960,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=2000,fps=15}:duplicate{dst=display}
# Input options
new 1 broadcast enabled
# RTSP string for HIKVISION cameras
setup 1 input "rtsp://admin:[email protected]:554/ISAPI/Streaming/Channels/102"
setup 1 option dshow-size="640x480"
setup 1 output #duplicate{dst=mosaic-bridge{id=1,width=640,height=480},select=video,dst=bridge-out{id=0}}
new 2 broadcast enabled
setup 2 input "rtsp://admin:[email protected]:554/ISAPI/Streaming/Channels/102"
setup 2 option dshow-size="640x480"
setup 2 output #duplicate{dst=mosaic-bridge{id=2,width=640,height=480},select=video,dst=bridge-out{id=1}}
new 3 broadcast enabled
setup 3 input "rtsp://admin:[email protected]:554/ISAPI/Streaming/Channels/102"
setup 3 option dshow-size="640x480"
setup 3 output #duplicate{dst=mosaic-bridge{id=3,width=640,height=480},select=video,dst=bridge-out{id=2}}
new 4 broadcast enabled
setup 4 input "rtsp://admin:[email protected]:554/ISAPI/Streaming/Channels/102"
setup 4 option dshow-size="640x480"
setup 4 output #duplicate{dst=mosaic-bridge{id=4,width=640,height=480},select=video,dst=bridge-out{id=3}}
new 5 broadcast enabled
setup 5 input "rtsp://admin:[email protected]:554/ISAPI/Streaming/Channels/102"
setup 5 option dshow-size="640x480"
setup 5 output #duplicate{dst=mosaic-bridge{id=5,width=640,height=480},select=video,dst=bridge-out{id=4}}
new 6 broadcast enabled
setup 6 input "rtsp://admin:[email protected]:554/ISAPI/Streaming/Channels/102"
setup 6 option dshow-size="640x480"
setup 6 output #duplicate{dst=mosaic-bridge{id=6,width=640,height=480},select=video,dst=bridge-out{id=5}}
# Launch everything
control bg play
control 1 play
control 2 play
control 3 play
control 4 play
control 5 play
control 6 play
@fabrizzion5
Copy link

Hi,
thanks to the nice examples above, I managed to create a .vlm file and view mosaic of several cameras.
However, I struggling with the following: I would like to add a background picture for each individual stream.
With a single stream, the following command line works fine (I can see ref.jpg in the background of my live stream):
vlc.exe --sub-source logo --logo-file ref.jpg --logo-opacity 80 --logo-position=0 rstp://xxx:xxx@IP:554
But now I am struggling to incorporate theses logo command lines options into my vlm file.
I have tried the following:

new 1 broadcast enableds
setup 1 input "rtsp://192.168.199.130:554/live0"
setup 1 option network-caching=4000
setup 1 option dshow-size="960x540"
setup 1 option sub-source=logo
setup 1 option logo-file=ref.jpg
setup 1 option logo-opacity=80
setup 1 option logo-position=0
setup 1 output #duplicate{dst=mosaic-bridge{id=1,width=960,height=540},select=video,dst=bridge-out{id=1}}

But the 4 lines I have added for the logo just seem to be ignored, I still see my mosaic but without background image being displayed.
Note that it is not a picture path issue, I am working with all files in the same folder (the same as vlc.exe) to avoid any path issues at this stage.
I have also tried, in the same spirit, to integrate marq:marquee option to overlay a free text on each individual stream, but without success, I only get the raw video streams displayed in mosaic view, without any logo or marquee text being overlayed.

Any idea would be welcom, I have googled a lot, and have not been able to find out what's wrong :)
Thanks

Note: I am using VLC 3.0.21 Vetinari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment