Help with Mosaic RTSP setup on Raspberry Pi 4

Discussion about configuration and usage of VLM (a stream scheduler) within VLC.
Nicarlo
New Cone
New Cone
Posts: 5
Joined: 08 Feb 2020 18:22

Help with Mosaic RTSP setup on Raspberry Pi 4

Postby Nicarlo » 09 Feb 2020 19:07

Good day,

I've been working on trying to get a VLM configuration created for my new raspberry PI 4 4GB setup.

The goal is to show 4 RTSP camera streams in a mosaic view shown in the picture below.

The documentation for VLM is hard to come by and in some cases not fully complete.

Browsing the internet and these forums I've been able to create parts of what I feel should work however I am getting the following error

Code: Select all

[b273b160] chain filter error: Too high level of recursion (3) [b2717ad0] main filter error: Failed to create video converter [b273b160] chain filter error: Too high level of recursion (3) [b2717ad0] main filter error: Failed to create video converter [b232a478] chain filter error: Too high level of recursion (3) [b232a1c8] main filter error: Failed to create video converter [b273b160] chain filter error: Too high level of recursion (3) [b2717ad0] main filter error: Failed to create video converter [b232a478] chain filter error: Too high level of recursion (3) [b232a1c8] main filter error: Failed to create video converter [b273b160] chain filter error: Too high level of recursion (3) [b2717ad0] main filter error: Failed to create video converter [b232a478] chain filter error: Too high level of recursion (3) [b232a1c8] main filter error: Failed to create video converter [b232a478] chain filter error: Too high level of recursion (3) [b232a1c8] main filter error: Failed to create video converter mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xb2617120) (EINVAL) [b2613f90] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL) [b2600da0] mosaic_bridge stream out error: image conversion failed mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xb2617120) (EINVAL) [b2613f90] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL) [b2600da0] mosaic_bridge stream out error: image conversion failed mmal: mmal_vc_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV): EINVAL mmal: mmal_port_enable: failed to enable port vc.ril.hvs:out:0(OPQV)(0xb2617120) (EINVAL) [b2613f90] mmal_codec filter error: Failed to enable output port vc.ril.hvs:out:0(OPQV) (status=3 EINVAL) [b2600da0] mosaic_bridge stream out error: image conversion failed
Here is what my VLM file looks like

Code: Select all

# Comment the following line if you don't want to reset your VLM configuration del all # Background options new bg broadcast enabled setup bg input /home/pi/black.png setup bg option image-duration=-1 setup bg output #transcode{sfilter=mosaic{width=1440,height=900,cols=3,rows=2,position=1,order="1,2,3,4",keep-aspect-ratio=enabled,mosaic-align=5},vcodec=h264,vb=2000,fps=15}:duplicate{dst=display} # Input options new 1 broadcast enabled setup 1 input "rtsp://username:password@x.x.x.x:554/cam/realmonitor?channel=1&subtype=2" setup 1 option dshow-fps=15 setup 1 option dshow-size="720x450" setup 1 output #duplicate{dst=mosaic-bridge{id=1,width=720,height=450},select=video,dst=bridge-out{id=0}} new 2 broadcast enabled setup 2 input "rtsp://username:password@x.x.x.x:554/cam/realmonitor?channel=2&subtype=1" setup 2 option dshow-fps=15 setup 2 option dshow-size="720x450" setup 2 output #duplicate{dst=mosaic-bridge{id=2,width=720,height=450},select=video,dst=bridge-out{id=1}} new 3 broadcast enabled setup 3 input "rtsp://username:password@x.x.x.x:554/cam/realmonitor?channel=3&subtype=1" setup 3 option dshow-fps=15 setup 3 option dshow-size="720x450" setup 3 output #duplicate{dst=mosaic-bridge{id=3,width=720,height=450},select=video,dst=bridge-out{id=2}} new 4 broadcast enabled setup 4 input "rtsp://username:password@x.x.x.x:554/cam/realmonitor?channel=6&subtype=1" setup 4 option dshow-fps=15 setup 4 option dshow-size="720x450" setup 4 output #duplicate{dst=mosaic-bridge{id=4,width=720,height=450},select=video,dst=bridge-out{id=3}} # Launch everything control bg play control 1 play control 2 play control 3 play control 4 play # end of mosaic batch
I am then running the vlm with the following command when trying to run it. Keep in mind I am running a headless version of Raspbian Buster

Code: Select all

vlc --vlm-conf'="cameras.vlm"
I am able to stream a single rtsp via the following command without any issues. Would someone be able to shine some light on how I can get past this issue?

Code: Select all

vlc "rtsp://username:password@x.x.x.x:554/cam/realmonitor?channel=6&subtype=1"
Image

nmcrae2085
New Cone
New Cone
Posts: 1
Joined: 22 Apr 2020 23:12

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby nmcrae2085 » 22 Apr 2020 23:14

Did you get a resolution to this issue?

Im seeing the same thing in my setup, after failing with using omxplayer and displaycameras, i though this would be the best solution.

Any advice if you cracked it! :)

Nicarlo
New Cone
New Cone
Posts: 5
Joined: 08 Feb 2020 18:22

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby Nicarlo » 27 Apr 2020 21:02

Did you get a resolution to this issue?

Im seeing the same thing in my setup, after failing with using omxplayer and displaycameras, i though this would be the best solution.

Any advice if you cracked it! :)
Unfortunately after countless hours trying to figure this one out I had to instead settle with a single stream going at a time which is only showing my front door.

I included a @reboot cron job to delay 30 seconds and then run the vlc command as the pi user. I did however notice that after a few days/weeks the raspberry pi would freeze (using the pi4 4GB version) so I simply have another cron setup reboot ever night at 3AM (for some reason 4AM would cause the pi to never come back up).

I'm managing it with a simple ansible playbook so if I do need to make any changes I can simply update the playbook and have it rerun.

It will have to do for now until another another solution is available

onegai
New Cone
New Cone
Posts: 1
Joined: 03 Jun 2020 06:16

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby onegai » 03 Jun 2020 06:18

I faced the same problem. Is there any solution?

Nicarlo
New Cone
New Cone
Posts: 5
Joined: 08 Feb 2020 18:22

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby Nicarlo » 30 Jun 2020 02:00

I faced the same problem. Is there any solution?
I'm testing a new solution that seems promising. They are currently working on built in support to VLC

check out the project over at https://github.com/raspicamplayer/camplayer

Nicarlo
New Cone
New Cone
Posts: 5
Joined: 08 Feb 2020 18:22

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby Nicarlo » 17 Jul 2020 15:26

Hey all,

Anyone who like me are still looking for a solution, I have been testing the raspicamplayer solution and I have to say its incredible!

It does not use VLC at the moment but it has it's own built-in mechanism (separate to the omxplayer) to detect when a stream fails and restart it. I have a 6 rtsp stream running for about a month now without any issues at all!

https://github.com/raspicamplayer/camplayer

If anyone is interested I'd be willing to write a detailed write up on how to get this setup

SvenVD
New Cone
New Cone
Posts: 6
Joined: 16 Jul 2016 22:47

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby SvenVD » 17 Oct 2020 22:17

Hi the rpisurv project can do this for you with omxplayer:

https://github.com/SvenVD/rpisurv/tree/v2_latest

MontrealSoft
New Cone
New Cone
Posts: 1
Joined: 22 Sep 2022 02:52

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby MontrealSoft » 22 Sep 2022 03:02

Sorry to rescuscitate this old thread.

Trying to accomplish the same.
omxplayer isn't compatible with some camera feeds, but VLC is.

Any luck using VLC to view different feeds as in the picture ?

Nicarlo
New Cone
New Cone
Posts: 5
Joined: 08 Feb 2020 18:22

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby Nicarlo » 22 Sep 2022 15:03

Sorry to rescuscitate this old thread.

Trying to accomplish the same.
omxplayer isn't compatible with some camera feeds, but VLC is.

Any luck using VLC to view different feeds as in the picture ?
Have you tried out https://github.com/raspicamplayer/camplayer ?

Which cameras/dvr-nvr system are you using?

SvenVD
New Cone
New Cone
Posts: 6
Joined: 16 Jul 2016 22:47

Re: Help with Mosaic RTSP setup on Raspberry Pi 4

Postby SvenVD » 24 Sep 2022 21:38

Latest version of rpisurv https://github.com/SvenVD/rpisurv uses VLC.
raspicamplayer seems to be abondoned https://github.com/raspicamplayer/camplayer/issues/99


Return to “VLM”

Who is online

Users browsing this forum: No registered users and 1 guest