Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 812
mczarnek Avatar asked Feb 10 '14 19:02

mczarnek


1 Answers

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.

like image 87
Alex Cohn Avatar answered Oct 28 '22 14:10

Alex Cohn