Professional Documents
Culture Documents
Youtube-Dl - ArchWiki
Youtube-Dl - ArchWiki
Youtube-Dl - ArchWiki
youtube-dl
youtube-dl (https://yt-dl.org) is a command-line program that lets you easily Related articles
download videos and audio from more than a thousand websites. See the list (h
ttps://github.com/ytdl-org/youtube-dl/blob/master/docs/supportedsites.md) mpv
of supported sites.
FFmpeg
Contents
Installation
Configuration
Usage
Format selection
Extract audio
Subtitles
Tips and tricks
Faster downloads
Playlist
Trim (partial download)
URL from clipboard
See also
1 Installation
Install the youtube-dl (https://archlinux.org/packages/?name=youtube-dl)
package, or youtube-dl-git (https://aur.archlinux.org/packages/youtube-dl-gi
t/)AUR for the development version. It is recommended to also install FFmpeg as it is used for muxing for
some sites. See the optional dependencies.
2 Configuration
The system-wide configuration file is /etc/youtube-dl.conf and the user-specific configuration
file is ~/.config/youtube-dl/config . The syntax is simply one command-line option per line.
Example configuration:
https://wiki.archlinux.org/title/Youtube-dl 1/4
9/20/22, 11:00 AM youtube-dl - ArchWiki
--ignore-errors
# --no-playlist
# Save in ~/Videos
-o ~/Videos/%(title)s.%(ext)s
-f bestvideo[ext=mp4][width<2000][height<=1200]+bestaudio[ext=m4a]/bestvideo[ext=webm][width<2000][heigh
t<=1200]+bestaudio[ext=webm]/bestvideo[width<2000][height<=1200]+bestaudio/best[width<2000][height<=120
0]/best
3 Usage
See youtube-dl(1) (https://man.archlinux.org/man/youtube-dl.1) for the manual.
Tip: In some cases (like YouTube) URL can be substituted with the video ID.
$ youtube-dl -F URL
Depending on the available source streams, this will often correct the audio-only container. If an audio-only
stream is not available, exclude -f bestaudio from the example above. This will download the video
and copy its audio as post process. By default this will remove the downloaded video, include -k to keep
it.
https://wiki.archlinux.org/title/Youtube-dl 2/4
9/20/22, 11:00 AM youtube-dl - ArchWiki
3.3 Subtitles
To see which languages are available:
4.2 Playlist
Using youtube-dl for a playlist usually boils down to the following options:
This set of options allow for the download to effectively continue even after interruption. If you are
archiving, add the usual --write-xxx and --embed-xxx options you may have.
https://wiki.archlinux.org/title/Youtube-dl 3/4
9/20/22, 11:00 AM youtube-dl - ArchWiki
5 See also
GitHub repository (https://github.com/ytdl-org/youtube-dl) for documentation.
Content is available under GNU Free Documentation License 1.3 or later unless otherwise noted.
Privacy policy
About ArchWiki
Disclaimers
https://wiki.archlinux.org/title/Youtube-dl 4/4