-
-
Save Vankalif/c61bd6c227c938572b3f2788b0e2c615 to your computer and use it in GitHub Desktop.
# 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:pass@0.0.0.0: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:pass@0.0.0.0: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:pass@0.0.0.0: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:pass@0.0.0.0: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:pass@0.0.0.0: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:pass@0.0.0.0: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 |
Please anyone can help me with 16 Camera, I need a script with 1920 x 1080 and 16 Camera
@F-AlFaris that doesn't really surprise me. I had similar results when I was using the main stream of my cameras (with similar configurations). I ended up switching it to the substream feed, which looks fine when it's small anyway. In my case with Hikvision cameras, this was done by appending the "/Channels/101" to the path -- each vendor will be different.
I also noticed that VLC has a memory leak when using mosaic. If I used the main feed, I'd be lucky to have it working for more than an hour. With the substream, it works for ~24 hours. I ended up writing a small script to run every 5 minutes to check to see if "vlc.exe" is consuming more than 2GB of RAM -- if it is, forcefully close it, and relaunch.
@Vankalif @noparking247 Firstly, thank you both for sharing your VLM files - they've been very useful for me to get my video streams operational. However, I'm experiencing a choppy and jittery video stream in mosaic.
I am currently running 14 cameras, each with the following specifications: 1440x1620 resolution, H265 encoding, 10 FPS, 1 sec Frame Interval, and 1024 Bitrate.
The VLC machine is a 1440p with hardware decoding enabled (Direct3D11 Video Acceleration) and running with an RTX 3090.
Although I can open all streams individually, they become choppy and jittery when combined in a mosaic. I suspect this issue may be related to the encoding options in the VLM file. Right now, the VLM file is set to mp4v for the encoding while my IP cameras encode in h265. I tried to change the vcodec transcoding settings to vcodec=h264, vcodec=h265, and vcodec=hevc in the VLM file, but the video just won't start without the vcodec=mp4v.
Would greatly appreciate suggestions or feedback on this. Is there a specific encoding option that I should use for h265 encoded streams or could there be another potential solution that I may be overlooking?
Here is the VLM configuration that I have been using: