问题
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