Mpv: Cannot open any folders

Created on 4 Aug 2017  ·  9Comments  ·  Source: mpv-player/mpv

mpv version and platform

mpv 0.26.0-46-gdf12f76910
Windows 10, 64-bit

Reproduction steps

Drag a folder onto the mpv window, or open a folder from the command line.

Expected behavior

mpv plays all video files in the folder.

Actual behavior

mpv closes.

Log file

https://pastebin.com/raw/1UHMUh1y

It says permission denied but the same thing happens even if I run mpv as admin. The folders are entirely accessible to my account and if I open the actual videos inside the folders in mpv, they play just fine.

Most helpful comment

Copy the block below into a text editor replacing "C:\\Apps\\AV\\mpv\\mpv.exe\" with your own mpv.exe full path, save as a .reg file and merge. Hopefully it'll work as intended

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\background\shell\mpv]
@="Play all with mpv"

[HKEY_CLASSES_ROOT\Directory\background\shell\mpv\command]
@="\"C:\\Apps\\AV\\mpv\\mpv.exe\" \"%V\\*\""

[HKEY_CLASSES_ROOT\Directory\shell\mpv]
@="Play all with mpv"

[HKEY_CLASSES_ROOT\Directory\shell\mpv\command]
@="\"C:\\Apps\\AV\\mpv\\mpv.exe\" \"%L\\*\""

All 9 comments

This is normal. Use 'mpv *' or the Autoload script.
https://github.com/mpv-player/mpv/wiki/User-Scripts

Well I've read many times on different places on the internet that you can drag a folder onto the mpv window and it'll automatically enqueue all the files in it. Is that a unix specific thing then? Well if this is normal behavior then I'll close the issue, apologies.

A directory context menu like "play in mpv" as well as a directory menu background entrie can be used as a workaround. I have a .reg file with the commands if you're interested.

I am. Please post it.

Copy the block below into a text editor replacing "C:\\Apps\\AV\\mpv\\mpv.exe\" with your own mpv.exe full path, save as a .reg file and merge. Hopefully it'll work as intended

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\background\shell\mpv]
@="Play all with mpv"

[HKEY_CLASSES_ROOT\Directory\background\shell\mpv\command]
@="\"C:\\Apps\\AV\\mpv\\mpv.exe\" \"%V\\*\""

[HKEY_CLASSES_ROOT\Directory\shell\mpv]
@="Play all with mpv"

[HKEY_CLASSES_ROOT\Directory\shell\mpv\command]
@="\"C:\\Apps\\AV\\mpv\\mpv.exe\" \"%L\\*\""

It works. Shift+Q to save which file you were on works as well. Thanks!

What exactly is normal about being unable to play a directory on windows?! That seems like a bug to me

Yeah, agreed. This works in Linux, and it only doesn't work in Windows because of an API/CRT quirk where you have to pass a special flag to open directories. This should probably be fixed.

I wonder if we can use the unix subsystem on windows to open files using normal POSIX syscalls that work.

Was this page helpful?
0 / 5 - 0 ratings