Opencv+Gstreamer cv2.VideoCapture读取视频FPS问题
我只是尝试使用 Opencv+Gstreamer 来加速视频流,如下所示。
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)
刚开始时,它会达到约 50 FPS,但一分钟后就会降至约 30 FPS。 这是否可能是由视频的帧速率引起的,即 30。
但是,我随后尝试使用
cap = cv2.VideoCapture(self.video_file)
高于 30 FPS(~45 FPS)的 FPS,这让我感到困惑。 对此有何评论?另外,我在哪里可以下载一些具有更高帧率(60、120...)的视频来测试这是否限制第一种情况(Opencv+Gstreamer)的FPS。
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).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论