[FFmpeg-devel] Subtitles for GSoC

wm4 nfxjfg at googlemail.com
Sat Apr 2 19:12:33 CEST 2016


On Tue, 8 Mar 2016 20:42:39 +0100
Clément Bœsch <u at pkh.me> wrote:

> - the handling of the timing is inconsistent: pts is in AV_TIME_BASE and
>   start/end display time are relative and in ms.

Just something I had to encounter recently: pts should be in the
user-defined time base (i.e. most likely the AVStream's time base, but
not necessarily), and the need for pkt_timebase should die.

> The first one is to create an AVSubtitle2 or something in libavutil,
> copying most of the current AVSubtitle layout but making sure the user
> allocates it with av_subtitle_alloc() or whatever, so we can add fields
> and extend it (mostly) at will.
> 
> The second one, which I'm currently wondering about these days is to try
> to hold the subtitles data into the existing AVFrame structure. We will
> for example have the frame->extended_data[N] (currently used by audio
> frames to hold the channels) point on a instances of a newly defined
> rectangle structure. Having the subtitles into AVFrame might simplify a
> lot the future integration within libavfilter since they are already
> supported as audio and video.  This needs careful thinking, but it might
> be doable.

Considering lots of code uses AVFrame to store raw data in a generic
way (and requires extra stuff just for subtitles), this will have to be
done eventually. But not sure what it'd look like.


More information about the ffmpeg-devel mailing list