Appropriate codec for real-time video compression with DirectShow

半世苍凉 提交于 2020-01-22 16:10:07

问题


Can anybody suggest a good codec for real-time video compression? Here is a list of key requirements:

  • Must be represented as DirectShow video compression filter
  • Royalty-free
  • Good quality/bitrate output comparable to the DivX on relatively low resolutions (640x480 max)
  • Fast and resources-efficient for real-time compression
  • Compatibility with some popular format (like MPEG-4) for wide support in different video players

I mentioned DivX and I think it is a very good codec, but if I understand correctly it is not royalty-free and you need to pay DivX Inc if you want to integrate their codec into your software.


回答1:


Most codecs work out of the box under directshow, so that should not be a problem.

But most 'current' codecs are not royalty free. Too repeat this, h264 even when you use x264 is not royalty free. You have to pay for the encoder a certain amount. In this vain Xvid is in the same boat. The only codecs which are really royalty free are VP4 (OggTheora) and VP8 (WebM). Neither enjoys much support outside enthusiast PC video users.

Real-Time compression is not a target of current generation of codecs, on the other hand, especially x264 was optimized for fast, low-latency encoding if you supply the right parameters. You have to check, if your target platform provides enough performance for real-time encoding with this codec.

NB: There are many commercial h264/MPEG4/MPEG2 codec implementations by several vendors. Maybe one of them fits your needs.




回答2:


Afaik, ffdshow includes a MJPEG encoder, which might be a good fit for you needs. If you need better compression ratio, you can convert to h264 (e.g. using x264) as an offline task (or you have a very capable computer which can encode to h264 directly).



来源:https://stackoverflow.com/questions/6678548/appropriate-codec-for-real-time-video-compression-with-directshow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!