[FFmpeg-devel] [PATCH] AVPacket.display_duration

Michael Niedermayer michaelni
Wed Sep 10 15:00:51 CEST 2008

On Tue, Sep 09, 2008 at 01:44:39PM +0300, Uoti Urpala wrote:
> On Tue, 2008-09-09 at 06:07 +0200, Michael Niedermayer wrote:
> > I also do not know if this is the best solution, the obvious alternative
> > to display_duration is to have the matroska demuxer convert the codec
> > bitstream to a representation that contains the display_duration.
> > It seems that for all subtitle formats such representations exists, ASS as
> > well as plain text (SRT).
> If you mean that there would already exist a variant of the bitstream
> format that specifies the duration, not really. The format Aurelien used
> for ASS was taken from the line specification of the document describing
> monolithic .ass files that are meant to be read as a unit; 

what we store in h264 AVPackets matches what is written in the spec for
"monolithic" .h264

what we store in mpeg1video AVPackets matches what is written in the spec for
"monolithic" .m1v

what we store in mpeg4video AVPackets matches what is written in the spec for
"monolithic" .m4v

what we store in mp3 AVPackets matches what is written in the spec for
"monolithic" .mp3


its rather logic that we do the same for .ass
dont try to pretend that there would be a difference, there really is not

we arent storing in AVPackets what buthered mess is in avi-mp3 ...

> AFAIK that
> format is not used for packets anywhere. 

see nut or for the matter any other container supporting ass/ssa, raw .ass
being one at least that also stores them that way

> And it is not well suited for
> such use, as it specifies not duration but both starting time and end
> time, _as absolute timestamps_.

I dont know about you but i can subtract absolute timestamps to get a
relative one. So start and end time is as good as duration.

Of course this does not mean that iam against adding a display_duration
field to AVPacket, iam just saying that what AVPackets should contain should
match the codec spec (= .ass here) unless there are strong reasons to do
something else.

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- 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/20080910/ad3b5ce1/attachment.pgp>

More information about the ffmpeg-devel mailing list