[MPlayer-dev-eng] [PATCH] Tags support for SubRip and MicroDVD subtitles [v3]

Kazuo Teramoto kaz.rag at gmail.com
Wed Jun 23 10:54:59 CEST 2010


On Wed, Jun 23, 2010 at 2:47 AM, ubitux <ubitux at gmail.com> wrote:
>
> I really don't agree with this HTML mess, and I don't think any SubRip
> parser is doing that… If you start to implement that, do you consider we
> should support <font color    =       blue'> ?
>

Well, no we dont need, this is not a valid attribute (attribute value
can't contain a '). But I fail to see what is wrong in supporting
<font color      =      blue>.

We dont have a SubRip spec to guide our decisions, but the styles tags
*really* looks like HTML, so I think that a HTML-like spec is a good
guide.

And this is not something that is gonna create any problems (well,
performance can be one) because the color="blue" is supported with of
w/o the "HTML mess". The one current implemented in your patch is a
subset of the HTML one.

I don't really know how much SubRip font tags are used and how they
are. The subs I use usually only have bold and italic tags, but the
ones I found with font tags used color=#ff0000 (i.e. an unquoted
attribute value).

I think that a better guide is too look for what real subs uses and
not what SubRip parsers implement, because without a spec anything is
valid/wrong.

I'm thinking in downloading a big sample of SubRip subs and look for
features used. Where ppl get your subs?

I downloaded 1014 random SubRip subs from opensubtitles.org this is
the tag "analysis":

total lines     : 3891050
total tags      : 30284
<i> tags        : 28881
<u> tags        : 1000
<b> tags        : 306
<s> tags        : 0
<font> tags     : 97
unquoted attr   : 28 (29% of font) [things like size=10 or color=#ffff00]
wrong hex color : 2 (2% of font) [color=CCFF00]
spaced attr     : 0 [color   =   blue]
single quotes   : 0 [color='blue']

So I think that adding support for unquoted not spaced valid
attributes is a must have. What you think?

Regards,
Kazuo

-- 
«Dans la vie, rien n'est à craindre, tout est à comprendre»
Marie Sklodowska Curie.



More information about the MPlayer-dev-eng mailing list