Support for stupidly long file paths/names.
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Important Information
Provide following Information:
- mpv version > mpv 0.33.0
- Windows Version > 10.0.19043 N/A Build 19043
- Source of the mpv binary >
- If known which version of mpv introduced the problem > all?
- Possible screenshot or video of visual glitches > n/a
Reproduction steps
Have mpv set as the default application for .mkv files.
Double-click on SuperLongFileName.mkv that is at least 205 total characters in length including the file extension.
Watch the video file until you get where you want to take a screenshot then pause the video with the spacebar.
Push the s key.
Receive the on-screen error message of "Error writing screenshot!".
Cry.
Expected behavior
With the Below screenshot options, it should use the extended-length path limit of 32,767 characters.
screenshot-directory="\?\T:\Screen Caps"
screenshot-template=vlcsnap-%f-TimeStamp-%P-Date-%ty-%tm-%td-%tHh%tMm%tSs
Actual behavior
I get "Error writing screenshot!" and my butt becomes hurt. I am assuming that it is running into the default legacy Win32 APIs only support up to 260 characters sanity check somewhere, guessing for windows 7/8/8.1 support.
I have validated that this does work with the above config if the file name is only 105 total characters in length including the file extension.
Log file
cplayer: Using zimg.
reload: demuxer_cache.transition fetch_to_stale {"in_state_time" = 0, "name" = "stale", "demuxer_cache_time" = 121.74209977}
cplayer: Error opening '\?\T:\Screen Caps/SuperLongFileName.mkv-TimeStamp-00_00_04.713-Date-23-04-05-18h15m46s.png' for writing!
cplayer: Error writing screenshot!
statusline: (Paused) AV: 00:00:04 / 00:23:45 (0%) A-V: 0.000025 Vb: 5.313 mbps Ab: 128 kbps
Sample files
Any mkv file name with 205 total characters in length or more including the file extension.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction steps and the logged failing output, then trace mpv's Windows handling of screenshot-directory and screenshot-template. Done means screenshots can be written for the reported long .mkv path using the extended-length path configuration, without the "Error writing screenshot!" message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100