[FFmpeg-devel] [PATCH] AVPacket.display_duration

Michael Niedermayer michaelni
Tue Sep 9 06:19:48 CEST 2008


On Tue, Sep 09, 2008 at 01:57:45AM +0300, Uoti Urpala wrote:
[...]
> I think the best choice for FFmpeg is to use an internal storage format
> that keeps all the timing information in demuxer packet fields like
> display_duration when possible. Not all containers can represent such
> timing information directly at the container level, so they have to use
> hacks like moving it inside the codec packets or a less hacky but more

If 1 container behaves different from every other then it should be that
1 that contains the workarounds not every other. Of course there could be
a intermediate layer that fixes it up but certainly not every muxer that
doesnt have a matroska display_duration field. 
The question of where to convert is of course independant
of the existence of AVPacket.display_duration.


> complicated system like adding an explicit end packet for each subtitle
> (note that SSA would probably have problems with this, IIRC you need to
> know the duration immediately for some effects). So you couldn't mux
> such a format unchanged into all containers. However it's the format
> easiest to convert from, and it's not yet known what kind of workaround
> (if any) would be the standard for each container. 

> It's also a format
> that keeps sane semantics at the muxing level; moving timing information
> inside codec packets with some codec-specific coding will cause problems
> if you want to do even simple timing changes during remuxing.

If, as you seem to implicate change display_duration without updating the
timing inside the bitstream you will achive just one thing, create a broken
file.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080909/c22d3f2f/attachment.pgp>



More information about the ffmpeg-devel mailing list