Fix loading subs in mpv
This commit is contained in:
parent
de327d2a68
commit
1b798e514b
|
@ -12,9 +12,20 @@
|
|||
#mpris
|
||||
# TODO: thumbfast
|
||||
packages.mpv-webm # activate with SHIFT+w
|
||||
# from https://github.com/mpv-player/mpv/issues/9767#issuecomment-1024831645
|
||||
({ scriptName = "dynamic-subs.lua"; } // (pkgs.writeTextDir "share/mpv/scripts/dynamic-subs.lua" ''
|
||||
mp.add_hook('on_load', 10, function()
|
||||
sub_paths = {'Subs'}
|
||||
sub_paths[#sub_paths+1]='Subs/' .. mp.get_property('filename/no-ext')
|
||||
mp.set_property_native('sub-file-paths', sub_paths)
|
||||
end)
|
||||
''))
|
||||
];
|
||||
#programs.mpv.config.osc = "no"; # likely a 'thumbnail' requirement
|
||||
|
||||
# dynamic-subs.lua
|
||||
programs.mpv.config.sub-auto = "all";
|
||||
|
||||
#https://nixos.wiki/wiki/Accelerated_Video_Playback
|
||||
programs.mpv.config.hwdec = "auto-safe";
|
||||
programs.mpv.config.vo = "gpu";
|
||||
|
|
Loading…
Reference in New Issue