I want to download a playlist of videos from youtube using youtube-dl for further offline viewing. Some videos have unavailable fragments (but for some reason there is no problem when viewing through browser). I want to download the playlist, but skip the videos with missing fragments.
My original run was:
youtube-dl -if bestvideo+bestaudio PLEsfXFp6DpzTD1BD1aWNxS2Ep06vIkaeW
But it "freezes" at videos with missed fragments.
Later, in documentation I found this option option --abort-on-unavailable-fragment
But following command just aborts, when it takes 10 retries for attempt to download fragment.
youtube-dl --abort-on-unavailable-fragment -if bestvideo+bestaudio PLEsfXFp6DpzTD1BD1aWNxS2Ep06vIkaeW
I also found parameter --skip-unavailable-fragments
, but it just skips fragments, which are unavailable and continue to download next fragment. It results in glitches in video after merging.
youtube-dl --skip-unavailable-fragments -if bestvideo+bestaudio PLEsfXFp6DpzTD1BD1aWNxS2Ep06vIkaeW
Are there any options / parameters to download the whole playlist, but as soon as there is video with missed fragment: skip that video and switch to the next video in playlist?
-i, --ignore-errors
This one works fine for me.
--abort-on-unavailable-fragment Abort downloading when some fragment is not
available
This will skip the video if it has unavailable fragments, taken from the readme: https://github.com/ytdl-org/youtube-dl#download-options tested on the same issue.
I tried the above mentioned answer but it aborts the whole playlist. I tried using -i which ignores all the errors and skips if the video is unavailable in your country. And this method works without any problems.
youtube-dl -i -o "%(title)s.%(ext)s" 'https://www.youtube.com/playlist?list=PLx65qkgCWNJIs3FPaj8JZhduXSpQ_ZfvL'
--extract-audio
if you want only audio--audio-format mp3
if you want to specify the audio formatIf 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