View Dahua camera's rtsp stream with Raspberry Pi omxplayer

toastie

Getting comfortable
Sep 30, 2018
260
85
UK
I want to use a RPi as a tool to help me install a Dahua IPC-HDW5231RP-ZE outside. The Dahua camera is already working with my Hikvision NVR and PC inside. I want an alternative to using a smart phone.

I've been using a RPi and monitor for installing Hikvision cameras. It's simple to take outside the RPi, monitor, POE switch, camera, then one command in the terminal and the camera's image is displayed.
The Hikvision stream is typically rtsp://admin:<password>@<IP address of camera >/h264/ch1/sub/av_stream. This does not work though for the Dahua camera.

(Incidentally using VLC the Hikvision NVR stream is rtsp://admin:<password@<NVR's IP>:554/Streaming/Channels/101 or 102 but would be less easy for me to take outside my desktop PC to view the Dahua camera)

None of the Dahua camera rtsp input lines I've seen have worked for my RPI's omxplayer.
What Dahua rtsp stream description might work with omxplayer?
 
Here is one of my omxplayer startup commands for a dahua camera.
Change subtype to 2 or 3 for sub streams.
Code:
omxplayer --lavfdopts probesize:25000 --no-keys --live --timeout 30 --aspect-mode stretch --nohdmiclocksync --avdict rtsp_transport:tcp --win "1440 0 1920 360" "rtsp://user:pass@192.168.0.39/cam/realmonitor?channel=1&subtype=1"
 
  • Like
Reactions: toastie
Many many thanks bp2008, your command works in the RPi's terminal to display my Dahua camera. I'm not certain yet why my original command line didn't work. So far it's a bit of a mystery.

Edit. I found the difference, for the Dahua camera to be displayed I need to include in quotation marks "rtsp://<user>:<password>@<camera IP>/cam/realmonitor?channel=1&subtype=1"
 
Last edited:
Hi guys, have you found a way to keep omxplayer running and restoring the feed after a disconnect?
 
Hi guys, have you found a way to keep omxplayer running and restoring the feed after a disconnect?
Sorry but no, my CCTV activities have been on hold for many many months, my new RV has occupied far more time than I ever expected, then we've had Covid-19. Currently I happy running 5 cameras feeding a Hikvision NVR and W10 BI. That said I'm now scoping out the installation of camera 6, probably the Dahua I have in stock, next year cameras 7 and 8 will be more to capture wildlife at the rear of our property.