[FFmpeg-devel] Matroska subtitle decoding: CODEC_ID_TEXT vs. CODEC_ID_SRT
Reimar.Doeffinger at gmx.de
Sun Apr 24 18:04:17 CEST 2011
On Sun, Apr 24, 2011 at 05:48:28PM +0200, Martin Lambers wrote:
> I agree that the wording of the text is confused. My interpretation is
> that when they say "plain text" or "UTF-8 text" they really mean SRT
> text with the UTF-8 character encoding (this would apply to part 3).
> I think the intention here is that SRT subtitles can be stored in the
> Matroska container, namely as "S_TEXT/UTF8".
Ok, but they and several other sources failed to say that SRT includes
tags like <i>, that's what had me confused.
> The issue is that if SRT subtitles are part of a .mkv file, they are
> stored as "S_TEXT/UTF8", and FFmpeg will decode them as plain text
> subtitles, and thus a video player based on FFmpeg will not properly
> interpret SRT tags such as <i>, <b> etc. This was reported by a user of
> the Bino video player.
Ok, as said while I had a suspicion, the MKV and Wikipedia text actually
convinced me that SRT did not support that, but I now found a better source.
> >> Is there a reason to keep this behaviour? Can the first entry be removed?
> > Removing it would probably break muxing in text subtitles.
> > You could just change their order around, but IMO that's still wrong.
> From my understanding of the text, I think it would be correct to change
> the order. Otherwise, there would be no way to decode SRT subtitles
> stored in a Matroska container.
> And this change should do no harm, either, since interpreting plain text
> as SRT has no effects unless the plain text contains SRT tags.
I agree, if you can test it and confirm it to work I'm all for changing
the order (I am not the maintainer so I'd still give some time for him
to comment on any patch though).
More information about the ffmpeg-devel