[FFmpeg-devel] [RFC] Misc timestamp discontinuity issues

Michael Niedermayer michaelni at gmx.at
Mon Oct 1 17:01:22 CEST 2012


On Mon, Oct 01, 2012 at 12:09:50PM +0200, Stefano Sabatini wrote:
> Hi,
> 
> I am juggling with discontinuosu streams.
> 
> Many filters (e.g. the amerge filter) works only if the input streams
> are continuous. Also sometimes you need to merge streams with
> different durations, so in this case it is useful to specify an
> options which tells the filter to continue issuing output when the
> longer input is not yet ended.
> 
> amix has such an option (duration=longest), which is missing in
> amerge. Also aresample and asyncts both support some way to compensate
> or pad the input (in case of aresample, it should really be documented
> better).
> 
> So my question is: would it make sense to implement a timepad filter
> (with audio and video variants)? Should I rather extend the existing
> filters (e.g. add a duration option to amerge)?
> 
> Comments are welcome.

If you want to write a make_continuous filter that removes ts
discontinuities, then this will need to do do it to all streams at
once (audio as well as video as well as subtitles)
why ?

consider a mpeg file that contains 1 second (lets say 30 video frames
and mp3 at 48khz, that is 42 mp3 frames each 1152 samples making the
audio 1.008 seconds, 41 frames would be 0.984 sec)
if now 100 of these are concatenated then there are 99 discontinuities
if discontinuities are removed from each stream independantly then at
the end there will be 0.8 second desync

 [...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121001/a09163fb/attachment.asc>


More information about the ffmpeg-devel mailing list