Outils pour utilisateurs

Outils du site


yt-dl

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
yt-dl [2025/09/24 16:56] – créée tutospistoyt-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://github.com/yt-dlp/yt-dlp]]
  
 +Lancer un terminal cmd : 
 +<code bash>cd "C:\yt-dlp"</code>
 +
 +<code bash>yt-dlp -U</code>
  
 # Une playlist en mp3 # Une playlist en mp3
-yt-dlp -x --audio-format mp3 --audio-quality 0 -o "%(album_artist)s/%(title)s.%(ext)s" "https://www.youtube.com/watch?list=AAAAAAA" --ffmpeg-location "C:\yt-dlp\ffmpeg-5.0-essentials_build\bin\ffmpeg.exe" +<code bash>yt-dlp -x --audio-format mp3 --audio-quality 0 -o "%(album_artist)s/%(title)s.%(ext)s" "https://www.youtube.com/watch?list=AAAAAAA" --ffmpeg-location "C:\yt-dlp\ffmpeg-5.0-essentials_build\bin\ffmpeg.exe"</code> 
-%(playlist_index)s.+Pour ajouter le numéro de piste on peut ajouter : 
 +<code bash>%(playlist_index)s.</code>
  
  
 # Une chaine avec des vidéos # Une chaine avec des vidéos
-yt-dlp -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLq9_U6QEXNyf0uc4hjxss51gv9c-b5vhN"+<code bash>yt-dlp -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s" "https://www.youtube.com/playlist?list=PLq9_U6QEXNyf0uc4hjxss51gv9c-b5vhN"</code>
  
 # Ignorer les erreurs # Ignorer les erreurs
--i +<code bash>-i</code> 
  
 # Reprendre les DL interrompus # Reprendre les DL interrompus
--c+<code bash>-c</code>
  
  
 #astuce #YouTube #yt-dlp #astuce #YouTube #yt-dlp
 Parfois j'archive des vidéos YouTube. Il arrive qu'elles soient en anglais, mais heureusement avec yt-dlp on peut récupérer un beau mkv avec les sous-titres intégrés : Parfois j'archive des vidéos YouTube. Il arrive qu'elles soient en anglais, mais heureusement avec yt-dlp on peut récupérer un beau mkv avec les sous-titres intégrés :
-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></code>
 ou ou
-yt-dlp --write-auto-sub --embed-subs --sub-lang "en.*" --merge-output-format mkv <URL>+<code bash>yt-dlp --write-auto-sub --embed-subs --sub-lang "en.*" --merge-output-format mkv <URL></code>
 (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 'http://www.youtube.com/watch?v=P9pzm5b6FFY'+<code bash>youtube-dl -F 'http://www.youtube.com/watch?v=P9pzm5b6FFY'</code>
  
 Here’s the output: Here’s the output:
  
-[youtube] Setting language+<code bash>[youtube] Setting language
 [youtube] P9pzm5b6FFY: Downloading webpage [youtube] P9pzm5b6FFY: Downloading webpage
 [youtube] P9pzm5b6FFY: Downloading video info webpage [youtube] P9pzm5b6FFY: Downloading video info webpage
Ligne 55: Ligne 60:
 43          webm      640x360      43          webm      640x360     
 18          mp4       640x360      18          mp4       640x360     
-22          mp4       1280x720    (best)+22          mp4       1280x720    (best)</code>
  
 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 'http://www.youtube.com/watch?v=P9pzm5b6FFY'+<code bash>youtube-dl -f 22 'http://www.youtube.com/watch?v=P9pzm5b6FFY'</code>
  
  
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://www.youtube.com/watch\?v\=-pxRXP3w-sQ+<code bash>youtube-dl -f 137+141 https://www.youtube.com/watch\?v\=-pxRXP3w-sQ</code>
  
  
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 '%(title)s.%(ext)s' BaW_jenozKc +<code bash>yt-dlp --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc</code> 
-yt-dlp test video ''_ä↭𝕐.mp4    # All kinds of weird characters+<code bash>yt-dlp test video ''_ä↭𝕐.mp4</code>    # All kinds of weird characters
  
-$ yt-dlp --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc --restrict-filenames +<code bash>yt-dlp --get-filename -o '%(title)s.%(ext)s' BaW_jenozKc --restrict-filenames</code> 
-yt-dlp_test_video_.mp4          # A simple file name+<code bash>yt-dlp_test_video_.mp4</code>          # A simple file name
  
 # 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 '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re+<code bash>yt-dlp -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/playlist?list=PLwiyx1dc3P2JR9N8gQaQN_BCvlSlap7re</code>
  
 # Download all playlists of YouTube channel/user keeping each playlist in separate directory: # Download all playlists of YouTube channel/user keeping each playlist in separate directory:
-$ yt-dlp -o '%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/user/TheLinuxFoundation/playlists+<code bash>yt-dlp -o '%(uploader)s/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://www.youtube.com/user/TheLinuxFoundation/playlists</code>
  
 # 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 '~/MyVideos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/java-tutorial/+<code bash>yt-dlp -u user -p password -o '~/MyVideos/%(playlist)s/%(chapter_number)s - %(chapter)s/%(title)s.%(ext)s' https://www.udemy.com/java-tutorial/</code>
  
 # 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 "C:/MyVideos/%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s" https://videomore.ru/kino_v_detalayah/5_sezon/367617+<code bash>yt-dlp -o "C:/MyVideos/%(series)s/%(season_number)s - %(season)s/%(episode_number)s - %(episode)s.%(ext)s" https://videomore.ru/kino_v_detalayah/5_sezon/367617</code>
  
 # 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</code>
yt-dl.1758732995.txt.gz · Dernière modification : de tutospisto