C++ 视频流检测 FPS [英] C++ Video Stream detect FPS

查看:116
本文介绍了C++ 视频流检测 FPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从轴或 Eneo 相机获取视频流的正确 fps.

I try to get the correct fps of a video stream from an axis or eneo camera.

rtsp://192.168.0.1:554/axis-media/media.amp

我使用 cv::VideoCaptureget(CV_CAP_PROP_FPS); 但是对于某些相机,结果无效,例如结果是 180000,但正确的值是 25.我已经用wireshark 检查过它并查看 SDP 协议是正确的.

Media Attribute (a): framerate:25.000000

cv::VideoCapture::get 读取了哪些信息?

推荐答案

OpenCV 不是很擅长这类事情,而且很可能会在很大一部分时间出错.如果您立即准确地需要它,那么我建议您查看其他相机打开库.

OpenCV Isn't very good at this sort of thing, and likely will get it wrong a large percentage of the time. If you need this accurately immediately then I would suggest looking into other camera opening libraries.

或者,您可以在打开流后对其进行配置 - https://www.learnopencv.com/how-to-find-frame-rate-or-frames-per-second-fps-in-opencv-python-cpp/

Alternatively you could profile the stream after opening it - https://www.learnopencv.com/how-to-find-frame-rate-or-frames-per-second-fps-in-opencv-python-cpp/

这篇关于C++ 视频流检测 FPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆