Search code examples
videomp4video-processingmp4box

mp4box variable fragment length


Is it possible to segment my video differently with mp4box? I'd like the initial segment to be short, and all the other segments to be longer.

Something like 1s between the first and the second keyframe, and then a keyframe / segment every 5s.


Solution

  • GPAC maintainer here. The answer to your question with MP4Box is yes, using the -cues option:

    -cues  //ignores dash duration and segment according to cue times in given XML file.
    

    Examples at https://github.com/gpac/gpac/tree/master/tests/media/dash_cues.

    Please note that we prefer that you use our public tracker: https://github.com/gpac/gpac/issues. There are more maintainers there.