You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat ~/.config/mpv/scripts/mpv.lua
local homedir = os.getenv("HOME")
local msg = require('mp.msg')
function something_handler()
msg.info(homedir)
end
mp.add_key_binding("x", "something", something_handler)
When pressed x, in terminal I can see: [mpv] /home/knoppix
It is OK for 'screenshot-directory' option, too:
$ mpv --no-config \
--script=~/.config/mpv/scripts/mpv.lua \
--image-display-duration=inf \
~/.config/mpv/szekelykapu-lego-720p.webp \
--screenshot-directory=~/mpv1
(+) Video --vid=1 (webp 1280x720 1.000fps)
error: XDG_RUNTIME_DIR not set in the environment.
VO: [gpu] 1280x720 yuv420p
V: 00:00:00 / 00:00:00 (0%) Cache: 0.0s
Screenshot: '/home/knoppix/mpv1/mpv-shot0001.jpg'
But not for 'external-file' option:
$ mpv --no-config \
--script=/home/knoppix/.config/mpv/scripts/mpv.lua \
--image-display-duration=inf \
Downloads/bbq-restaurant.webp \
--external-file=~/.config/mpv/szekelykapu-lego-720p.webp
[file] Cannot open file '~/.config/mpv/szekelykapu-lego-720p.webp': No such file or directory
Failed to open ~/.config/mpv/szekelykapu-lego-720p.webp.
Can not open external file ~/.config/mpv/szekelykapu-lego-720p.webp.
mpv manual: "Some mpv options interpret paths starting with ~" So, it seems that this is how mpv works: not all options can handle it. In my opinion this is not too logic...
Reproduction Steps
Define a path in your mpv.conf file like this:
external-file=~/.config/mpv/mpv.webp
Expected Behavior
Excepted behaviour would be that mpv will use the image...
Actual Behavior
mpv says that the file does not exist:
Can not open external file ~/.config/mpv/mpv.webp.
But if you give the path in the form
external-file=/home/USERNAME/.config/mpv/mpv.webp
, mpv will find the image file.The text was updated successfully, but these errors were encountered: