Converter for streaming mp4 videos

Progressive downloading needs H.264/AAC format and the MOOV atom set to the beginning of the file to stream videos over the net.

Usually, the MOOV atom is set to the end of the file after encoding it to mp4. In the first step, convert the video to H.264/AAC using ffmpeg

ffmpeg -i input.avi -c:v libx264 -c:a aac input.mp4

Then set the MOOV atom to the beginning of the file in a second work step:

ffmpeg -y -i input.mp4 -c:v copy -c:a copy -movflags +faststart output.mp4

Convert all mp4-files in the current directory including subfolders

find . -name "*.mp4" -print0 | xargs -0 -I file ffmpeg -y -i datei -c:v copy -c:a copy -movflags +faststart file.mp4

See also