Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
yt-dl [2025/09/24 16:56] – créée tutospisto | yt-dl [2025/09/24 17:13] (Version actuelle) – tutospisto | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Prise de notes rapide ^^ | + | ====== Youtube DL (yt-dlp) ====== |
- | cd "C:\yt-dlp" | + | A pendre ici pour windows avec ffmpeg et à unzip dans C:\ : {{ :0:yt-dlp.7z |}} |
- | yt-dlp -U | + | Toutes les infos ici : [[https:// |
+ | Lancer un terminal cmd : | ||
+ | <code bash>cd " | ||
+ | |||
+ | <code bash> | ||
# Une playlist en mp3 | # Une playlist en mp3 | ||
- | yt-dlp -x --audio-format mp3 --audio-quality 0 -o " | + | <code bash>yt-dlp -x --audio-format mp3 --audio-quality 0 -o " |
- | %(playlist_index)s. | + | Pour ajouter le numéro de piste on peut ajouter : |
+ | <code bash>%(playlist_index)s.</ | ||
# Une chaine avec des vidéos | # Une chaine avec des vidéos | ||
- | yt-dlp -o " | + | <code bash>yt-dlp -o " |
# Ignorer les erreurs | # Ignorer les erreurs | ||
- | -i | + | <code bash>-i</ |
# Reprendre les DL interrompus | # Reprendre les DL interrompus | ||
- | -c | + | <code bash>-c</ |
#astuce #YouTube #yt-dlp | #astuce #YouTube #yt-dlp | ||
Parfois j' | Parfois j' | ||
- | yt-dlp --write-auto-sub --embed-subs --merge-output-format mkv <URL> | + | <code bash>yt-dlp --write-auto-sub --embed-subs --merge-output-format mkv <URL></ |
ou | ou | ||
- | yt-dlp --write-auto-sub --embed-subs --sub-lang " | + | <code bash>yt-dlp --write-auto-sub --embed-subs --sub-lang " |
(retirez --write-auto-sub si vous ne voulez pas des sous-titres auto-généré par YouTube) | (retirez --write-auto-sub si vous ne voulez pas des sous-titres auto-généré par YouTube) | ||
Ligne 34: | Ligne 39: | ||
To select the video quality, first use the -F option to list the available formats, here’s an example: | To select the video quality, first use the -F option to list the available formats, here’s an example: | ||
- | youtube-dl -F ' | + | <code bash>youtube-dl -F ' |
Here’s the output: | Here’s the output: | ||
- | [youtube] Setting language | + | <code bash>[youtube] Setting language |
[youtube] P9pzm5b6FFY: | [youtube] P9pzm5b6FFY: | ||
[youtube] P9pzm5b6FFY: | [youtube] P9pzm5b6FFY: | ||
Ligne 55: | Ligne 60: | ||
43 webm 640x360 | 43 webm 640x360 | ||
18 mp4 | 18 mp4 | ||
- | 22 mp4 | + | 22 mp4 |
The best quality is 22 so use -f 22 instead of -F to download the MP4 video with 1280x720 resolution like this: | The best quality is 22 so use -f 22 instead of -F to download the MP4 video with 1280x720 resolution like this: | ||
- | youtube-dl -f 22 ' | + | <code bash>youtube-dl -f 22 ' |
Ligne 64: | Ligne 69: | ||
which in this case is the line starting with 141. | which in this case is the line starting with 141. | ||
Then we run youtube-dl again this time specifying the audio and video: | Then we run youtube-dl again this time specifying the audio and video: | ||
- | youtube-dl -f 137+141 https:// | + | <code bash>youtube-dl -f 137+141 https:// |
Ligne 78: | Ligne 83: | ||
Note that on Windows you may need to use double quotes instead of single. | Note that on Windows you may need to use double quotes instead of single. | ||
- | $ yt-dlp --get-filename -o ' | + | $ <code bash>yt-dlp --get-filename -o ' |
- | yt-dlp test video '' | + | <code bash>yt-dlp test video '' |
- | $ yt-dlp --get-filename -o ' | + | $ <code bash>yt-dlp --get-filename -o ' |
- | yt-dlp_test_video_.mp4 | + | <code bash>yt-dlp_test_video_.mp4</ |
# Download YouTube playlist videos in separate directory indexed by video order in a playlist | # Download YouTube playlist videos in separate directory indexed by video order in a playlist | ||
- | $ yt-dlp -o ' | + | $ <code bash>yt-dlp -o ' |
# Download all playlists of YouTube channel/ | # Download all playlists of YouTube channel/ | ||
- | $ yt-dlp -o ' | + | $ <code bash>yt-dlp -o ' |
# Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home | # Download Udemy course keeping each chapter in separate directory under MyVideos directory in your home | ||
- | $ yt-dlp -u user -p password -o ' | + | $ <code bash>yt-dlp -u user -p password -o ' |
# Download entire series season keeping each series and each season in separate directory under C:/MyVideos | # Download entire series season keeping each series and each season in separate directory under C:/MyVideos | ||
- | $ yt-dlp -o " | + | $ <code bash>yt-dlp -o " |
# Stream the video being downloaded to stdout | # Stream the video being downloaded to stdout | ||
- | $ yt-dlp -o - BaW_jenozKc | + | $ <code bash>yt-dlp -o - BaW_jenozKc</ |