mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.55k stars 2.92k forks source link

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

Open Mushymato opened 2 years ago

Mushymato commented 2 years ago

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
Traneptora commented 2 years ago

I can't reproduce this on Linux, although it's very possibly a windows-only bug. Does it fail if you run:

mpv --no-config av://lavfi:testsrc2 --sub-file=sub.ass

where sub.ass is the file you provided?

hooke007 commented 2 years ago

where is the file you provided?

The contents he posted.

[Script Info]
....
Traneptora commented 2 years ago

Update: I can reproduce this on Linux with a video, but not with av://lavfi:testsrc2 which means it's probably not a windows-specific issue.