Ask Your Question
0

Videocapture cap not working

asked 2018-10-11 08:45:10 -0600

JoshT gravatar image

updated 2018-10-11 09:24:37 -0600

berak gravatar image

Hello. For some reason my (!cap.isOpened()) is always true in my code. I have my videocapture cap with the path inside it. The error I get is as follows:

[ INFO:0] VIDEOIO: Enabled backends(6, sorted by priority): FFMPEG(1000); MSMF(990); DSHOW(980); VFW(970); CV_IMAGES(960); CV_MJPEG(950)
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:856)
warning: Documents/MRC/objectTrackingTut/x64/Debug/RobotX_2018_Ring_Recovery_Capture2.avi (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:857)
Error opening video stream or file

Thank you for the help.

edit retag flag offensive close merge delete

Comments

try with an absolute file path.

berak gravatar imageberak ( 2018-10-11 09:26:23 -0600 )edit

I just tried the absolute file path. It causes the error to go down to just: [ INFO:0] VIDEOIO: Enabled backends(6, sorted by priority): FFMPEG(1000); MSMF(990); DSHOW(980); VFW(970); CV_IMAGES(960); CV_MJPEG(950) Error opening video stream or file

JoshT gravatar imageJoshT ( 2018-10-11 09:43:59 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-11-22 00:15:02 -0600

i have the same problem with you, it seems that your the DLL files are not compiled correctly. please compile the source code with cmake again and put the opencv_ffmpeg343.dll file into your project path.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-10-11 08:45:10 -0600

Seen: 3,016 times

Last updated: Oct 11 '18