This article discusses how to specify and change the default download directory for the yt-dlp video downloader. It provides step-by-step instructions on using command-line options and creating a configuration file to set a permanent download locatio
To specify a different directory for yt-dlp to download videos to, use the --output
or -o
command-line option followed by the desired directory path. For example, to download videos to the /home/user/Downloads/yt-dlp
directory, run the following command:
<code>yt-dlp --output /home/user/Downloads/yt-dlp <video URL></code>
Yes, you can set a permanent download location for yt-dlp by creating a configuration file. The configuration file should be named config.ini
and placed in the ~/.config/yt-dlp
directory. In the configuration file, add the following line:
<code>--output <desired directory path></code>
For example, to set the permanent download location to /home/user/Downloads/yt-dlp
, add the following line to the configuration file:
<code>--output /home/user/Downloads/yt-dlp</code>
To change the default download path used by yt-dlp, use the --default-path
command-line option followed by the desired directory path. For example, to set the default download path to /home/user/Downloads/yt-dlp
, run the following command:
<code>yt-dlp --default-path /home/user/Downloads/yt-dlp <video URL></code>
Note that this will only change the default download path for the current session. To permanently change the default download path, follow the instructions in the previous section to create a configuration file.
Atas ialah kandungan terperinci bagaimana untuk menukar lokasi muat turun yt-dlp. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!