video - MP4 moof fragment headers -
i have mp4 parser software get's fragmented .mp4 video, parses moov , fragment headers , streams it. have generated .mp4 file myself using ffmpeg , mp4box/bento4, software has problems processing it.
ffmpeg -i input.mp4 -g 25 -c:v libx264 -c:a copy out1.mp4 mp4fragment out1.mp4 --fragment-duration 1000 --track 'video' output.mp4 using mp4 explorer software, noticed in generated .mp4 file, moof.traf.trun, sample duration set 0, in track fragment header box, sets default_sample_duration 512. while in .mp4 file works fine, there no default_sample_duration field, each individual sample has duration of size 512. looks might cause problem. right figure shows working mp4, , left 1 generated mp4.
is update in newer versions of ffmpeg (or mp4box or bento4)? there ways force setting sample duration in samples?
- parse tfhb
- extract default_sample_duration
- use default_sample_duration instead of absent duration trun

Comments
Post a Comment