We are facing the same problem at our client site, please see the python code below to read the frames from DVR.
import numpy as np
cap = cv2.VideoCapture("rtsp://admin:email@example.com/h264/ch1/main/av_stream")
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
if cv2.waitKey(1) & 0xFF == ord('q'):
# When everything done, release the capture
Please see the configurations below
Camera Type - Analog (2)
Resolution - 640p
FPS - 6
Bit rate - 128 kb/s
GPU Details - NVDIA Quadro P400 2GB
CPU Details - i5 7th Generation, 8GB RM
Operating System - Windows 10 Pro
But console shows following messages:
[h264 @ 0xxxxx] cabac decode of qscale diff failed at
[h264 @ 0xxxxx] error while decoding MB 0 29, bytestream (-1)
[h264 @ 0xxxxx] left block unavailable for requested intra mode at
When we process one camera frequency is less and for 2 cameras it’s more. Also, this error starts popping after few hours when application is started and frequency increases which causes inaccurate results. There are no fixed time intervals.
Please help us with some suggestions.