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.