1

I'm working on encoding raw images into avi file on windows possibly using directshow filter. The type of codec used will be selected by user. I've already done a similar thing using video for windows (VFW) which was pretty as it provide simple api to compress the data and write it to a file. This time i want to do this using directshow framework to provide directshow support.

However while checking on MSDN I found there different types of filters for different codecs, so there is no single interface. http://msdn.microsoft.com/en-us/library/windows/desktop/dd375464(v=vs.85).aspx Do I need to switch between different filters each time I switch codec.

Also how DMO is different from Directshow as per MSDN they too can be used for encoding. http://msdn.microsoft.com/en-us/library/windows/desktop/ff819088(v=vs.85).aspx

So which should I use to support maximum number of codecs?

Please share you thoughts.

4

1 回答 1

3

不同的编解码器可用于不同的接口,因为在 API 开发过程中已经有多个 API。

  • 有适用于 Windows VCM 视频编码器的 Video
  • 有视频编码 DMO
  • 有视频编码 MFT(有些可能是双 DMO/MFT 对象)
  • 有视频编码 DirectShow 过滤器

所以数学是,在 DirectShow 中,您拥有大多数开箱即用的编码器。

其他因素,如编解码器的特异性和适用性、编码/容器约束,以及体面的编码器通常不是免费提供的事实——当您以一种可以与各种视频编码器一起使用的方式设计应用程序时,这一切都严重限制了方法的使用和价值用户选择,通过标准众所周知的接口/API。

于 2013-09-06T08:10:52.707 回答