Any downsides to always using the -movflags faststart parameter?
It seems many sites like YouTube suggest moov atom at the front of the file (Fast Start).
ffmpeg does not make this a default behavior, but you can specify it with the -movflags faststart
option. I'm wondering if there is any downside to always using this parameter?
Solution 1:
Only downside is it can take a few more seconds
Depending on the size of your input it can take a few more seconds usually to perform the second pass to move the moov
atom to the beginning of the file.
Example of re-muxing a 1 hour video:
Without -movflags +faststart
ffmpeg -i input.mkv -c copy output.mp4
0m11.695s
With -movflags +faststart
ffmpeg -i input.mkv -c copy -movflags +faststart output.mp4
0m12.252s
Note this option is only for MP4, M4A, M4V, MOV output.
Solution 2:
I guess this thread needs an update. On latest ffmpeg (3.4.1) I get:
$ time ffmpeg -y -f lavfi -i nullsrc=s=hd720:d=600 -preset ultrafast out.mp4
real 0m26.578s
$ time ffmpeg -y -f lavfi -i nullsrc=s=hd720:d=600 -movflags +faststart -preset ultrafast out.mp4
real 0m26.849s
Same results. Now try with a real video:
$ time ffmpeg -y -i Sintel.2010.1080p.mp4 -preset:v ultrafast out.mp4
real 3m38.829s
$ time ffmpeg -y -i Sintel.2010.1080p.mp4 -preset:v ultrafast -movflags +faststart out.mp4
real 3m43.674s
About 2% difference, that could be just noise. Also need to note that "Starting second pass: moving the moov atom to the beginning of the file" phase took no more than couple seconds on 600Mb output file.