Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unreasonable handling of long filename #9135

Closed
hooke007 opened this issue Aug 18, 2021 · 4 comments
Closed

unreasonable handling of long filename #9135

hooke007 opened this issue Aug 18, 2021 · 4 comments
Labels

Comments

@hooke007
Copy link
Contributor

Important Information

Provide following Information:

  • mpv version
  • 20210815
  • Windows Version
  • 20h2
  • Source of the mpv binary
  • shinchiro
  • If known which version of mpv introduced the problem
  • Possible screenshot or video of visual glitches
    Snipaste_2021-08-18_19-33-15

Reproduction steps

just open the files which has long file names and see the osd filename.
Some long filenames cannot be handle normally.

Expected behavior

filenames couldn't be cut or early truncated

Actual behavior

the picture posted previously.

Log file

I'll post it if needed.

Sample files

example filenames:
[aaaaaaa&bbbbbbb][ccccccc dd eeeee][00][1080p][xx][kkk].mp4
aaaaa.bbbbb.cccccc.1996.bluray.1080p.x265.10bit.8audio.10subs.mp4

hooke007 referenced this issue in hooke007/MPV_lazy Aug 18, 2021
弹出文本过大会在奇怪的地方截断换行
@avih
Copy link
Member

avih commented Aug 23, 2021

I don't really understand what the issue is.

I think you mean this?

  • With some file names, there's no word-wrap (first screenshot) but you expect it to word-wrap.
  • With some other file names, it does word-wrap (second screenshot) but you expect it to NOT word wrap.

It's not clear to me what "normal" means to you and how you expect it to look instead for each of the file-names you gave as example.

If that's not what you meant, you can try explaining again, one issue at a time:

  • I do this and that.
  • The result is (screenshot).
  • But I expect it to look like this (describe exacty).

Either way, libass is responsible for word-wrap, and the wrap happens if there's a space or other characters which allow word-wrap according to Unicode. This means that some filenames cannot be word-wrapped (if they don't have spaces), while other file-names will get word-wrapped if they contain spaces.

That's normal behavior with word wrapping, and even if it wasn't, mpv doesn't have much to do about it. It appears that all the libass word-wrapping modes don't break the line if there are no spaces.

You can try smaller font size if you have very long file names, using --osd-font-size - https://mpv.io/manual/master/#options-osd-font-size

@avih avih closed this as completed Aug 23, 2021
@hooke007
Copy link
Contributor Author

expectation:
Snipaste_2021-08-23_18-35-08

libass is responsible for word-wrap

And it seems there is nothing can do here.

@avih
Copy link
Member

avih commented Aug 23, 2021

expectation:

Thanks, at least it's now clear what you meant.

For the first screenshot, I think it's a reasonable expectation, however, as mentioned, libass currently doesn't support word wrap for lines without any spaces.

For the second screenshot, I'm not sure. Word-wrap (in any editor or web browser) always breaks the line on spaces before it breaks in places without spaces. So I think libass does the right thing in this case.

@hooke007
Copy link
Contributor Author

Thanks for your explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants