Youtube-dl
De Linuxmemo.
Version du 21 janvier 2020 à 12:58 par Linuxmemo (discuter | contributions)
https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl
Sommaire |
Install
git clone https://github.com/ytdl-org/youtube-dl.git youtube-dl.git sudo apt-get install python-dev python-pip sudo pip install youtube-dl ./youtube-dl/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"
"--audio-format" Specify audio format: "best", "aac", "flac", "mp3", "m4a", "opus", "vorbis", or "wav"; "best" by default; No effect without -x
./youtube-dl -a /home/user/ID-OnlyInFile.txt -x --audio-format mp3
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"