mpv-player / mpv-player/mpv

ASS subtitles break when the texture atlas gets too large

Open
#6,286 14 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

mpv version and platform

Arch Linux, 3770k, RX 580

mpv 0.29.1 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
 built on Fri Oct  5 08:08:09 CEST 2018
ffmpeg library versions:
   libavutil       56.14.100
   libavcodec      58.18.100
   libavformat     58.12.100
   libswscale      5.1.100
   libavfilter     7.16.100
   libswresample   3.1.100
ffmpeg version: n4.0.3
Reproduction steps

Play a file with large ASS signs, at a high resolution (I can reproduce this on my 4k monitor in full screen but not in a smaller ~1080p window).

Expected behavior

Sign renders correctly, even if that would cause stutter (or skip only the offending sign).

Actual behavior

Video stutters for a split second, subtitles stop rendering for the remainder of this mpv session.

Notes

The most reliable workaround I've found for now is to use blend-subtitles=video, since that forces rendering at the video's lower resolution, but that isn't ideal.
force-rgba-osd-rendering does allow the signs to render correctly but performance takes a huge hit, even at lower resolutions.
Seeking past the sign in question before it shows up prevents the problem from being triggered.

Log file

I didn't see anything of interest in the log but I can provide one if absolutely necessary.

Sample files

[Asenshi-GJM-PAS] SSSS.GRIDMAN - 04 [518F25EE].mkv at around 8:50 (not sure if it's okay to post this here, will remove if asked), ASS file here
Various other anime releases with signs are affected as well.

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 failure with the linked ASS file at the reported 4K playback point, then compare normal rendering with blend-subtitles=video and force-rgba-osd-rendering. Done means large ASS signs render without disabling subtitles for the rest of the session, while avoiding the reported performance hit where possible.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-graphics
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.