[FFmpeg-devel] [PATCH 2/3] textdec: Rename all generic parts from srt to text.

Clément Bœsch ubitux at gmail.com
Wed Aug 1 20:34:13 CEST 2012


On Wed, Aug 01, 2012 at 08:18:45PM +0200, Nicolas George wrote:
> Le quintidi 15 thermidor, an CCXX, Philip Langdale a écrit :
> > So, the problem here is matroska. When you put SRT into matroska, it
> > gets tagged as TEXT, but all the formatting remains, and should be
> > respected. You may recall the change I proposed a couple of months ago
> > to identify matroska TEXT tracks as SRT, as a way to make things line
> > up again. You and Clément felt that was abusive as the track is text
> > in the sense of not including SRT timing information. Fair enough, hence
> > I made this change.
> > 
> > But the pseudohtml styling is still present in the track and needs to
> > be respected, so any decoder that wants to decode CODEC_ID_TEXT and
> > work correctly with SRT-in-MKV must behave as written.
> > 
> > Either we do this, or we identify mkv text tracks as srt. I don't see
> > another solution (unless you want a third decoder just for
> > srt-in-mkv...)
> 
> The problem is that anything SRT-like is a complete mess. There is this
> pseudo-HTML markup, but there are also SRT files at large with ASS markup.
> Even worse, there are files with both pseudo-HTML and ASS markup. I assume
> the same goes for S_TEXT in Matroska.
> 

Indeed some subtitles are sometimes mixing markups with ASS. This is not
specific to SRT files, it is very related to ASS and the rendering
library; it just happens that some players, after subtitles demuxing (and
decoding), send the sub data to the rendering engine (vsfilter or libass)
without escaping the '{' and '}' and thus the ASS markup is also honored.

I know some SAMI files actually have ASS markup in them (see the subtitles
reader in MPlayer trying to honor these tags...), and I also found some
SRT files with that kind of tags indeed.

But this is IMO a different issue. I think we will need a global subtitles
option to decide whether or not a given subtitles decoder should escape
the { } ASS tags. This is the default behaviour in MPlayer, and it seems a
few users complained about this because of some insane subtitles. This is
in the same spirit as codepage/encoding text issues.

> Of course, we must try to make the best of it. But I do not understand the
> kind of scenario you are trying to make work exactly.
> 
> As for the AVSubtitleRect.ass field, it is an abomination and must be killed
> as soon as possible.
> 

This is obscure to me; what do you plan to do with this?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120801/37a2e955/attachment.asc>


More information about the ffmpeg-devel mailing list