Why can't I open avi video in openCV?

前端 未结 11 1245
一生所求
一生所求 2020-11-29 10:25

I just wrote a simple video reading example with openCV2.3.1, but it seems that I cannot open avi video anyway :(

Vid         


        
相关标签:
11条回答
  • 2020-11-29 10:42

    In OpenCV 2.4.4 : there is only opencv_ffmpeg244.dll (release dll) and not opencv_ffmpeg244d.dll (debug dll)

    So try in release compilation mode !

    0 讨论(0)
  • 2020-11-29 10:48

    A missing OpenCV's ffmpeg.dll does not generate any warnings/errors in OpenCV 2.3.1, and code fails silently. Make sure that you have proper opencv_ffmpeg*.dll in your path.

    0 讨论(0)
  • 2020-11-29 10:48

    If you are using Ubuntu 16+, you can try this:

    pip install opencv-python

    0 讨论(0)
  • 2020-11-29 10:51

    Under Windows x64, you don't have to rename anything. Just put the following ...\opencv\build\x64\vc12\bin in your PATH.

    0 讨论(0)
  • 2020-11-29 10:54

    I also encounter the same problem. With the sample code for VideoCapture, my visual studio program failed to open any video file. Then, the suggestion of nimcap works for me. "A missing OpenCV's ffmpeg.dll does not generate any warnings/errors in OpenCV 2.3.1, and code fails silently. Make sure that you have proper opencv_ffmpeg*.dll in your path."

    Solution: Copy opencv_ffmpeg.dll to my visual studio project /Debug folder, I can open almost any video file with VideoCapture.

    0 讨论(0)
提交回复
热议问题