Mosaic from MJPEG sources in VLC

Discussion about configuration and usage of VLM (a stream scheduler) within VLC.
sirubin
New Cone
New Cone
Posts: 1
Joined: 28 Jan 2013 13:37

Mosaic from MJPEG sources in VLC

Postby sirubin » 28 Jan 2013 13:54

Hello,

I'm trying to set up a mosaic stream from multiple mjpeg sources and output it as yet another mjpeg. The matrix wizard in the web interface is either broken or just unclear, and the Mosaic tutorial on VLC website doesn't seem to help complete it. What I have so far is:
new channel1 broadcast enabled
setup channel1 input "http://192.168.1.100:8080/video"
setup channel1 output #duplicate{dst=mosaic-bridge{id=1,height=144,width=180},select=video,dst=bridge-out{id=1},select=audio}

new channel2 broadcast enabled
setup channel2 input "http://192.168.1.100:8080/video"
setup channel2 output #duplicate{dst=mosaic-bridge{id=2,height=144,width=180},select=video,dst=bridge-out{id=2},select=audio}

new channel3 broadcast enabled
setup channel3 input "http://192.168.1.100:8080/video"
setup channel3 output #duplicate{dst=mosaic-bridge{id=3,height=144,width=180},select=video,dst=bridge-out{id=3},select=audio}

new background broadcast enabled
setup background option image-duration=-1
setup background input flower.png
setup background output #transcode{sfilter=mosaic,vcodec=MJPEG,vb=10000,scale=1}:bridge-in{delay=400,id-offset=100}:standard{access=http,mux=MPJPEG,dst=127.0.0.1:333/mosaic}

control background play
control channel1 play
control channel2 play
control channel3 play

This looks close to what it's supposed to be however not working. Any ideas?

Thanks a lot,
Igor

russlb
New Cone
New Cone
Posts: 4
Joined: 28 May 2024 14:48

Re: Mosaic from MJPEG sources in VLC

Postby russlb » 28 May 2024 14:58

Hello all,

This previous post is over 11 years old but I find myself having the same problem:

1) Background
Because my cable provider has a Roku app to watch live tv I have Roku TVs and devices throughout the house.
I'm using IP Camera Viewer Pro on the Roku to monitor four CCTV cameras hooked to an NVR.
The NVR offers RTSP streams for each camera which allows me to stream them into VLC.
The Roku app, even though says it supports RTSP, cannot view those streams directly. It DOES support HTTP and MJPEG format.
I setup AgentDVR to intercept the RTSP feeds and offer MJPEG over HTTP to the Roku app and this works, but AgentDVR is a CPU hog and constantly maxes out the CPU of the PC I've got it on (8 cores, 16GB RAM).
I've been able to setup four instances of VLC with a Windows batch command to shell the four instances to offer HTTP feeds for each RTSP stream, and that works with low CPU utilization.

2) My problem
I'd like to be able to just have one mosaic of all four camera feeds that could be delivered to the Roku app by MJPEG over HTTP so I only have one instance of VLC providing what I need. This could work for browsers as well.

I'm having a lot of trobule getting the background output configured properly to offer up the appropriate feed. I can get it to offer ts over RTP which I got from one example, but I can't figure out the right #transcode to offer MPJPEG over http. The above example does not work.

Can anyone steer me in the right direction? The Google has not been very helpful!

aTdHvAaNnKcSe <-- thanks in advance,

RussLB

russlb
New Cone
New Cone
Posts: 4
Joined: 28 May 2024 14:48

Re: Mosaic from MJPEG sources in VLC

Postby russlb » 28 May 2024 19:36

For posterity, given the examples that are out there I found the problem:

setup bg output #transcode{vcodec=MJPG,vb=2500,scale=Auto,width=1280,height=720,acodec=none,scodec=nonechannels=2,sfilter=mosaic{alpha=255,width=1280,height=720,cols=2,rows=2,position=1,order="ch1,ch2,ch3,ch4",keep-aspect-ratio=enabled,mosaic-align=0,keep-picture=1}}:bridge-in{offset=100}:standard{access=http{mime="multipart/x-mixed-replace; boundary=--7b3cc56e5f51db803f790dad720ed50a"},mux=mpjpeg,dst=:8880/}}

mime="<header>". Note the quotes. That allows it to work!

russlb
New Cone
New Cone
Posts: 4
Joined: 28 May 2024 14:48

Re: Mosaic from MJPEG sources in VLC

Postby russlb » 29 May 2024 17:49

Here's the necessary files needed to do this:

https://github.com/EnsignRutherford/VLC-Camera-Streams

russlb
New Cone
New Cone
Posts: 4
Joined: 28 May 2024 14:48

Re: Mosaic from MJPEG sources in VLC

Postby russlb » 06 Jun 2024 13:37

Hi all,

I've been running VLC as a service since I figured out how to set this up mostly to feed the Roku apps on my TVs.

A problem I'm seeing is that after a while (overnight) VLC is still running as a service but the output of the mosaic is black.

I setup a scheduled task in Windows to restart the service every four hours and that now looks stable. When it restarts the image 'blinks' for a second and then restores, but never hangs.

Is it a known thing not to stream 24x7, especially in Windows?


Return to “VLM”

Who is online

Users browsing this forum: No registered users and 5 guests