Page 1 of 1

Subtitle preferences not working across all subtitles

Posted: 11 Jul 2022 21:41
by jugo
I have subtitle font and size preferences set in the text renderer options menu. These apply when using .srt subtitle files. These do not apply when using subtitles packaged with the video file, such as .mkv files. How can I get my settings to apply to all subtitles?

Re: Subtitle preferences not working across all subtitles

Posted: 12 Jul 2022 09:19
by tguillem
It may not be possible because the subtitle has a theme, cf the discussion here: https://code.videolan.org/videolan/vlc/-/issues/27122

Re: Subtitle preferences not working across all subtitles

Posted: 12 Jul 2022 09:23
by Lotesdelere
If the subtitles are DVD or Blu-ray subtitles then they are bitmap images and they can't be resized and the font can't be changed.
Or maybe is it a similar issue as this one ? :
https://forum.videolan.org/viewtopic.php?f=14&t=160253

@tguillem:
FYI changing color of TX3G subtitles works with other players and there are several reports saying it's actually a VLC regression.

Re: Subtitle preferences not working across all subtitles

Posted: 18 Jul 2022 09:52
by InTheWings
@tguillem:
FYI changing color of TX3G subtitles works with other players and there are several reports saying it's actually a VLC regression.
What makes you think not following *forced* color is the proper way to go ?

Re: Subtitle preferences not working across all subtitles

Posted: 18 Jul 2022 11:03
by Lotesdelere
@tguillem:
FYI changing color of TX3G subtitles works with other players and there are several reports saying it's actually a VLC regression.
What makes you think not following *forced* color is the proper way to go ?

The answer is in the quote: there are several reports saying it's actually a VLC regression.

Other players allow to change the color of these subtitles but VLC doesn't anymore.

Re: Subtitle preferences not working across all subtitles

Posted: 18 Jul 2022 14:07
by InTheWings
@tguillem:
FYI changing color of TX3G subtitles works with other players and there are several reports saying it's actually a VLC regression.
What makes you think not following *forced* color is the proper way to go ?

The answer is in the quote: there are several reports saying it's actually a VLC regression.

Other players allow to change the color of these subtitles but VLC doesn't anymore.
It's not. Overriding a provided style *with a default style* was a bug.

Re: Subtitle preferences not working across all subtitles

Posted: 18 Jul 2022 14:08
by InTheWings

Re: Subtitle preferences not working across all subtitles

Posted: 18 Jul 2022 16:26
by Lotesdelere
White is the default color when no color is specified. This not a forced color, just a default one.

Simple test: create an SRT file with only timing and text.

Code: Select all

1 00:00:00,000 --> 00:00:02,000 Text 1 Text 1 2 00:00:03,000 --> 00:00:04,000 Text 2 Text 2

Convert it to TTXT with MP4Box and this default line is added by MP4Box, NOT BY ME:

Code: Select all

<Style styles="Normal" fontID="1" fontSize="18" color="ff ff ff ff"/>

Convert it to ASS with FFmpeg and these default lines are added by FFmpeg, NOT BY ME:

Code: Select all

Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding Style: Default,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0

I have not forced the color with any tool, the conversion did it by default. This is not MY choice.

With TTXT, my choice could be to force the color, among other styling, like this:

Code: Select all

<TextSample sampleTime="00:00:24.000" sampleDescriptionIndex="1" xml:space="preserve"></TextSample> <TextSample sampleTime="00:00:25.000" sampleDescriptionIndex="1" xml:space="preserve">Italic text Two lines (1)<Style fromChar="0" toChar="25" styles="Italic " fontID="1" fontSize="18" color="ff ff ff ff"/> </TextSample> <TextSample sampleTime="00:00:29.000" sampleDescriptionIndex="1" xml:space="preserve"></TextSample> <TextSample sampleTime="00:00:30.000" sampleDescriptionIndex="1" xml:space="preserve">Italic text Two lines (2)<Style fromChar="0" toChar="11" styles="Italic " fontID="1" fontSize="18" color="ff ff ff ff"/> <Style fromChar="12" toChar="25" styles="Italic " fontID="1" fontSize="18" color="ff ff ff ff"/> </TextSample>

The default setting created by the conversion should be overridden, the forced one should not.
This is how other players behave and they are right.

Re: Subtitle preferences not working across all subtitles

Posted: 18 Jul 2022 22:50
by Lotesdelere
Easier and faster, let's do it the other way round:
Download the MP4 sample file (posted by the creator of the ticket) from this post:
https://forum.videolan.org/viewtopic.ph ... 62#p529162

Extract the subtitle file out of it as SRT and check it.
There is font name and size information but no color information: <font face="Serif" size="18"> but no <font color=#ffffff>
However, you can't change the color with VLC while you can with other players. And, according to the users, it used to work before.

This is not a problem about ASS subtitles in MKV but about text subtitles in MP4.

Re: Subtitle preferences not working across all subtitles

Posted: 19 Jul 2022 09:54
by InTheWings
With TTXT, my choice could be to force the color, among other styling, like this:

Code: Select all

<TextSample sampleTime="00:00:24.000" sampleDescriptionIndex="1" xml:space="preserve"></TextSample> <TextSample sampleTime="00:00:25.000" sampleDescriptionIndex="1" xml:space="preserve">Italic text Two lines (1)<Style fromChar="0" toChar="25" styles="Italic " fontID="1" fontSize="18" color="ff ff ff ff"/> </TextSample> <TextSample sampleTime="00:00:29.000" sampleDescriptionIndex="1" xml:space="preserve"></TextSample> <TextSample sampleTime="00:00:30.000" sampleDescriptionIndex="1" xml:space="preserve">Italic text Two lines (2)<Style fromChar="0" toChar="11" styles="Italic " fontID="1" fontSize="18" color="ff ff ff ff"/> <Style fromChar="12" toChar="25" styles="Italic " fontID="1" fontSize="18" color="ff ff ff ff"/> </TextSample>

The default setting created by the conversion should be overridden, the forced one should not.
This is how other players behave and they are right.
You're focusing on "local styling" while the default color is *mandatory* because specified in the decoderconfigurationrecord for that codec.

- decoderconfigurationrecord default
--- local styling


Once you have herited from a default color, that is no longer a default.


And here MP4Box is wrong because it transforms global default color to local styling.

Re: Subtitle preferences not working across all subtitles

Posted: 19 Jul 2022 11:02
by Lotesdelere
I have posted these lines to expose the difference between no styling and forced styling after extraction by MP4Box. When there is no styling then only one arbitrary default line is created, but when there is forced styling then it appears in every line.

But keep the focus on the MP4 file at the source of the ticket, download it and please tell me where in this file is the subtitles color stored.
https://drive.google.com/file/d/1v94y6V ... sp=sharing

Here is another sample file:
https://trac.ffmpeg.org/raw-attachment/ ... btitle.mp4

Again, no styling at all in the subtitle of this file, so why I can't change the color of this text subtitle ? Why ?