Youtube-dl - different config file for video & audio?

Is it possible to pass a specific config file to youtube-dl without writing all arguments in command line?

Right now I'm using AHK to input in PowerShell for video

youtube-dl.exe -o '%(playlist_index)s. %(title)s.%(ext)s' -i -f mp4 --write-sub --sub-lang en --yes-playlist ''

and for audio

youtube-dl.exe --extract-audio --audio-format mp3 --audio-quality 0 ''

Today I wrote the config file in ...Roaming\youtube-dl\config.txt using video arguments. But sometimes I want to download only the audio format, sometimes I wonder if there is a way to have 2 config.txt files one for audio and one for video.


Solution 1:

I wonder if there is a way to have 2 config.txt files one for audio and one for video?

You can use the --config-location option and have 2 different files, for example video.cfg and audio.cfg. Make sure you specify the full path to the file:

--config-location PATH               Location of the configuration file;
                                     either the path to the config or its
                                     containing directory.

Source: youtube-dl/README.md at master · ytdl-org/youtube-dl · GitHub