我正在开发一个需要转换 mpg、avi、wmv 格式的项目。供应商要求格式为 DV AVI Type 1。这是 Windows Movie Maker 在从摄像机捕获时提供的格式。
我需要这种格式用于某些供应商工具,这些工具假设用户正在从设备捕获数据,或者现有文件的导入采用这种格式。
我知道这两个工具可以做到这一点,但我希望合并一个独立的库/命令行界面,以便我可以将编码过程包装在我自己的应用程序中。
http://paul.glagla.free.fr/dvdate_en.htm
http://www.stoik.com/products/video/STOIK-Video-Converter/
上次我检查 FFMPEG 不支持这种转换...只是从 DV AVI1 到 DV AVI2 的相反过程。
我已阅读此资源,但不知道如何将其合并到 ffmpeg 中
http://msdn.microsoft.com/en- us/library/dd388641(v=VS.85).aspx
有人尝试过从格式 X 转换为 DV AVI Type 1 吗?
I'm working on a project that requires converting mpg,avi,wmv formats. A vendor requires the format to be in DV AVI Type 1. This is a format that Windows Movie Maker offers during capture off your camcorder.
I need this format for some vendor tools that assume that the user is capturing the data off the device, or that the import of an existing file is in this format.
I know of these 2 tools that do it, but I'm looking to incorporate a stand-alone library / command line interface so that I can wrap the encoding process in my own application.
http://paul.glagla.free.fr/dvdate_en.htm
http://www.stoik.com/products/video/STOIK-Video-Converter/
Last time I checked FFMPEG does NOT support this conversion... just the reverse from DV AVI1 to DV AVI2.
I've read through this resource, but don't know how this could be incorporated into ffmpeg
http://msdn.microsoft.com/en-us/library/dd388641(v=VS.85).aspx
Has anyone tried to convert from format X to DV AVI Type 1 ?
发布评论
评论(1)
我有点不确定你想要解决的确切问题。听起来您想将 mpg、avi、wmv 文件编码为 DV AVI type 1 并且您想使用 ffmpeg 作为解决方案的一部分。
Microsoft DV 视频编码器和 DV 复用器 DirectShow 过滤器可将视频和音频组合成类型 1 DV AVI 所需的单个视频+音频 DV 流。
我对 ffmpeg 不太熟悉,但我不确定为什么您需要它来解决您的特定问题。 DirectShow 可以处理多种输入格式。从常见问题解答来看,ffmpeg 可以从 DirectShow 过滤器获取输入,但不能将数据写入 DirectShow 过滤器。
最简单的方法是仅使用 DirectShow 进行转换,而不使用 ffmpeg:
然后类似地:
dv 视频编码器和音频
来自源过滤器的输出(您可以
需要一个中间过滤器
将音频压缩到右侧
格式)。
复用器到新的 avi 复用器过滤器。
一个新的文件编写器过滤器设置为
你的目标文件。
如果我误解了您的问题,那么您应该能够构建一个不同的图表,该图表将与 DV AVI 类型 1 或 2 相互转换。对于编写类型 2,您不需要使用 dv 复用器。
在编写任何代码之前,所有这些都可以使用 GraphEdit 或类似工具轻松提前测试。 GraphEdit 可与 Windows SDK 一起使用。 GraphStudio 是一种开源替代方案,但也有其他替代方案。出于开发目的,您还可以在 GraphEdit 或类似工具中构建图形,然后加载它并在您自己的测试应用程序中运行它(请参阅 http://msdn.microsoft.com/en-us/library/dd390649(v=vs.85).aspx)
对于一些基本的入门信息参见:
- DirectShow 上的维基百科页面
- 如何学习 DirectShow 编程?
- 哪里可以找到完整的 DirectShow 教程?
I'm a little unsure of the exact problem you're trying to solve. It sounds like you want to encode mpg,avi,wmv files into DV AVI type 1 and you want to use ffmpeg as part of the solution.
There are Microsoft DV Video Encoder and DV muxer DirectShow filters that will combine video and audio into the single video+audio DV stream needed for type 1 DV AVI.
I'm not very familiar with ffmpeg but I'm not sure why you need it for your particular problem. DirectShow can handle a wide variety of input formats. It seems from the FAQ that ffmpeg can get input from a DirectShow filter but not write data to a DirectShow filter.
It would be simplest to do the conversion with DirectShow alone without ffmpeg:
Then similarly:
of the dv video encoder and the audio
ouput from the source filter (you may
need an intermediate filter to
compress the audio into the right
format).
muxer to a new avi mux filter.
a new file writer filter set up with
your destination file.
If I've misunderstood your question then you should be able to construct a different graph that will convert to or from DV AVI type 1 or 2. For writing type 2 you wouldn't need to use the dv muxer.
All of this can be easily tested in advance using GraphEdit or similar tools before writing any code. GraphEdit is available with the Windows SDK. GraphStudio is one open source alternative but there are others too. For development purposes you could also construct a graph in GraphEdit or similar and then load it and run it in your own test application (see http://msdn.microsoft.com/en-us/library/dd390649(v=vs.85).aspx)
For some basic getting started information see:
- The Wikipedia page on DirectShow
- How can I learn a DirectShow programming?
- Where can I find a thorough DirectShow tutorial?