Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sub-bold not applying with sub-ass-override=force #15773

Open
6 tasks done
BanchouBoo opened this issue Jan 30, 2025 · 6 comments
Open
6 tasks done

sub-bold not applying with sub-ass-override=force #15773

BanchouBoo opened this issue Jan 30, 2025 · 6 comments
Labels

Comments

@BanchouBoo
Copy link

BanchouBoo commented Jan 30, 2025

mpv Information

mpv v0.39.0-706-g72d976b3c1 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 6.1.2
FFmpeg library versions:
   libavcodec      60.31.102
   libavdevice     60.3.100
   libavfilter     9.12.100
   libavformat     60.16.100
   libavutil       58.29.100
   libswresample   4.12.100
   libswscale      7.5.100

Other Information

- Linux version: Gentoo
- Kernel Version: Linux navi 6.6.67-gentoo-dist #1 SMP PREEMPT_DYNAMIC Tue Jan 14 21:57:48 EST 2025 x86_64 AMD Ryzen 5 5600 6-Core Processor AuthenticAMD GNU/Linux
- GPU Model: AMD Radeon RX 590
- Mesa/GPU Driver Version: Mesa 24.3.3
- Window Manager and Version: dwm
- Source of mpv: Installed mpv-9999 (git master branch) from system package manager
- Latest known working version: 0.38.0
- Issue started after the following happened: After updating mpv

Reproduction Steps

Set sub-bold to yes and sub-ass-override to force on a video with ASS subtitles that are not already bold in the ASS styling.

Expected Behavior

The subtitles should be forced bold.

Actual Behavior

The subtitles are not forced bold, instead matching the bold style defined in the ASS styling. Note that it does work as expected with sub-ass-override set to strip.

The inverse is NOT true however, if the subs are bold in the ASS styling, setting sub-bold to no will properly render the subtitles unbolded.

Log File

output.txt

Sample Files

clip.mkv.zip

I carefully read all instruction and confirm that I did the following:

  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.
@llyyr
Copy link
Contributor

llyyr commented Jan 30, 2025

d02f03b prevents bold/italics/underline from working on ASS subtitles. Because they often just end up destroying the subtitle and you're better off using strip instead.

What is the use case here?

@kasper93
Copy link
Contributor

So how do you override ass sub if --sub-ass-override=force is not working?

@llyyr
Copy link
Contributor

llyyr commented Jan 30, 2025

override ass sub

You can override it, just not set bold, italics or underline. I can add it as another option, but I'd be very surprised if there's a good reason to do this. If the subs are simple enough that it won't destroy the subtitles if you turn everything bold, then strip will suffice. In every other case, bold will destroy the subtitles.

That's why I asked what the use case is, I don't mind adding an option if there's a good reason to make typesetting bold for example.

@BanchouBoo
Copy link
Author

I've never had any problem with bold breaking subtitles before. I prefer to use my own chosen font for most things and I like to have that font bolded.

Strip is not an alternative, because that also strips things like subtitles for signs, karaoke subs, etc. whereas previously I could use sub-bold to make the main subtitles bold without ruining the rendering of those other subtitle styles.

The docs already warn that force can potentially break rendering easily, and the whole point of forcibly overriding subtitle rendering like that is to make them look how I want without completely removing all existing styling, so I feel like the cases where forcing bold (or italics or underlines) does break rendering (I'd be curious to see examples of this if you have any) should be acceptable, since breakage is not an unexpected outcome from messing with styling in the first place, if somebody wants to avoid potential rendering issues then they'd be better off not overriding the rendering in any way, and if it does break from bold/italics/underline, they can simply turn those things off themselves already. Perhaps instead an addition to the docs that explains the kind of breakage these settings can cause when forced so people can easily diagnose it and turn it off themselves when they encounter it would be good.

@llyyr
Copy link
Contributor

llyyr commented Jan 31, 2025

Bold or italics or underline are used to emphasize a word or dialogue, it's rarely used for every line in a subtitle file. If you like how a font looks with bold, consider picking a variant of the font with higher weight.

The docs already warn that force can potentially break rendering easily

The docs need to change, the option has never been about applying every option unconditionally. See commit 2f1eb49 for example, which prevented sub-pos from working with force.

if it does break from bold/italics/underline, they can simply turn those things off themselves already

It doesn't work this way. The default value for each option is passed to libass, so if you set sub-bold=no nothing will be bolded even if the subtitle file has everything as bold.

Anyway, i don't mind introducing an option to reenable this but the use case is questionable to me.

@BanchouBoo
Copy link
Author

Bold or italics or underline are used to emphasize a word or dialogue, it's rarely used for every line in a subtitle file. If you like how a font looks with bold, consider picking a variant of the font with higher weight.

Not an option without modifying the font unfortunately, although I only use the font for mpv so I guess that'd be fine.

It doesn't work this way. The default value for each option is passed to libass, so if you set sub-bold=no nothing will be bolded even if the subtitle file has everything as bold.

Really? I tested this on one file and it remained bold even with sub-bold=no, although the file applied the bold globally to the font so maybe that works differently.

In any case, since this isn't a bug like I thought it was feel free to close this. I'm generally of the mind that more control over how things work is a good thing so I would appreciate the option, but I'll manage regardless so you should do what you think is best, I'm likely an outlier in caring about this anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants