문제

Does Microsoft have a good API for writing media containers (mp4, avi ...)? I have a H.264 video stream and also some timestamps that I want to be able to write to a file. I found this overview of media APIs (http://msdn.microsoft.com/en-us/library/windows/desktop/ee663260%28v=vs.85%29.aspx), but it's difficult to extract just what I need ...

도움이 되었습니까?

해결책

  1. AVIFile API exists in all versions of Windows but can only create AVI files. They can contain any data format
  2. DirectShow - writes AVI, writes MP4 (as well as MKV, MOV etc) through third party components (worth mentioning: http://gdcl.co.uk/mpeg4), no support in Windows RT due to legacy status of the API
  3. Media Foundation - "successor" to DirectShow, limited availability in Windows versions before Windows 7

All have open source wrappers for .NET

Media Foundation MPEG-4 File Sink in particular:

The MPEG-4 file sink creates MP4 files. For more information about the MP4 file format, refer to the following standards documents:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top