Can ffmpeg place Mp4 metainfo at the beginning of the file?

元气小坏坏 提交于 2019-12-10 12:54:39

问题


As I understand, ffmpeg by default places all meta info at the end of the file when generating mp4s. Source: http://www.stoimen.com/blog/2010/11/12/how-to-make-mp4-progressive-with-qt-faststart/

What I need to do is create the video, one frame at a time and then stream it. This is impossible if the header info is at the 'end' of the file. But is it possible to move this to the beginning or otherwise work around this? I would definitely prefer to not have to switch to another library and use it instead.. we're already over-budget on this project.

Edit: Has to be done within code as I am converting one frame at a time and would like to then instantly stream it instead of command like.


回答1:


ffmpeg supports -movflags faststart on command line. See http://salman-w.blogspot.co.il/2013/08/fast-start-enabled-videos-with-ffmpeg.html for more info.



来源:https://stackoverflow.com/questions/21686191/can-ffmpeg-place-mp4-metainfo-at-the-beginning-of-the-file

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