By default, Youtube-dl will download the best available quality video. However, it is also possible to download a video or playlist at a specific quality or format.
Luckily youtube-dl provides an option to download a whole playlist or just a range of songs within it. For that purpose, you will need to use the following options: --playlist-start NUMBER – Playlist video to start at (default is 1) --playlist-end NUMBER – Playlist video to end at (default is last)
youtube-dl is a Python based small command-line tool that allows to download videos from YouTube.com, Dailymotion, Google Video, Photobucket, Facebook, Yahoo, Metacafe, Depositfiles and few more similar sites. It written in pygtk and requires Python interpreter to run this program, it's not platform restricted.
In a shell, &
is a special character, advising the shell to start everything up to the & as a process in the background. To avoid this behavior, you can put the URL in quotes. See the youtube-dl FAQ for more information.
Also beware of -citk
. With the exception of -i
, these options make little sense. See the youtube-dl FAQ for more information. Even -f mp4
looks very strange.
So what you want is:
youtube-dl -i -f mp4 --yes-playlist 'https://www.youtube.com/watch?v=7Vy8970q0Xc&list=PLwJ2VKmefmxpUJEGB1ff6yUZ5Zd7Gegn2'
Alternatively, you can just use the playlist ID:
youtube-dl -i PLwJ2VKmefmxpUJEGB1ff6yUZ5Zd7Gegn2
I found the best solution after many attempts for this problem.
Installation and usage;
For Windows User:
Script:
youtube-dl --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist https://www.youtube.com/playlist?list={your-youtube-playlist-id}
{your-youtube-playlist-id}
parameter your youtube playlist id.For macOS/Linux User:
Script:
youtube-dl --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist 'https://www.youtube.com/playlist?list={your-youtube-playlist-id}'
brew install youtube-dl ffmpeg
and install youtube-dl and ffmpeg for convert webm to mp3. (Installation may take longer to install other dependencies.) (For linux user: sudo apt-get install youtube-dl ffmpeg
){your-youtube-playlist-id}
parameter your youtube playlist id.I have tried everything above, but none could solve my problem. I fixed it by updating the old version of youtube-dl to download playlist. To update it
sudo youtube-dl -U
or
youtube-dl -U
after you have successfully updated using the above command
youtube-dl -cit https://www.youtube.com/playlist?list=PLttJ4RON7sleuL8wDpxbKHbSJ7BH4vvCk
Your link is not a playlist.
A proper playlist URL looks like this:
https://www.youtube.com/playlist?list=PLHSdFJ8BDqEyvUUzm6R0HxawSWniP2c9K
Your URL is just the first video OF a certain playlist. It contains https://www.youtube.com/watch?
instead of https://www.youtube.com/playlist?
.
Pick the playlist by clicking on the title of the playlist on the right side in the list of videos and use this URL.
youtube-dl <playlist link>
youtube-dl -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' <playlist link>
This command will download videos in 1080p resolution if 1080p is available otherwise it will download the next best (less than 1080p) resolution. Here, You can use 480 or 720, etc instead of 1080.
Note: Make sure that ‘FFmpeg’ is installed, otherwise video and audio will not be merged.
youtube-dl -o "[%(upload_date)s] %(title)s.%(ext)s" -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' <playlist link>
youtube-dl -o "[%(upload_date)s] %(title)s [%(uploader)s].%(ext)s" -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' <playlist link>
Subtitle
youtube-dl --write-auto-sub -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' <playlist link>
youtube-dl --write-sub -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' <playlist link>
youtube-dl --write-sub --sub-lang en -f 'bestvideo[height<=1080]+bestaudio/best[height<=1080]' <playlist link>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With