Youtube-dl
De Linuxmemo.
Version du 16 janvier 2020 à 14:52 par Linuxmemo (discuter | contributions)
https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl
Sommaire |
Install
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl
Liste des formats dispo
youtube-dl -F "https://www.youtube.com/watch?v=xxxxxxxx" [youtube] xxxxxxxx: Downloading webpage [youtube] xxxxxxxx: Downloading video info webpage [info] Available formats for xxxxxxx: format code extension resolution note 249 webm audio only DASH audio 57k , opus @ 50k, 1.24MiB 250 webm audio only DASH audio 75k , opus @ 70k, 1.63MiB 140 m4a audio only DASH audio 127k , m4a_dash container, mp4a.40.2@128k, 2.93MiB ...
Choix du format
youtube-dl -f 251 "https://www.youtube.com/watch?v=xxxxxxxx" youtube-dl -f best "https://www.youtube.com/watch?v=xxxxxxxx"
Audio only
./youtube-dl -x --audio-format flac "https://www.youtube.com/watch?v=xxxxxxxx"
Specify audio format: "best", "aac", "flac", "mp3", "m4a", "opus", "vorbis", or "wav"; "best" by default; No effect without -x
Destination
Use the -o option with youtube-dl to manually give a location for the downloaded files:
youtube-dl -o "~/Desktop/%(title)s.%(ext)s" 'youtube file url'
and of course substitute your actual url for 'youtube file url'. This example sends the completed download to your Desktop.
Create a configuration file for youtube-dl as follows:
touch ~/.config/youtube-dl.conf
Then set a default download location in this file:
--output "~/Desktop/%(title)s.%(ext)s"