Вопрос

I am currently using OpenCV to try and open an AVI file that was made using ffdshow. The program manages to open the video file and play however, the video file is in black and white and is slightly skewed. VLC and windows media player can run it fine. Is there anything that I am able to do to install the ffdshow codec into OpenCV or do I have to covert each file with ffdshow used into appropriate OpenCV codec formats? Thank you in advance for your help.

Это было полезно?

Решение

OpenCV is managing video files in different manners depending your OpenCV compilation and configuration, like Video for Windows (Vfw), Win32, ffdshow...if your codec is installed only as a filter for DirectShow and OpenCV is trying to open this video with VfW32.dll the codec cannot be seen.

Другие советы

ffdshow isn't a codec it's a package of codecs.
You can determine what codec is actually used by either the options you passed to ffdshow (particulalrly the fourcc) or with gspot

openCV can only use the fourcc information to determine the codec, it doesn't do a good job of handling any extra features. It may be that it is picking up a different decoder than the one provided by ffdshow (see sherlock to determine which are installed).
Or it may be that you have selected some option in the encoder that it doesn't understand

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top