I am trying to write streamable (fragmented?) mp4 files with FFMpeg. But the default of the FFMpeg bahavior of the -f mp4
format is not this one.
Take for example this AAC-LC MP4 test file save it as aac_lc_in.m4a
and run the ffmpeg
command:
ffmpeg -y -i aac_lc_in.m4a -strict -2 -codec copy -f mp4 aac_lc_out.m4a
The result is a non-streamable file (put it on a server and try to load it in your browser. It only starts after it is completely downloaded). This does not happen with the original file that can be started before the download completes.
I also tried using the mp4
format parameters:
-movflags frag_keyframe+empty_moov
-movflags faststart+frag_keyframe
-movflags faststart+frag_keyframe+empty_moov
-movflags faststart+rtphint+frag_keyframe
-movflags rtphint+frag_keyframe
-movflags rtphint+frag_keyframe -rtpflags latm
but nothing helped. Even if the output file looks very similar to the original one (File format box, sample table boxes, etc.), the generated file is not streamable.