Open DivX/XVID videos in OpenCV Python

天大地大妈咪最大 提交于 2019-12-13 01:34:11

问题


I started working on a new computer a tried to set everything as it used to be on my old one. Unfortunately switching to 64bit Windows made everything quite difficult.

With the current setup I can only open raw I420 videos converted with memcoder, but I can't open DivX/XVID videos, that I used to on my old PC. I tried ffdshow and K-Lite codec pack. Opening the videos in gspot shows that the codecs are indeed installed.

I've searched for solution all over the Internet, but I couldn't find the solution. I've tried copying the ffmpeg dll into the Python27 folder.

The environment is 64bits Windows 7 Pro

EDIT:

I tried saving a video using OpenCV:

I passed -1 to the cv2.VideoWriter function to get the codec selection dialog. The dialog dosn't show the ffdshow codecs.


回答1:


I solved the problem finally.

Windows7 x64 + Python 2.7 x86 + NumPy x86 + ffdshow x86 + Eclipse x64 is the way to go. Everything is working like a charm. x64 ffdshow is also required for other programs like VirtualDub though.




回答2:


Problem usually is that FFDshow codec is not installed. Download it from http://www.free-codecs.com/ffdshow_download.htm and it will solve a problem



来源:https://stackoverflow.com/questions/13799586/open-divx-xvid-videos-in-opencv-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!