I’m attempting to get video streams from my older security DVR (Swann DVR8-1425) doesn’t support native RTSP.
Using the tool Zmodopipe, I’m able to connect to the DVR’s media port and create a named pipe for each channel (Method at the bottom). I’ve exposed the directory containing the pipe to the Home Assistant container through a bind, and configured a FFMPEG camera;
The camera successfully shows and refreshes a still image every 10 seconds in the Lovelace Dashboard, however fails to stream any of the video when opened.
I believe this is normal in that the decoder needs to wait for a key-frame to determine the PPS/SPS. Error log continued;
2021-09-10 09:10:17 ERROR (stream_worker) [libav.h264] top block unavailable for requested intra mode -1
2021-09-10 09:10:17 ERROR (stream_worker) [libav.h264] error while decoding MB 25 0, bytestream 20743
2021-09-10 09:10:17 ERROR (stream_worker) [libav.h264] error while decoding MB 29 22, bytestream -5
2021-09-10 09:10:17 ERROR (stream_worker) [libav.h264] cabac decode of qscale diff failed at 20 18
2021-09-10 09:10:17 ERROR (stream_worker) [libav.h264] error while decoding MB 20 18, bytestream 1305
2021-09-10 09:10:39 ERROR (stream_worker) [homeassistant.components.stream.worker] Error demuxing stream while finding first packet: No dts in 7 consecutive packets
Directly on the console for Home Assistant core I can run the ffmpeg command and access the content and get the same PPS/SPS and decoding errors, and then the stream begins.
I’ve attempted changing the DTS packet limit and timeout for the stream integration and this hasn’t changed the errors.
Has anyone got experience with the Stream integration that can give some insight into how it samples content?
Note: For this specific model I changed channelBuf[28] = 0x01 to channelBuf[28] = 0x00 before compiling
Command for running Zmodopipe
./zmodopipe -s -p 9000 -c 01 -u -a -m 9
I’ve also looked at an alternative of running the ‘simple RTSP’ server on the host, and use ffmpeg to direct the output. This works, however is rather CPU intensive and wouldn’t be feasible for all 8 channels.
hi,
I know this is an old post, but I haven’t found any similar posts. I have a similar dvr (iCatch brand). i’m pretty convinced that there is no outgoing rtsp stream, just a low quality http link. to see them in HD I use an app called socatch. I was wondering if this method is still effective or maybe if there is a better alternative. i tried all the other alternatives but i couldn’t make a connection except with very bad quality…
ps I should install the whole thing on a machine other than HA right? I’m pretty inexperienced and I haven’t found any guides on this.
thanks in advance
I ran mine on the same machine, but the machine I have has a reasonable CPU. I’ve not found another way to make it work with this unit… playing with the FFMPEG settings did give me some efficiency. Often you can increase the quality on the security system itself, check the settings through your HTTP or native app.