| Both sides previous revision
Previous revision
|
|
youtube-dl [2025/12/26 22:32] 114.119.135.207 old revision restored (2025/11/19 15:07) |
youtube-dl [2025/12/26 22:37] (current) 43.173.174.41 old revision restored (2025/11/13 19:59) |
| ====== yt-dlp (anciennement youtube-dl) ====== | ====== youtube-dl ====== |
| |
| ===== Setup ===== | ===== Setup ===== |
| If you do not have curl, you can alternatively use a recent wget: | If you do not have curl, you can alternatively use a recent wget: |
| <code> | <code> |
| sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp | sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl |
| sudo chmod a+rx /usr/local/bin/yt-dlp | sudo chmod a+rx /usr/local/bin/youtube-dl |
| </code> | </code> |
| |
| Ensuite la mise à jour est simple. Il faut exécuter l'outil lui-même. | Ensuite la mise à jour est simple. Il faut exécuter l'outil lui-même. |
| <code> | <code> |
| sudo yt-dlp -U | sudo youtube-dl -U |
| </code> | </code> |
| | |
| | |
| |
| ===== Channels importants ===== | ===== Channels importants ===== |
| |
| <code> | <code> |
| # Commande global en tache de fond | #Geopolitis |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/c/XavierTytelman/videos & yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/c/ATECHUETTOPGUN2SPEAKER/videos & yt-dlp ytuser:RTSGeopolitis -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 & yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/channel/UCHGMBrXUzClgjEzBMei-Jdw/videos & yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/channel/UCYA_ElxMgkJlvcKa4SM0dOg/videos & yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' --dateafter 20220331 https://www.youtube.com/c/TerraBellum/videos & yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/user/ifr48/videos | youtube-dl ytuser:RTSGeopolitis -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20210530 |
| | #Le Dessous des cartes |
| # Xavier Tytelman | youtube-dl -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20210530 https://www.youtube.com/channel/UCHGMBrXUzClgjEzBMei-Jdw/videos |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/c/XavierTytelman/videos | youtube-dl -o "%(upload_date)s-%(alt_title)s-%(title)s.%(ext)s" --dateafter 20210530 https://www.arte.tv/fr/videos/RC-014036/le-dessous-des-cartes/ |
| | #Le monde en carte |
| # Até Chuet | youtube-dl -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20210530 https://www.youtube.com/channel/UCYA_ElxMgkJlvcKa4SM0dOg/videos |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/c/ATECHUETTOPGUN2SPEAKER/videos | |
| | |
| # Geopolitis | |
| yt-dlp ytuser:RTSGeopolitis -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 | |
| | |
| # Le Dessous des cartes | |
| ## Meilleur depuis chaine youtube | |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/channel/UCHGMBrXUzClgjEzBMei-Jdw/videos | |
| | |
| ## Moins bien depuis site officiel | |
| yt-dlp -o "%(upload_date)s-%(alt_title)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.arte.tv/fr/videos/RC-014036/le-dessous-des-cartes/ | |
| | |
| # Le monde en carte | |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/channel/UCYA_ElxMgkJlvcKa4SM0dOg/videos | |
| # Terra Bellum | # Terra Bellum |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' --dateafter 20220331 https://www.youtube.com/c/TerraBellum/videos | youtube-dl -o "%(upload_date)s-%(title)s.%(ext)s" -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' --dateafter 20210530 https://www.youtube.com/c/TerraBellum/videos |
| | #IHU Méditérranée Infection |
| # IHU Méditérranée Infection | youtube-dl -o "%(upload_date)s-%(title)s.%(ext)s" -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' --dateafter 20210530 https://www.youtube.com/user/ifr48/videos |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20220331 https://www.youtube.com/user/ifr48/videos | youtube-dl -o "%(upload_date)s-%(title)s.%(ext)s" --dateafter 20210530 https://www.youtube.com/user/ifr48/videos |
| | |
| ## en 720p | |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" -f 'bestvideo[height<=720]+bestaudio/best[height<=720]' --dateafter 20220331 https://www.youtube.com/user/ifr48/videos | |
| </code> | </code> |
| |
| To download an entire channel après une date | To download an entire channel après une date |
| <code> | <code> |
| yt-dlp ytuser:<USER> --dateafter 20160101 | youtube-dl ytuser:<USER> --dateafter 20160101 |
| </code> | </code> |
| |
| To download all videos on a playlist | To download all videos on a playlist |
| <code> | <code> |
| yt-dlp <PLAYLIST URL> | youtube-dl <PLAYLIST URL> |
| </code> | </code> |
| |
| Vidéos en 720p | Vidéos en 720p |
| <code> | <code> |
| yt-dlp ytuser:RTSGeopolitis -f "best[height=720]" | youtube-dl ytuser:RTSGeopolitis -f "best[height=720]" |
| </code> | </code> |
| |
| To download a YouTube video as an MP3 | To download a YouTube video as an MP3 |
| <code> | <code> |
| yt-dlp -x --audio-format mp3 --audio-quality 320K <VIDEO_URL> | youtube-dl -x --audio-format mp3 --audio-quality 320K <VIDEO_URL> |
| yt-dlp ytuser:PlayingForChange --dateafter 20210530 -x --audio-format mp3 --audio-quality 320K | youtube-dl ytuser:PlayingForChange --dateafter 20160101 -x --audio-format mp3 --audio-quality 320K |
| yt-dlp ytuser:SingleWhiteGlove --dateafter 20210530 -x --audio-format mp3 --audio-quality 320K | youtube-dl ytuser:SingleWhiteGlove --dateafter 20191120 -x --audio-format mp3 --audio-quality 320K |
| yt-dlp ytuser:remixedbynick --dateafter 20210530 -x --audio-format mp3 --audio-quality 320K | youtube-dl ytuser:remixedbynick --dateafter 20191120 -x --audio-format mp3 --audio-quality 320K |
| </code> | </code> |
| |
| Récupération de la vidéo en mp4 si disponible ou tout autre meilleur format si non disponible | Récupération de la vidéo en mp4 si disponible ou tout autre meilleur format si non disponible |
| <code> | <code> |
| yt-dlp -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' <URL> | youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' <URL> |
| </code> | </code> |
| |
| Récupération du meilleur format vidéo et audio sans les merger | Récupération du meilleur format vidéo et audio sans les merger |
| <code> | <code> |
| yt-dlp -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s' <URL> | youtube-dl -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s' <URL> |
| </code> | </code> |
| |
| Le meilleur format limité à 1080p | Le meilleur format limité à 1080p |
| <code> | <code> |
| yt-dlp -o "%(upload_date)s-%(title)s.%(ext)s" -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' --dateafter 20210204 <URL> | youtube-dl -o "%(upload_date)s-%(title)s.%(ext)s" -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' --dateafter 20210204 <URL> |
| <code> | <code> |
| | |