Jump to content


Photo

Use colors instead if italic and bold for pango subtitles

subtitles colour

  • Please log in to reply
16 replies to this topic

#1 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 22 July 2013 - 11:51

Hi there,

 

Back in 2011 we changed subtiitles to use colours for italic and bold.

 

http://sourceforge.net/p/openpli/enigma2/ci/a866c9143a7c1066fb8eb5cd0cd98c68d97866c2/
 
As this is the quickest work-a-round as italic and bold are not

used much in pango subtitles. For correct italic and bold

subtitles we need a huge patch instead. Italic will be displayed

as cyan and bold as yellow. Later the subtitle fonts with faces

could be stipped as this code is not required anymore.

 

I think changing colours is confusing people (believing that OpenPLi is randomly! changing colour on subtitles).

 

We can totaly remove colours (eg when we are using yellow subtititles, colour is always yellow)

 

 

if (yellow_color)
    text = (std::string) gRGB(255,255,0) + text;
-text = replace_all(text, "<i>", yellow_color ? "" : (std::string) gRGB(0,255,255));
+text = replace_all(text, "<i>", "");

 

Or we can write the huge? patch to support the html tags that srt supports.

 

The available official tags are:

  • <b></b> : bold
  • <i></i> : italic
  • <u></u> : underline
  • <font color=”#rrggbb”></font> : text color using 3 color components, red, green and blue.

Font Face and Font Size supported also by some players.

 

The SRT or Subrip subtitle format

 

SubRip (.SRT) subtitles support in players
 


Edited by athoik, 22 July 2013 - 11:55.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Use colors instead if italic and bold for pango subtitles #2 Erik Slagter

  • PLi® Core member
  • 46,960 posts

+541
Excellent

Posted 22 July 2013 - 11:58

I have a "project" on my list to do this. 

 

I am not sure if we can choose random colours (due to technical limitations) but basic colours should be doable

 

What I don't understand is why people "get confused" when they see subtile colours change. Subtitling for the hearing impaired has had this for about thirty years now and is completely normal. Having said that, it might be best to make it optional.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Use colors instead if italic and bold for pango subtitles #3 littlesat

  • PLi® Core member
  • 56,273 posts

+691
Excellent

Posted 22 July 2013 - 12:04

It is curently not possible to change fonts within the font renderer in one line... that is why the colors are choosen as work-a-round (and that was a long time ago).

Colors can be changed with help from the escape codes.


Edited by littlesat, 22 July 2013 - 12:06.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Use colors instead if italic and bold for pango subtitles #4 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 22 July 2013 - 12:10

Subtitling for the hearing impaired has had this for about thirty years now and is completely normal. Having said that, it might be best to make it optional.

 

I think the best aproach is to make the hearing impaired optional (configurable via option).

 

Also we need to add the missing underline <u> and handle <font color="..."> tag (or totaly remove font tags when found).


Edited by athoik, 22 July 2013 - 12:11.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Use colors instead if italic and bold for pango subtitles #5 littlesat

  • PLi® Core member
  • 56,273 posts

+691
Excellent

Posted 22 July 2013 - 12:14

I never saw underline in any subtitle yet... even bold is rarely... most of them are italics... And even I never saw a srt using colors.

Possibly we could change the always yellow option intro always white, always yellow, standard ....

Using real italic, bold, underline is technically not really possible... (except when italic and bold is valid for a complete line, but then we create different issue's). So using colors was a best work-a-round here.


Edited by littlesat, 22 July 2013 - 12:19.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Use colors instead if italic and bold for pango subtitles #6 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 22 July 2013 - 12:19

Possibly we could change the always yellow option intro always white, always yellow, standard ....

 

Yes, that would be great. 

 

PS. A user from a Greek forum "complaining" about subtitles going randomly (not randomly but when <i> found actually) into cyan.

 

PS2. To be honest i never new that this functionalilty existed, but controling this via an option is much better


Edited by athoik, 22 July 2013 - 12:24.

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Use colors instead if italic and bold for pango subtitles #7 Erik Slagter

  • PLi® Core member
  • 46,960 posts

+541
Excellent

Posted 22 July 2013 - 12:26

I never saw underline in any subtitle yet... even bold is rarely... most of them are italics... And even I never saw a srt using colors.

HTML tags in srt is non-standard. Having said that, we should at least remove these tags, all of them. That might be a bit tricky, because a single < or > should remain, even if text follows directly. In the French language it's common use to use "<<" and ">>" for quoting, and maybe even "<" and ">" might occur. Then even someting like "<under the bridge>" would be interpreted as an html tag.

And that's exactly the problem. Because html tags are non-standard in srt, almost all creators of srt file don't account for them.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Use colors instead if italic and bold for pango subtitles #8 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 22 July 2013 - 12:31

HTML tags in srt is non-standard. Having said that, we should at least remove these tags, all of them. That might be a bit tricky, because a single < or > should remain, even if text follows directly. In the French language it's common use to use "<<" and ">>" for quoting, and maybe even "<" and ">" might occur. Then even someting like "<under the bridge>" would be interpreted as an html tag.

And that's exactly the problem. Because html tags are non-standard in srt, almost all creators of srt file don't account for them.

 

It is a standard according to VisualSubSync, but limited to the following tags:

 

The available official tags are:

  • <b></b> : bold
  • <i></i> : italic
  • <u></u> : underline
  • <font color=”#rrggbb”></font> : text color using 3 color components, red, green and blue.

http://www.visualsubsync.org/help/srt


Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Use colors instead if italic and bold for pango subtitles #9 Erik Slagter

  • PLi® Core member
  • 46,960 posts

+541
Excellent

Posted 22 July 2013 - 12:34

I think the best aproach is to make the hearing impaired optional (configurable via option).

It's not only for the hearing impaired. I like to have different colours for different speakers as well, and some others do also.

The subtitling configuration menu should be redesigned. The "pango" word should be removed anyway, because nobody knows what it means, and in fact, pango isn't even used for the rendering, it's a complete misnomer.

I suggest the following: drop all qualifications for subtitlings on the configuration page and use the settings where appropriate. Examples:

- Use coloured subtitles yes/no will have effect on all TTX/DVB/media subtitles, because the user won't know the difference between them
- similarly options reformat, force colour to white/yellow, reposition etc.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Use colors instead if italic and bold for pango subtitles #10 Erik Slagter

  • PLi® Core member
  • 46,960 posts

+541
Excellent

Posted 22 July 2013 - 12:35

It is a standard according to VisualSubSync, but limited to the following tags:

Still I am convinced there are lots of movies out there that have text perfectly matching the start of a tag. I've never seen "&lt;" in a srt file :D


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Use colors instead if italic and bold for pango subtitles #11 littlesat

  • PLi® Core member
  • 56,273 posts

+691
Excellent

Posted 22 July 2013 - 12:37

What I can do is do the same for pango as for the teletext subtitels... or even use the same config as color_config... So you can choose everything yellow, everything white, or "orriginal"... hold on up to thursday or so...

 

And possibly consider to display the most common used italic as yellow instead of cyan.


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Use colors instead if italic and bold for pango subtitles #12 Erik Slagter

  • PLi® Core member
  • 46,960 posts

+541
Excellent

Posted 22 July 2013 - 12:44

subtitles options:

 

- colours (original/white/yellow)

- layout (original/reformat)
- position (original/reposition)
 
+ timing offset, fps ratio etc.
 

That should be enough options, really, for all types.

 

Maybe an option to either parse and remove html tags or ignore them.


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Use colors instead if italic and bold for pango subtitles #13 Erik Slagter

  • PLi® Core member
  • 46,960 posts

+541
Excellent

Posted 22 July 2013 - 12:46

A personal wish for me would be to interpret a dash '-' as very first character on the line, as speaker change and to change the colour accordingly. But I can imagine nobody else wants that, so can also change the text itself using my srt insertion script.


Edited by Erik Slagter, 22 July 2013 - 12:46.

* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Use colors instead if italic and bold for pango subtitles #14 littlesat

  • PLi® Core member
  • 56,273 posts

+691
Excellent

Posted 22 July 2013 - 14:45

Nice idea... but with a conversation of 3 persons you cannot pickup the right color :D


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: Use colors instead if italic and bold for pango subtitles #15 Erik Slagter

  • PLi® Core member
  • 46,960 posts

+541
Excellent

Posted 22 July 2013 - 15:53

Yes, that is inherently impossible. If you think it's interesting, I will have a thought or two on how to implement it (optional for the end-user). I have my holidays now, but there are a few other things that need to be done as well ;)


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: Use colors instead if italic and bold for pango subtitles #16 athoik

  • PLi® Core member
  • 8,458 posts

+327
Excellent

Posted 25 July 2013 - 20:00

thanks littlesat.

 

More color options for pango subtitles.

Default is everything as it was.
Besides constant yellow also contant white can be selected.
Add color for underscored subtitles
Swap coler used for italic and bold. Now Italic is yellow and bold cyan.

http://sourceforge.net/p/openpli/enigma2/ci/8014f6bad715431a427411df60e466c946a79a30/


For pango subs remove italic, bold, underscore codes

When color is fixed to white or yellow

http://sourceforge.net/p/openpli/enigma2/ci/94caf2a8b4a03bd8aacf160485437c8bc0b8ee98/

Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916

Re: Use colors instead if italic and bold for pango subtitles #17 littlesat

  • PLi® Core member
  • 56,273 posts

+691
Excellent

Posted 25 July 2013 - 20:12

In fact when someone really finds a srt file with color settings this should be added too....


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W




Also tagged with one or more of these keywords: subtitles, colour

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users