GNOME Bugzilla – Bug 696333
qtmux should use provided DTS and not make up its own
Last modified: 2013-04-24 09:23:39 UTC
Instead of trying to figure out what the DTS should be, muxer should just use provided DTS now that we have it on buffer.
Created attachment 239499 [details] [review] Patch The patch will use provided DTS. If there is no DTS, it will use buffer PTS as fallback. This will work for audio streams and video without reordered frames. All other cases require valid DTS from upstream and will print warning.
Created attachment 239501 [details] [review] Fixed patch to use proper duration for last frame
I have patches pending for this that are extensively tested.
commit 364433c105055988133ebfca3190c7c23792ec64 Author: David Schleef <ds@schleef.org> Date: Fri Mar 22 11:54:08 2013 -0700 qtmux: Remove documentation for dts-method commit 6571e388be9da409185bb986ec786cff9a655631 Author: David Schleef <ds@schleef.org> Date: Fri Mar 22 13:24:33 2013 -0700 qtmux: deprecate dts-method property commit ee56a7cb99641804c573665ac551490c96e79f90 Author: David Schleef <ds@schleef.org> Date: Wed Mar 13 17:08:03 2013 -0700 qtmux: Fix problems causing bad durations in file - Fix up out-of-order incoming DTS values. - Fix duration of initial sample. commit 816e18602929bca9bb371e35be9c5a0289b1ae00 Author: David Schleef <ds@schleef.org> Date: Tue Mar 12 19:08:26 2013 -0700 qtmux: fix all timestamps once first_ts is determined commit 258c40c6dded80bc857132c3594043748bd37057 Author: David Schleef <ds@schleef.org> Date: Thu Feb 14 16:34:34 2013 -0800 qtmux: Use PTS/DTS from incoming buffers Remove old DTS guessing code.
Created attachment 242293 [details] [review] patch
For streams with bframes the first few buffers currently have invalid DTS (because there is no way to express negative running/stream time). Muxer doesn't check for -1, it takes current value and scales it, resulting in invalid sample duration. Checking for GST_CLOCK_TIME_NONE and using 0 instead fixes this (although proper fix would be to allow negative running time and perhaps shift the timestamps using edit list atom)
Isn't the offset in GstSegment been added to address that ?