mpv-player / mpv-player/mpv

Emit an error if a long path is encountered but Windows long path support is not turned on in the Registry

Open
#13,155 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Important Information

Provide following Information:

  • mpv version - current head after https://github.com/mpv-player/mpv/pull/13134 merged
  • Windows Version - any
  • Source of the mpv binary - n/a
  • If known which version of mpv introduced the problem - n/a
  • GPU model, driver and version - n/a
  • Possible screenshot or video of visual glitches - n/a

If you're not using git master or the latest release, update.
Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

Try to reproduce your issue with --no-config first. If it isn't reproducible
with --no-config try to first find out which option or script causes your issue.

Describe the reproduction steps as precise as possible. It's very likely that
the bug you experience wasn't reproduced by the developer because the workflow
differs from your own.

Create folder called C:\a and put a file called x.mp4 in there. Then, rename the file in Windows Explorer to make the name as long as possible (just hold x until Windows starts beeping). Then, go up and rename the folder so the name is as long as possible.

Open the file in mpv. mpv should be able to play the file.

Turn off Windows long path support according to this article:

Either delete the key Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled or set it to 0.

Reboot

Open the file in mpv

mpv will be unable to open the file

No error explaining why the file hasn't been able to opened is shown in the log.

Expected behavior

Check the path length and on paths that are too long emit an error that instructs the user to enable Long Path Support in the Registry and directing them to this URL: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

Possibly include the PowerShell command so people can just copy-paste it into PowerShell. Alternatively tell people to create a .reg file and double-click it.

See discussion here: https://github.com/mpv-player/mpv/pull/13134

Actual behavior

No error is provided.

Log file

Make a log file made with -v -v or --log-file=output.txt, attach it to
the issue, and replace this text with a link to it.

Without the log file, this issue will be closed for ignoring the issue template.

In the case of a crash, please provide a backtrace.

N/A

Sample files

Sample files needed to reproduce this issue can be attached to the issue
(preferred), or be uploaded to https://0x0.st/ or similar sites.
(Only needed if the issue cannot be reproduced without it.)
Do not use garbage like "cloud storage", especially not Google Drive.

N/A

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 long-path failure on Windows with LongPathsEnabled disabled, then trace mpv's existing file-opening error handling. Done means an overlong path produces a clear log error directing users to enable Windows Long Path Support and the linked Microsoft documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.