[FFmpeg-devel] [RFC] Yet another subtitles open question

Clément Bœsch u at pkh.me
Tue Oct 1 20:14:00 CEST 2013


Hi folks,

I have definitely better to do, and I still hate subtitles, but we need to
make some changes, and I'm willing to help.

Shell
-----

So here it is, I'd like to move on with the API. Currently we use
AVSubtitle (and its AVSubtitleRects) which is defined in lavc. We wanted
at some point to move it to libavutil, eventually with slight changes.
OTOH, the idea of using the AVFrame was disregarded quickly for various
reasons. The thing is, it might have various benefits:

 - since it doesn't introduce a new struct and its own semantic, it will
   ease a lot its integration with for instance libavfilter, and probably
   allow various code refactoring

 - AVFrames have a ref counting system: if audio and video are ref
   counted, we expect the subtitles to be as well, otherwise it can become
   a source of pain for users

 - using AVFrame also suggest the idea that we could embed subtitles data
   within existing AVFrame: think closed captioning. "Freelance" subtitles
   OTOH would just use a empty/zero frame shell. Note that this conflicts
   with the ref counting idea since it can't share the data buffers.

Opinion on this?

Encoding
--------

While I'm at it, I'd like to ask a question about the encoding process:
currently we need to pre-allocate an estimate of subtitles buffer, and
encoders will gladly overflow if it's not big enough. Since we can't
estimate the size of the output at all contrary to audio and video, should
we make each encoder responsible for the allocation of the buffer?

DVB
---

Ah, and last question/request: was ANYONE, at ANY TIME, with WHATEVER
INPUT ever able to mux or encode some DVB subtitles playable by ANY
player? We only have one format supporting DVB sub muxing (mpeg-ts), and
looks like it never worked to me¹. I can't imagine a whole dvbsub encoder
was written and actually never worked, but I can't get anything even with
very old ffmpeg. I'd like to change this, so if you know anything about
this, please share!

[1]: See http://trac.ffmpeg.org/ticket/2024 http://trac.ffmpeg.org/ticket/2989

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131001/b68a1ad0/attachment.asc>


More information about the ffmpeg-devel mailing list