-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
ytdl_hook-ytdl_path does not expand-path ~~/ #15558
Comments
|
Thanks, I tested it and it works even without adding configuration as long as yt-dlp is placed in the portable_config directory This will be in the mpv.exe directory instead of the portable_config directory.
Using ~~/ will give an error
|
You can use this script mp.set_property('ytdl-raw-options', 'cookies=' .. mp.command_native({'expand-path', '~~/cookies.txt'})) or you can just use |
Does not work on Windows
It seems that the simplest way is to put yt-dlp and cookies in the directory where mpv.exe is located. |
For ytdl-raw-options=cookies="C:\Program Files\mpv\ytdl_cookies.txt" Extract cookies as described in the issue with an extension such as this one. |
Thanks, I know that using absolute paths for yt-dlp and cookies will work, but for a script developer, if all configurations and dependent programs can be placed in the portable_config directory, it will be easy for users to install and remove. |
cookies path also support environment variables. On linux, ~~/ is usually the same directory as ~/.config/mpv/, and ~/ is equivalent to $HOME/, so you can use In the same way, you can use But portable config is more popular with users on Windows, there's no good solution for it, you can set a MPV_HOME environment variable and use |
mpv Information
Other Information
Reproduction Steps
I want to set ytdl_hook-ytdl_path to a path relative to the mpv installation directory or config directory, but it doesn't seem to work
There is the following directory structure, yt-dlp.exe is placed in the portable_config directory
When setting both screenshot-template and ytdl_hook-ytdl_path, only ~~/ in screenshot-template is processed correctly
log
The source code seems to use the passed string directly without using expand-path
The cookie path may also contain ~~/
Expected Behavior
~~/
in ytdl_hook-ytdl_path is handled byexpand-path
Actual Behavior
ytdl_hook-ytdl_path
is treated as a normal stringLog File
log.txt
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.The text was updated successfully, but these errors were encountered: