mpv-player / mpv-player/mpv

--sub-ass-style-overrides not applied when --sub-ass-override is set to force

Open
#14,800 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:option-param-conf core:subtitle
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv Information
mpv v0.38.0-744-gdb19dbca5c-dirty Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Sep  4 2024 18:15:34
libplacebo version: v7.349.0 (v7.349.0-9-gefb89342)
FFmpeg version: n7.0.2
FFmpeg library versions:
   libavcodec      61.3.100
   libavdevice     61.1.100
   libavfilter     10.1.100
   libavformat     61.1.100
   libavutil       59.8.100
   libswresample   5.1.100
   libswscale      8.1.100
Other Information
- macOS version: macOS 13.6.9 (22G830)
- Source of mpv: Local build using `mpv-build` of `master` @ db19dbca5cd2fce2189005ca1ebbfd4e0467efae
- Introduced in version: unknown
Reproduction Steps
  • Download the attached big_buck_bunny.ass.txt file
  • Rename it to big_buck_bunny.ass
  • Copy some video to big_buck_bunny.mp4 to match up with subtitle file
  • Play the video with --sub-ass-style-overrides=FontName=Wingdings --sub-ass-override=scale
  • Play the video with --sub-ass-style-overrides=FontName=Wingdings --sub-ass-override=force
  • Notice the font is not applied with --sub-ass-override set to force
Expected Behavior

I'm expecting that sub-ass-style-overrides overrides ASS style when sub-ass-override is set to anything other than no.

From the mpv manual entry for the sub-ass-override option:

  • no: Render subtitles as specified by the subtitle scripts, without overrides.
  • yes: Apply all the --sub-ass-* style override options. Changing the default for any of these options can lead to incorrect subtitle rendering (default).
  • scale: Like yes, but also apply --sub-scale.
  • force: Like yes, but also force all --sub-* options. Can break rendering easily.
  • strip: Radically strip all ASS tags and styles from the subtitle.
Actual Behavior

With --sub-ass-override set to yes or scale --sub-ass-style-overrides overrides ASS style. But when --sub-ass-override is set to force or strip --sub-ass-style-overrides is ignored.

With --sub-ass-override=no:

mpv/build/mpv --no-config --autofit=2048 --pause --start=1:08 --sub-ass-style-overrides=FontName=Wingdings --sub-ass-line-spacing=100 --sub-ass-override=no ~/Movies/big_buck_bunny.mp4

no

With --sub-ass-override=yes the font override is applied as well as the line spacing:

mpv/build/mpv --no-config --autofit=2048 --pause --start=1:08 --sub-ass-style-overrides=FontName=Wingdings --sub-ass-line-spacing=100 --sub-ass-override=yes ~/Movies/big_buck_bunny.mp4

yes

With --sub-ass-override=scale it looks just like --sub-ass-override=yes.

With --sub-ass-override=force the font override is not applied, the line spacing is still overridden:

mpv/build/mpv --no-config --gpu-debug  --log-file=output.txt --autofit=2048 --pause --start=1:08 --sub-ass-style-overrides=FontName=Wingdings --sub-ass-line-spacing=100 --sub-ass-override=force ~/Movies/big_buck_bunny.mp4

force

With --sub-ass-override=strip the font override is not applied, the line spacing is still overridden:

mpv/build/mpv --no-config --autofit=2048 --pause --start=1:08 --sub-ass-style-overrides=FontName=Wingdings --sub-ass-line-spacing=100 --sub-ass-override=strip ~/Movies/big_buck_bunny.mp4

strip

Log File

output.txt

Sample Files

big_buck_bunny.ass.txt

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file or test. Reproduce the provided ASS subtitle case with --sub-ass-style-overrides and each --sub-ass-override mode, then trace the subtitle option handling for those options. Done means style overrides remain applied with force and strip as expected, while existing yes and scale behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.