You are not logged in.
Pages: 1
I know that I can put:
[extension.mp3]
option=value
in ~/.mpv/config so the profile will be activated when i play any mp3 file. Does anyone knows if same can be done for all audio/video files in a specific directory, let's say /media/disk1? I've been searching this all over internet but couldn't find one.
Thanks,
Offline
File-specific Configuration Files
You can also write file-specific configuration files. If you wish to
have a configuration file for a file called 'movie.avi', create a file
named 'movie.avi.conf' with the file-specific options in it and put it
in ~/.mpv/. You can also put the configuration file in the same direc‐
tory as the file to be played, as long as you give the
--use-filedir-conf option (either on the command line or in your
global config file). If a file-specific configuration file is found in
the same directory, no file-specific configuration is loaded from
~/.mpv. In addition, the --use-filedir-conf option enables direc‐
tory-specific configuration files. For this, mpv first tries to load
a mpv.conf from the same directory as the file played and then tries
to load any file-specific configuration.
I'm not sure if it's recursive.
Offline
Also you can create shell-wrapper which will check files directory and launch mpv with required profile. E.g:
mpv-custom () {
[ "$#" -ne 1 ] && echo 'Usage: mpv-custom <file>' && return
file_name="${1}"
full_name=`readlink -f $file_name`
if [[ $full_name == /media/disk1* ]];
then
mpv --profile=my-profile "${1}"
else
mpv "${1}"
fi
}^^^ I've not ran that code.
Offline
Pages: 1