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?

my .mp4 file

the working .mp4 file

enter image description here

  1. parse tfhb
  2. extract default_sample_duration
  3. use default_sample_duration instead of absent duration trun

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -