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

Nick6

n3wb
Joined
May 15, 2020
Messages
18
Reaction score
2
Location
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
 

concord

Getting comfortable
Joined
Oct 24, 2017
Messages
665
Reaction score
741
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.
 

Nick6

n3wb
Joined
May 15, 2020
Messages
18
Reaction score
2
Location
EU
Hi concord, I was really convinced that I did respond but apparently not: adding the "&" did solve it so thanks a lot!
 

concord

Getting comfortable
Joined
Oct 24, 2017
Messages
665
Reaction score
741
It's a UNIX/linux thing, the & "spawn"s the program/process and de-attaches it from the xterminal.
 
Top