[Solved] Howto stream 2 different cams with omxplayer on dual screen RPi4?

Nick6

n3wb
May 15, 2020
18
2
EU
Hi guys

So I would like to use a RPi4 with 2 monitors to display 2 different RTSP streams, full screen.
I can start the first with a script (Streaming live images from non-IP camera over NVR?)
For the 2nd stream, I tried to add a line in the same script but that doesn't work since omxplayer seems to be somewhat particular.

My knowledge of Linux/scripting/... is very basic so I don't know how to achieve this.
Is there anyone who has done this, something similar or just knows how to do this?

Thanks A LOT in advance!
Nick
 
Are you able to run each stream to it's monitor individually?

For example, from the command line try running the first cam on the first monitor:

Code:
omxplayer -o local --display 2 --avdict 'rtsp_transport:tcp' "rtsp:/<user>:<password>@<IP-NVR>/cam/realmonitor?channel=<channeln°_of_cam>&subtype=<streamn°>"


Then hit Ctl-C to kill it and run the second cam on the second monitor:


omxplayer -o local --display 7 --avdict 'rtsp_transport:tcp' "rtsp:/<user>:<password>@<IP-NVR>/cam/realmonitor?channel=<channeln°_of_cam>&subtype=<streamn°>"

If that works, hit Ctl-C to kill it, then from the command line, enter the first line and add an &, then enter the second line and see if it both work.
 
  • Like
Reactions: Nick6
Hi concord, I was really convinced that I did respond but apparently not: adding the "&" did solve it so thanks a lot!
 
  • Like
Reactions: concord
It's a UNIX/linux thing, the & "spawn"s the program/process and de-attaches it from the xterminal.