mpv-player / mpv-player/mpv

`blend-subtitles=yes` breaks subtitles when using `video-crop`

Open
#13,423 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

Important Information

Provide following Information:

  • mpv version: master
  • Platform and Version: Arch Linux
  • Source of the mpv binary: own build
  • If known which version of mpv introduced the problem: f3f1a79fe3ad9bdae344559ec5802c184af41112; i.e. addition of video-crop
  • GPU model, driver and version: N/A
  • Possible screenshot or video of visual glitches: N/A
Reproduction steps/Actual behaviour

Download the example video files.

  • 816p-native.mkv - 1920x816 video
  • 1080p-crop.mkv - 1920x816 video (cropped from 1920x1080 using Matroska PixelCrop properties)
  • 1080p-crophalf.mkv - 1920x948 (cropped from 1920x1080 using Matroska PixelCrop properties)
  • 1080p-native.mkv - 1920x1080 (no crop applied, can apply yourself with video-crop, will behave the same)
Inconsistent SRT font size
  1. Set blend-subtitles=yes
  2. Play 816p-native.mkv video
  3. Play 1080p-crop.mkv video, font size is smaller than 816p-native.mkv
Cropped ASS text
  1. Set blend-subtitles=yes and sid=2
  2. Play 816p-native.mkv video, text appears correctly
  3. Play 1080p-crop.mkv video, text is not visible
  4. Play 1080p-crophalf.mkv video, text is half cropped and not blended with video
Expected behaviour
Inconsistent SRT font size

816p-native.mkv and 1080p-crop.mkv should have the same font size.

Cropped ASS text

816p-native.mkv, 1080p-crop.mkv should look the same.

1080p-crop.mkv with blend-subtitles=no looks identically to 816p-native.mkv with blend-subtitles=yes

(not sure how 1080p-crophalf.mkv should look like regardless of the blend-subtitles)

Log file

Zipped logs of all test runs

Sample files

(UPDATED)
Zipped example Matroska files

Contents of the 816p ASS subtitles muxed in
[Script Info]
ScriptType: v4.00+
PlayResX: 1920
LayoutResX: 1920
LayoutResY: 816
PlayResY: 816
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.709

[V4+ Styles]
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,70,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,Consistency goes brrrrrr
Contents of the 1080p ASS subtitles muxed in
[Script Info]
ScriptType: v4.00+
PlayResX: 1920
LayoutResX: 1920
LayoutResY: 1080
PlayResY: 1080
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.709

[V4+ Styles]
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,70,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:10.00,Default,,0,0,0,,Consistency goes brrrrrr

Screenshots

Inconsistent SRT font size
816p-native.mkv with blend-subtitles=yes

Subtitles with correct size

1080p-crop.mkv with blend-subtitles=yes

Subtitles with smaller size

Cropped ASS text
816p-native.mkv with blend-subtitles=yes

Subtitles being correctly positioned

1080p-crop.mkv with blend-subtitles=yes

Subtitles being cropped out

1080p-crophalf.mkv with blend-subtitles=yes

Subtitles being half cropped out


816p-native.mkv with blend-subtitles=no

Subtitles being correctly positioned

1080p-crop.mkv with blend-subtitles=no

Subtitles being correctly positioned

1080p-crophalf.mkv with blend-subtitles=no

Subtitles being stretched out

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

Start by reproducing the issue with the sample files in examples-v2.zip, comparing blend-subtitles=yes and no with video-crop applied. Trace the entry points for the blend-subtitles and video-crop options, then verify that cropped and native videos produce consistent SRT sizing and correctly positioned ASS subtitles.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.