C++ Video Stream detect FPS

核能气质少年 提交于 2021-02-10 18:47:06

问题


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

I use cv::VideoCapture::get(CV_CAP_PROP_FPS); but with some cameras the result is invalid for example the result is 180000 but the correct value is 25. I have check it with wireshark and see the value in the SDP Protocol is correct.

Media Attribute (a): framerate:25.000000

Which Information cv::VideoCapture::get read?


回答1:


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.

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/



来源:https://stackoverflow.com/questions/47757112/c-video-stream-detect-fps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!