Duration of fmp4 in cmafmux

Hello Jonas! :slight_smile:

I’ve been working with getting correct durations with cmafmux as well, it has worked pretty well the past few months but in some very very very rare case we still get wrong durations.

Some tips:

  1. Don’t use ffprobe for durations, it only provides an estimate.
  2. cmafmux has an estimation on what to set the timescale to. This does not always work. There’s a pad property on the sink pads where you can configure it yourself.

I haven’t tried gst-discover for durations. We use mp4info and look at “duration_with_fragments” and “timescale” to get an accurate fraction. Our function tests validate that the diff between fragments are within 0.1ms which works.

1 Like