youtube-dl usage
mouse 153 · person cloud · link
Last update
2019-07-02
2019
07-02
« — »
1
2
3
4
5
6
7
# download/upgrade
curl -L -o ~/bin/youtube-dl https://yt-dl.org/downloads/latest/youtube-dl

# build from source repo
git clone https://github.com/ytdl-org/youtube-dl.git
cd youtube-dl
make clean && make
1
2
3
4
5
6
7
8
9
10
# to parse a playlist use "--yes-playlist url" or simply "playlist_id"

# downoload a playlist audio only
youtube-dl -i -o "%(title)s.%(ext)s" \
  -f bestaudio --extract-audio --audio-format mp3 --audio-quality 2 \
  <playlist_id>

# download a specific combination of audio and video in a single file
youtube-dl -F <url> # detect desired format codes
youtube-dl --merge-output-format mkv -f <code1>+<code2> <url>

Source: youtube-dl hp, stackoverflow.com, askubuntu.com