简体   繁体   English

如何使用Accord.FFMPEG.Video将H.264流保存到mp4容器

[英]How to save H.264 stream to mp4 container using Accord.FFMPEG.Video

I am receiving raw H.264 frames in a callback in C#. 我在C#的回调中收到原始的H.264帧。 I can save the stream to a *.264 file where I can see the video using Elecard StreamEye. 我可以将流保存到* .264文件中,可以使用Elecard StreamEye观看视频。

Is it possible to save the video to an mp4 container using Accord.FFMPEG.Video VideoFileWriter or VideoFileSource without re-encoding it? 是否可以使用Accord.FFMPEG.Video VideoFileWriter或VideoFileSource将视频保存到mp4容器中而无需重新编码?

I would rather not have to implement it using p/Invokes to libav unless there is no alternative. 除非别无选择,否则我宁愿不必使用p / Invokes来实现libav。

Check out this link. 查看此链接。 In general, ffmpeg is smart enough to output .mp4 based on the output extension specified. 通常,ffmpeg足够聪明,可以根据指定的输出扩展名输出.mp4。 Also giving -copy avoids re-encoding. 同时提供-copy可以避免重新编码。

https://askubuntu.com/questions/690015/how-can-i-convert-264-file-to-mp4 https://askubuntu.com/questions/690015/how-can-i-convert-264-file-to-mp4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM