[FFmpeg-devel] How do we deal with muxing 3GPP Timed Text subtitles?

Philip Langdale philipl at overt.org
Sun Jul 8 18:03:13 CEST 2012

On Sun, 8 Jul 2012 16:32:10 +0200
Nicolas George <nicolas.george at normalesup.org> wrote:

> After a real sample is written, note its end time somewhere in the
> private context. Before any packet, check that field to see if any
> subtitle has just expired. If so, output the empty subtitle packet.

I thought about this, but my concern was pathological input samples with
bad interleaving, so that even though I see a video or audio sample
that's past the duration, I could still end up seeing the subtitle later
on. I guess this is sufficiently pathological that it's ok to ignore;
it's more important to get the normal case to work well.
> As Clément pointed out, you can write the empty subtitle packet
> always. If there are drawbacks to that, you can write in the first
> call to write_packet with non-zero PTS.

Yes, this works if we ignore my concern as above. 

Thanks for the ideas,


More information about the ffmpeg-devel mailing list