opencv 无法使用 ffdshow 编解码器打开 avi
我目前正在使用 OpenCV 尝试打开使用 ffdshow 制作的 AVI 文件。该程序设法打开视频文件并播放,但是视频文件是黑白的并且稍微倾斜。 VLC和Windows Media Player可以正常运行。我可以做些什么来将 ffdshow 编解码器安装到 OpenCV 中,还是必须将使用 ffdshow 的每个文件转换为适当的 OpenCV 编解码器格式?预先感谢您的帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
OpenCV 以不同的方式管理视频文件,具体取决于您的 OpenCV 编译和配置,例如 Video for Windows (Vfw)、Win32、ffdshow...如果您的编解码器仅作为 DirectShow 的过滤器安装,并且 OpenCV 尝试使用 VfW32 打开此视频.dll 无法看到编解码器。
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 不是一个编解码器,它是一个编解码器包。
您可以通过传递给 ffdshow 的选项(特别是 fourcc)或使用 gspot
openCV只能使用fourcc信息来确定编解码器,它不能很好地处理任何额外的功能。它可能正在选择与 ffdshow 提供的解码器不同的解码器(请参阅 sherlock 以确定安装了哪些解码器)。
或者您可能在编码器中选择了一些它无法理解的选项
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