使用系统安装的专有编解码器编辑/解码AVI文件 [英] Editing/Decoding AVI files using system-installed proprietary codecs

查看:104
本文介绍了使用系统安装的专有编解码器编辑/解码AVI文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索了几天,但是似乎没有任何答案或对我有用,因此,如果我问的是一个愚蠢的问题,或者其他地方似乎已经回答过的问题,请原谅我。 / p>

我有一个使用GMP4视频编解码器编码的AVI文件,当前已安装在我的计算机上,因此可以在Windows Media Player中播放该文件。我想做的是打开/解码文件以进行编辑,以便能够将两个视频文件拼接在一起。我不要求它以相同的格式输出,而只是打开进行编辑,获取帧,然后我就可以输出为更标准的格式。



我得到的问题是,没有为此格式创建DirectShow过滤器,因此它不会为我打开该过滤器(工作得不太深入) ,但所有示例均无法加载视频文件)。 FFMPEG尝试读取文件,指出标头不正确,但无论如何都会尝试读取它,然后死于说我需要GMP4编解码器。如前所述,我已经安装了特定的编解码器,但是FFMPEG似乎没有注意到或无法访问它。



有什么可以让我使用系统安装的编解码器解码视频帧? Windows Media Player可以执行某些操作对我来说很奇怪,但是我无法以编程方式重复执行。我不限于C ++或C#,尽管C#肯定是首选语言。



谢谢大家,
Alex

解决方案

我整天都遇到相同的问题。解决方案是安装AVISynth,然后可以使用ffmpeg加载系统具有VfW编解码器的任何AVI文件。不用传递ffmpeg的AVI输入文件,而是用包含AviSource( your-avi-filename)的一行创建一个.avs文件,并传递ffmpeg的.avs文件名。



假设您要将专有视频编解码器中的input.avi转换为h263格式(假设input.avi具有受支持的h263帧大小):

  echo AviSource( input.avi)> input.avs 
ffmpeg -i input.avs -vcodec h263 output.avi


I've been searching for this for a few days now, but nothing seems to quite answer or work for me, so please forgive me if I'm asking a stupid question or one that seems to have been answered elsewhere.

I have an AVI file encoded using the GMP4 video codec, currently installed on my computer so I can PLAY the file in Windows Media Player for instance. What I'm trying to do is open/decode the file for editing purposes, in order to be able to stitch two video files together. I do not require it to be output in the same format, but rather only opened for editing, get the frames and then I can output to a more standard format.

The problem I'm getting is that there is no DirectShow filter created for this format, so it won't open using that for me (haven't worked too deeply into it, but all samples fail to load the video file). FFMPEG tries to read the file, states that the header is incorrect but it'll attempt to read it anyway, then dies stating that I need the GMP4 codec. As I'd stated earlier, I have the particular codec installed but FFMPEG doesn't seem to notice or have access to it.

Is there anything that will allow me to use the system-installed codecs to decode the video frames? It seems strange to me that Windows Media Player can do something, but I can't programatically repeat it. I'm not restricted to C++ or C#, though C# would definitely be a preferred language.

Thanks All, Alex

解决方案

I spent all day with the same problem. Solution is to install AVISynth, and then you can load with ffmpeg any AVI file for whom the system has a VfW codec. Instead of passing ffmpeg your AVI input file, create an .avs file with a single line containing AviSource("your-avi-filename") and passing ffmpeg the .avs filename.

Suppose you want to convert your input.avi in a proprietary video CODEC into an h263 format (supposing your input.avi has a supported h263 frame size):

echo AviSource("input.avi") > input.avs
ffmpeg -i inputs.avs -vcodec h263 output.avi

这篇关于使用系统安装的专有编解码器编辑/解码AVI文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆