mpv-player / mpv-player/mpv

Player stutter and crashes when trying to render slanted and moving text with stroke outline

Open
#9,986 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Important Information

mpv version

mpv 0.34.0-230-g7ac4b7dfe7 Copyright © 2000-2022 mpv/MPlayer/mplayer2 projects
 built on Sun Mar 13 13:37:57 +08 2022
FFmpeg library versions:
   libavutil       57.23.100
   libavcodec      59.23.100
   libavformat     59.18.101
   libswscale      6.5.100
   libavfilter     8.27.100
   libswresample   4.4.100
FFmpeg version: git-2022-03-13-546afd0d

windows version

Microsoft Windows 10 Pro
Version	10.0.19042 Build 19042
Reproduction steps

Playback any video using the ASS subtitle file attached and --no-config argument.

Based on testing the usage of \frx45 for slanted text, \move for moving text, and a custom style together is the cause of this issue.

Expected behavior

Player should render moving, slanted, & styled subtitles and not crash.

Actual behavior

The playback stutters to a halt and eventually crashes while trying to render subtitles.
It can be worked around by seeking past the timestamp of the problematic subtitle.

Log file

https://pastebin.com/1Fy4MKj3

Sample files

ASS subtitle

[Script Info]
Title: English (US)
Original Translation: 
Original Editing: 
Original Timing: 
Synch Point: 
Script Updated By: 
Update Details: 
ScriptType: v4.00+
Collisions: Normal
PlayResX: 640
PlayResY: 360
WrapStyle: 0
ScaledBorderAndShadow: yes

[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: sign_7804_84_____Episode_1___,Trebuchet MS,25,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,4,0,8,30,30,20,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:02.00,sign_7804_84_____Episode_1___,sign,0,0,0,,{\frx45\move(320,70,320,44)\q2\t(\fscx85\fscy80}— Episode 9 —\N\N{\fs26}The Rotting but Heroic Figures\N\N{\fs28}of Ancient Souls of the Dead that\N\N{\fs30}Congregate in the Abyss Find a\N\N{\fs30}Ray of Hope in the Darkness from\N\N{\fs30}Pride Pulled from Another Time

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 playback on Windows with the supplied ASS subtitle and --no-config, then inspect the linked log for the subtitle-rendering failure. Confirm that the moving, slanted, styled text no longer stutters or crashes, while using seeking past the subtitle as a comparison.

Written by the indexing model from the issue text.

Assessment

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