Ask Your Question

Can the VideoCapture() access with rstp protocol on Windows10?

asked 2018-09-06 23:44:07 -0500

SKETOLN gravatar image

On Mac using OpenCV 3.4.0 with python3, VideoCapture() can access URL="rtsp://admin:pass@address:port/api". But on Windows10 using OpenCV 3.4.1 with python2.7, VideoCapture() can not access the URL.

edit retag flag offensive close merge delete


make sure, you have the opencv_ffmpeg.dll on your PATH (it has to be dynamically loaded at runtime)

berak gravatar imageberak ( 2018-09-07 00:07:26 -0500 )edit

I have gotten the opencv_ffmpeg.dll from the download site. What folder shall I put it on, C:\Python27\Lib\site-packages?

SKETOLN gravatar imageSKETOLN ( 2018-09-07 00:44:39 -0500 )edit

again, add the folder containing it to your PATH.

and you don't need to download it from an external site, your opencv already contains it somewhere (also with the correct version !)

berak gravatar imageberak ( 2018-09-07 00:50:49 -0500 )edit

Do you means "cv2.pyd includs opencv_ffmpeg function"? Can I use "cap = cv2.VideoCapture(URL, apiPreference=cv2.CAP_FFMPEG)"? What does " on your PATH " mean?

SKETOLN gravatar imageSKETOLN ( 2018-09-07 01:02:33 -0500 )edit

no, i mean, there should be already a opencv_ffmpeg.dll somewhere. (and that downloading a 3rd party one might result in a version conflict)

berak gravatar imageberak ( 2018-09-07 01:05:51 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-09-07 01:28:41 -0500

SKETOLN gravatar image

YES!!!!! I've found opencv_ffmpeg341.dll on my PC. And I put it on C:\Python27\Lib\site-packages. It works very well! Thank you for your kindness!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-09-06 23:44:07 -0500

Seen: 199 times

Last updated: Sep 06 '18