mpv-player / mpv

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

Subtitles without spaces do not break to a new line when overfull #7158

Closed svenper closed 5 years ago

svenper commented 5 years ago

mpv version and platform

mpv 0.30.0 Copyright © 2000-2019 mpv/MPlayer/mplayer2 projects
 built on Mon Nov 11 15:23:10 UTC 2019
ffmpeg library versions:
   libavutil       56.31.100
   libavcodec      58.54.100
   libavformat     58.29.100
   libswscale      5.5.100
   libavfilter     7.57.100
   libswresample   3.5.100
ffmpeg version: 4.2.1

Void Linux linux 5.3.11 musl 1.1.24

Reproduction steps

Expected behavior

Subtitle lines without spaces (Chinese, Japanese, etc.) wrap automatically when too long.

Actual behavior

Such lines extend outside the window, with characters cropped.

Log file

mpv.log

Sample files

Akemi commented 5 years ago

report it to libass. i downloaded the vtt subs and converted them to ass with ffmpeg.

ffmpeg -i 17-1143425v.zh.vtt sub.ass

the result. .txt extension instead of .ass because github only allows text files with txt extension. add those subs to the libass issue. sub.txt

Akemi commented 5 years ago

closing since it was reported upstream.

escape0707 commented 1 year ago

This seems solved by both libass and the shown PR. But I think I'm facing this issue again with some long Japanese subtitles I generated from OpenAI/Whisper. Could it be that I'm using gpu-next? Maybe I should submit a separate issue report?

llyyr commented 1 year ago

Could it be that I'm using gpu-next?

I don't see why this would affect anything, but you could simply switch to vo=gpu to confirm...

escape0707 commented 1 year ago

I just gave it a try with vo=gpu and yes, the subtitles are still not getting separated into multiple lines... I'm using mpv-git on Arch Linux, so I guess the fixes should have been included. And the undesired behavior also appears for me with mpv-android.

llyyr commented 1 year ago

Open a new issue with samples and follow the template