Hi,
Using opencv get total frame counter error for the output result of deepstream1.5 yoloplugin.
The video source is from rtsp stream. (platform TX2)
Total frame counter is -9.223372036854776e+18.
Can you help me to check this issue?
configfile:
[source0]
enable=1
#Type - 1=CameraCSi 2=CameraV4L2 3=URI
type=3
camera-width=640
camera-height=480
camera-fps-n=15
camera-fps-d=1
camera-csi-sensor-id=0
camera-v4l2-dev-node=2
uri=rtsp://admin:admin@192.168.2.64:554/cam/realmonitor?channel=1&subtype=2
[sink1]
enable=0
#Type - 1=FakeSink 2=OverlaySink 3=EglSink 4=XvImageSink 5=File
type=5
display-id=0
offset-x=0
offset-y=0
width=0
height=0
sync=0
overlay-index=1
source-id=0
output-file=file:///home/nvidia/TX2/
import cv2
cap = cv2.VideoCapture("out.mp4")
if(cap.isOpened()):
# result=cap.set(cv2.CAP_PROP_FRAME_COUNT, 600)
# print("resucv2.CAP_PROP_FRAME_COUNTlt=",result)
count=cap.get(cv2.CAP_PROP_FRAME_COUNT)
print("count_frame=",count)
# cap.set(cv2.CAP_PROP_FRAME_COUNT, 700)
# print("count_frame=",count)
#cap = cv2.VideoCapture("rtsp://admin:admin@192.168.42.108:554/cam/realmonitor?channel=1&subtype=2")
# cap = cv2.VideoCapture("rtsp://192.168.1.69/main")
fps=cap.get(cv2.CAP_PROP_FPS)
print(fps)
ret,frame = cap.read()
print(frame.shape)
while ret:
ret,frame = cap.read()
cv2.imshow("frame",frame)
if cv2.waitKey(20) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()