[FFmpeg-devel] [RFC] Format of packets for text subtitles

Philip Langdale philipl at overt.org
Fri Jun 8 01:38:28 CEST 2012

On 07.06.2012 15:59, Clément Bœsch wrote:

> Sure, but yet, this is fairly common; we already know two subtitles
> formats with the "event last until the next one" feature. And this is
> pretty common, see for instance this (almost) randomly selected one:
> http://samples.ffmpeg.org/sub/manyfmts/FOVH%20Koala%20player.txt
> It would be way easier for demuxers to parse event one by one and 
> just set
> a duration=-1
>> It would be much more problematic if you knew a format that can 
>> contain text
>> subtitles interleaved with video and that relies on that trick to 
>> mark the
>> end of a subtitle, because we can not afford to buffer several 
>> seconds worth
>> of stream just to find the duration information.
> I don't know any, but my knowledge of formats is very limited.

MPEG4 Timed Text is also durationless, and the standard practice seems 
to be
to insert an empty subtitle packet to clear out the subtitle at the end 
the duration period. However, I note that its already the case that I 
packets with the correct duration coming out of the demuxer - is mov 
doing this to set the duration properly? or are mov subtitle streams 
interleaved? I haven't looked in detail.


More information about the ffmpeg-devel mailing list