Subtitles - support for advanced formatting
#1
Hello Wink
The greatest thing I miss in XBMC is support for 'formatting tags' in text-based subtitles. In most subtitles there are tags, which should change style of displayed subtitle: make them italic, bold, underline, change color etc. For example:

Code:
{100}{200}Normal text.
{400}{500}{Y:b}{C:$00ccff}Combined bold with color
{600}{1000}{y:i}Italic
{1500}{2000}/Another standard for italic text
{2000}{2500}<B>HTML</B> <I>tags</I>
{3000}{4000}Part of line {y:i}{y:u}italic and underlined

should be displayed as:
Code:
Normal text.
[color=#00CCFF][b]Combined bold with color[/b][/color]
[i]Italic[/i]
[i]Another standard for italic text[/i]
[b]HTML[/b] [i]tags[/i]
Part of line [i][u]italic and underlined[/u][/i]

There are few tags, which are frequently used in subtitles:
{y:i} or / - italic (i think / comes from MPL/TMPLayer standard, {y:i} from MicroDVD standard)
{y:b} - bold
{y:u} - underline
{c:$rrggbb} - color in rgb hex. values
<B>...</B>, <I>...</I>, ... - HTML tags
{y:i}{y:b} - various combinations of tags (rarely {y:ib})

It would be great, if XBMC could properly display such subtitles... Smile
Reply
#2
afaik the problem is that there is no real standard for it (or rather we follow the little standard there is), just a bunch of apps who randomly decided how to do the formatting.

patches welcomed though
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#3
and i'll reject each and every one of them that wants some bastardization of .srt supported.
Reply
#4
Well, maybe there is no official standard, but some of these tags are completly predictable, obvious and VERY frequently used in text-based subtitles. Don't you think it would be much better to see some italic/bold subtitles rather than {} marks.

Another solution could be adding user-defined rules, which could translate formatting tags into font style. That would be completly universal and won't break any standards, could be simply switched on/off etc.
Reply
#5
what i think is that lame ass "programmers" should stop inventing shit and expect others to follow. we have standards for a reason. srt supports exactly 4 tags;

<i>, <b>, <u> and <font color="...">

everything else is NOT part of .srt and we don't support it. and i don't think we should either.
Reply
#6
And I wasn't aware that we supported those spiff lists (I rarely use srt). As such I agree that we should not support the unnecessary additions.

The tags that lazy programmers (or programmers who wants people to install their software) adds could just as easily have been added in the proper way, no point in us supporting it.

You can make a small app which just translates said tags into the proper standardized output.
If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

Image

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
Reply
#7
Hmm maybe SRT standard uses only these four tags, but SRT isn't the only existing standard. I'm speaking about TMP, microDVD, MPL/MPL2 (imho they're much more popular than SRT, especially mDVD).
Here are specifications I found: http://translate.google.pl/translate?hl=...cat_id%3D1
And microDVD, as most popular subtitle format, could be even found in Wikipedia: http://en.wikipedia.org/wiki/MicroDVD Smile It seems that microDVD is as good standardized as SRT. And wasn't made by lame ass "programmers" Wink

BTW afaik true SRT looks like:
1
00:00:03,036 --> 00:00:08,201
text1

2
00:00:08,708 --> 00:00:13,168
text2

but XBMC displays other formats well:
microDVD:
{start-frame}{end-frame}text
MPL2:
[xxx][yyy]text // where xxx/10 is start-time and yyy/10 is end-time in seconds
TMP:
hh:mmConfuseds:text

So why not add full support?
Reply
#8
for those we should definitely add support. patches welcome.
Reply
#9
Would be great Smile thx
Reply
#10
Yes, I really hope to have the subtitle support of XBMC improved. I often have problems with karaoke subs on anime op and eds. For some reason the text does not layer properly. Giving you something that looks like below:
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Subtitles - support for advanced formatting0