I am trying to convert an MP3 file to a fragmented MP4 like this:
ffmpeg -i input.mp3 -strict experimental -acodec aac -b:a 256k -f mp4 \
-movflags faststart+frag_keyframe+empty_moov+separate_moof output.mp4
However, using Bento4 I can see that there is just one giant mdat
object instead of a series of those:
[ftyp] size=8+24
major_brand = isom
minor_version = 200
compatible_brand = isom
compatible_brand = iso2
compatible_brand = iso6
compatible_brand = mp41
[moov] size=8+701
...
[moof] size=8+62364
...
[mdat] size=8+5794679
[mfra] size=8+59
[tfra] size=12+31, version=1
track_ID = 1
length_size_of_traf_num = 0
length_size_of_trun_num = 0
length_size_of_sample_num = 0
[mfro] size=12+4
mfra_size = 67
I think what I want is this:
(source)
But I can't seem to be able to get this from ffmpeg
.
I found some other options here like
$ ffmpeg -h muxer=ismv
...
-frag_duration <int> E.... Maximum fragment duration
-min_frag_duration <int> E.... Minimum fragment duration
-frag_size <int> E.... Maximum fragment size
but playing around with these didn't change the output.
How can I create fragments of a specific sice e.g. ~5 seconds each?