How To Fix Opencv Python Cv2.videocapture Rtsp Onvif "nonmatching Transport In Server Reply" Error?
Solution 1:
I installed OPENCV onto Windows 10 using Microsoft's VCPKG. After which, OPENCV worked fine - except it would not open videos files.
Without success, I tried many suggestions. Finally, what worked for me was very SIMPLE. I included opencv's BIN folder as a PATH in Windows Environment System Variables. That's it. Now, video files are opened and played just fine.
Solution 2:
I've just encountered this problem and after digging it looks like OPENCV 3.1+ defaults to TCP for the RTSP transport (my ESCAM QF600 only supports RTSP over UDP). You can prevent this from happening via setting the environment variable OPENCV_FFMPEG_CAPTURE_OPTIONS to something (e.g. dummy).
For completeness; see https://ffmpeg.org/ffmpeg-protocols.html for all options that can be set. Keys and values are separated with ';' and pairs are separated via '|'.
The offending code begins at line 809 in cap_ffmpeg_impl.hpp (https://github.com/opencv/opencv/blob/master/modules/videoio/src/cap_ffmpeg_impl.hpp)
Props to the following posts for sending me in the right direction:
Post a Comment for "How To Fix Opencv Python Cv2.videocapture Rtsp Onvif "nonmatching Transport In Server Reply" Error?"