[FFmpeg-devel] DVB Subtitles

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Dec 4 14:20:14 CET 2013

On Wed, Dec 04, 2013 at 12:27:59PM +0100, Nicolas George wrote:
> Le quartidi 14 frimaire, an CCXXII, JULIAN GARDNER a écrit :
> > Why as this is a development problem!
> I see no patch.
> > The code needs changing to take into account that what is happening now is
> > wrong, 
> This is not proven, since you did not provide the full console output.

Whatever, the question is whether this code in ffmpeg_filter.c is is
right or not:
    /* Compute the size of the canvas for the subtitles stream.
       If the subtitles codec has set a size, use it. Otherwise use the
       maximum dimensions of the video streams in the same file. */

I can tell you already now that it is wrong (at least in the sense of not being
optimal), since no vobsubs as far as I know exist made for video resolutions less
than full TV resolutions.
However almost all old analog captures will use less than full resolution
(since they either could not be done in real-time or be too large).
So in this case the canvas size would be chosen wrong.
Also suboptimally, there seems to be no code to fix up the decision if the
subtitle area ends up larger than the canvas (which means either corruption
or wrong canvas size).
Lastly, the code only being available in FFmpeg and not to applications using
libav* isn't perfect either.

More information about the ffmpeg-devel mailing list