Sorting by

×
zorruno wikki: Use a 7 inch car monitor to display Streamed CCTV image

Revision [5499]

This is an old revision of StreamCCTVRaspberryPi made by ZorrUno on 2020-05-10 02:44:00.

 

Use a 7 inch car monitor to display Streamed CCTV image


Choice of players


I wanted to use omxplayer as this mostly just works, and there is a good python script called displaycameras that plays rtsp streams on the pi, and can cycle though them and place them in quadrants like a CCTV DVR display etc. https://github.com/Anonymousdog/displaycameras

Unfortunately, omxplayer needs hardware decoding and the pis that I used can only software decode the H.265 streams from my cameras.

Method


Using an old Raspberry Pi (V1), and composite video output
Installed Raspbian full desktop, but start without x running (set using raspi-config)

Appended this to /home/pi/.profile
(so it will start up when the pi user logs in... which is on startup now)

cvlc -f --aspect-ratio=16:9 "rtsp://192.168.1.123:554/user=blah&password=blah&channel=1&stream=1.sdp?Real_stream"


The IP address is the camera, and port of the RTSP stream. Use the camera username and pass. Most cameras have differing strings for an RTSP URL so you need to check in your camera manual.

I had issues with larger streams, in that the stream would eventually drop out never to return. A camera stream in CIF with a decent number of i-frames seemed to work. Even a D1 stream seems to be too much. The monitor I'm using is only 800x480 however, so this is fine as a visual display, and the cameras I use are 4MPix with a substream.

Improvements


-- If the stream drops (eg camera reboots) it isn't picked up again by VLC. The script should probably check that, or just restart the stream say every hour.
-- I'd like to get vlc running without installing all the raspian desktop components, but a couple of tries at this failed (minimal