Sorting by

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

Revision [5503]

This is an old revision of StreamCCTVRaspberryPi made by ZorrUno on 2020-05-11 00:23:35.

 

Use a 7 inch car monitor to display Streamed CCTV image

Requirement

Use of an old raspberry pi, plus a basic vehicle 7" LCD screen to display streamed CCTV in an office. Resolution was not that important - it was more about seeing activity, and bringing up another larger image on the main computer/TV if needed. The monitor I'm using is only 800x480, so this is fine as a visual display, but most of the the cameras I use are 4MPix (and they are recorded in 4MPix) with a configurable substream (usually D1 of CIF).

Equipment

-- Raspberry Pi (V1), with ethernet and composite video output (less than $30 2nd hand)
-- Composite male to male cable
-- 12V car monitor (I have 3 of these, picked up in a sale for $15 each)
similar to:
https://www.trademe.co.nz/motors/car-parts-accessories/rear-view-cameras/listing-2618879503.htm
-- Power supplies for Pi and monitor

Choice of players

I planned to use omxplayer as this mostly just works on the Pi with no gui or other x layers, and there is a great python script called displaycameras that uses this to overlay multiple 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. I did go back and manage to reconfigure my camera substreams to work on it eventually though, so have 2 methods working.

- Method 2 - Displaycameras and omxplayer


Verify omxplayer will play your feed RTSP URLs
To definitively rule out problems with omxplayer not playing your RTSP feeds, run the following in an SSH session:
sudo omxplayer --no-keys --no-osd --avdict rtsp_transport:tcp <camera feed URL> --live -n -1 --timeout 30


Follow the instructions in
https://github.com/Anonymousdog/displaycameras

My Basic quad display

windows=(upper_left upper_right lower_left lower_right)
#these could probably be tweaked or cropped a bit
window_positions=(
"0 0 399 239" \
"400 0 799 239" \
"0 240 399 479" \
"400 240 799 479" \
)
camera_names=(Cam1 Cam2 Cam3 Cam4)

camera_feeds=( \
"rtsp://192.168.1.121:554/user=blah&password=blah&channel=1&stream=1.sdp?Real_stream" \
"rtsp://192.168.1.122:554/user=blah&password=blah&channel=1&stream=1.sdp?Real_stream" \
"rtsp://192.168.1.123:554/user=blah&password=blah&channel=1&stream=1.sdp?Real_stream" \
"rtsp://192.168.1.124:554/user=blah&password=blah&channel=1&stream=1.sdp?Real_stream" \
)





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