[FFmpeg-devel] Matroska subtitle decoding: CODEC_ID_TEXT vs. CODEC_ID_SRT

Aurelien Jacobs aurel at gnuage.org
Sun Apr 24 21:35:27 CEST 2011

On Sun, Apr 24, 2011 at 02:54:09PM +0200, Martin Lambers wrote:
> Hi all,
> According to this site
> <http://matroska.org/technical/specs/codecid/index.html>, "S_TEXT/UTF8"
> are SRT subtitles. Yet in libavformat/matroska.c, there are two entries
> for "S_TEXT/UTF8":
> ...
> {"S_TEXT/UTF8"      , CODEC_ID_TEXT},
> {"S_TEXT/UTF8"      , CODEC_ID_SRT},
> ...
> This has the result that SRT subtitles are handled with CODEC_ID_TEXT
> during decoding since this is the first entry found. Therefore, they do
> not get translated to ASS as would happen with SRT subtitles from other
> sources.

Absolutely true. I have a patch mostly ready to fix this, but it depends
on a few more stuff before being applied...

> Is there a reason to keep this behaviour? Can the first entry be removed?

IIRC MPlayer depend on this behavior for now. I intend to fix it first
to properly support SRT decoding thru libavcodec.

So please be a little bit patient and I will fix this.


More information about the ffmpeg-devel mailing list