[FFmpeg-devel] [PATCH] Bluray Subtitle Support, v7 (Updated patch to v12)

Carl Eugen Hoyos cehoyos
Wed Aug 26 12:47:14 CEST 2009


Reimar D?ffinger <Reimar.Doeffinger <at> gmx.de> writes:

> 
> On Wed, Aug 26, 2009 at 11:00:52AM +0200, Reimar D?ffinger wrote:
> > When muxing into AVI for xsub I first get a crash, and after fixing that
> > I get "scale/rate is 0/1 which is invalid. (This file has been generated by
> > broken software.)" when trying to play the result.
> 
> Ok, I have a couple of issue with the AVI demuxer and other stuff.
> The first one is that the time base of subtitle streams stays at
> the default of 90 kHz, which is a bit questionable but probably
> acceptable.
> The second and bigger one is that the avi muxer uses the (completely
> undocumented btw.) ff_parse_specific_params which seems to guess a time
> base.
> The issue with this is that for this it uses the codec values and only
> those, which are never set for subtitles, overwriting the perfectly
> good values from the stream time base. WTF?
> Later this causes a crash due to a division by 0 when rescaling the
> subtitle time base to the now broken stream time base.
> This "fixes" it, but I have no idea if it makes anything actually work:

With the patch, subtitles are actually encoded (file size 10 times bigger), but
nothing is shown on playback: Perhaps because of these messages while encoding:
[xsub @ 0x141e450]No more than 4 subtitle colors supported (256 found.)
    Last message repeated 6 times

With -scodec dvdsub, I now get
dvd_subtitle too big
Subtitle encoding failed
and encoding stops before anything was actually written to the file (after
processing 1000 frames).
If I raise the subtitle_out_max_size in ffmpeg.c, I get warnings about "buffer
underflow" and "packet too large, ignoring buffer limits to mux it", final file
size is slightly bigger, but I cannot see subtitles when playing the file with
ffplay or mplayer.

Carl Eugen




More information about the ffmpeg-devel mailing list