Anonymousdog / displaycameras

System for displaying RTSP feeds from IP cameras on the Raspberry Pi
Apache License 2.0
572 stars 114 forks source link

Camera UDP rtsp stream #45

Closed pezzotto closed 2 years ago

pezzotto commented 4 years ago

Hello and thanks for this great code.

I'm trying to create a display with two cheap Sricam but i noticed that the rtsp stream is UDP instead of TCP.

In fatc if i try sudo omxplayer --no-keys --no-osd --avdict rtsp_transport:udp --live -n -1 --timeout 30 I have no problem to see the image.

There's a way to change the rtsp_transport in the code?

OR better.. a way to add a setting for single camera in the config if use tcp or udp?

Sorry maybe this is a pull request..

Thanks!

rcmcdonald91 commented 4 years ago

Every instance of omxplayer is spawned using the same base command, which uses TCP transport. You can change the transport mode in the code yourself...but again, this changes it for ALL streams spawned by the script

player="omxplayer --no-keys --no-osd --avdict **rtsp_transport:tcp** --win \"${window_positions[$x]}\" \"${camera_feeds[$i]}\" --live -n -1 --timeout "$omx_timeout" --dbus_name "org.mpris.MediaPlayer2.omxplayer.${camera_names[$i]}" >/dev/null &"

Any particular reason why you require a mix of UDP and TCP transport? Generally, stick with TCP.

pezzotto commented 4 years ago

Thank you i found it and changed, now it's ok.

The reason is that i have two Sricam that stream an rtsp only udp (strange i know)..