1

I just tried to use Opencv+Gstreamer to accelerate video stream as follow.

cv2.VideoCapture(cap = cv2.VideoCapture('filesrc location={} ! qtdemux ! queue ! h264parse ! omxh264dec ! nvvidconv ! videoconvert ! video/x-raw, format=BGR ! appsink'.format(self.video_file), cv2.CAP_GSTREAMER)

At the begging, it will achieve ~50 FPS, but after a minuite it will down to ~30FPS. Is that possible caused by the video's framerate, which is 30.

But, I then tried to use

cap = cv2.VideoCapture(self.video_file)

the FPS was higher than 30 FPS (~45 FPS), it makes me confused. Any comments on this? Also, where can I download some video with higher framerate (60, 120...) to test whether this limit the FPS from the 1st case (Opencv+Gstreamer).

Edward Chang
  • 141
  • 1
  • 2
  • 11

0 Answers0