[FFmpeg-devel] DVB Subtitles

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jun 17 18:52:29 CEST 2014


On 17.06.2014, at 09:55, JULIAN GARDNER <joolzg at btinternet.com> wrote:
>> ________________________________
>> From: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
>> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org> 
>> Sent: Tuesday, 17 June 2014, 9:42
>> Subject: Re: [FFmpeg-devel] DVB Subtitles
>> 
>> 
>> On 17.06.2014, at 09:19, JULIAN GARDNER <joolzg at btinternet.com> wrote:
>>> Now a question for the list.
>>> 
>>> If we take a HD stream, 1280x720 and have subtitles which are based on 720x576, what should we do if we have resized the video to 640x360, should we remap the subtitles to be in the same place or just leave them as is?
>> 
>> Without rescaling, remapping will improve things only minimally.
>> In containers like MKV this is solved by storing the original video size as dimensions of the subtitle stream, and we should do that.
>> For formats where this information can't be stored it might make sense to just refuse muxing if the subtitle dimensions do not match any of the video streams.
>> _______________________________________________
> 
> 
> Rescaling would be best, but do we have to create an image, rescale this and then OCR it?

No, why should we need to OCR? Just decode, scale, encode, like for video.
DVB subtitles are kind of like movie streams where most of the image is transparent.

> Remapping would be easier if the image was smaller than the available screen it will be shown on.

It just doesn't work, e.g. the even if it fits, displaying a 1080p subtitle on a 640x480 video will result in huge letters and almost not video visible.

> maybe have a new option in the dvbsubsenc.c which tells the encoder the screen size it is being encoded to and we remap the x,y offsets as we know that dvbsubs are meant to be mapped to a 720x576 screen.

As said, IMHO that just makes a mess. Just refusing to mux would still be a better solution than silently producing something that might not be usable IMHO.


More information about the ffmpeg-devel mailing list