4 ms·
Not OP, but I had a YouTube playlist that really was a collection of memories since I began university 10 years ago. Lots of things that are related to precious
by TeeMassive 6y ago
Not OP, but I had a YouTube playlist that really was a collection of memories since I began university 10 years ago. Lots of things that are related to precious memories I had there: memes, inside jokes (so many Skyrim references), etc.
It had over a thousand videos from what I remember in 2015. Now there's barely ~600 left. Lots of them got deleted due to copyright, the Vox Adpocallispe (thx Carlos Maza) and cancel culture.
I just downloaded all the remaining video using youtube-dl but I should have done that before, now it feels I lost something important in those memories that I will never get back.
Here's the command I used, took me a while and might save other people a few hours:
pip install --upgrade pip
pip install youtube-dl
youtube-dl.exe -i -f bestvideo+bestaudio --merge-output-format mp4 "https://www.youtube.com/playlist?list=XXXXXXXXXXXXXXXXXXXXXXX https://www.youtube.com/playlist?list=XXXXXXXXXXXXXXXXXXXXXX..."
Obviously if you're not on Windows remove the .exe
This will download an entire playlist at the highest video and audio quality and will not crash if a video has an error.
- userbinator 6y agoNote: even on Windows you don't need to specify .exe, unless there also happens to be a .com or .bat with the same name in the PATH.
- rhizome 6y agoIt's a good idea to add -w/--no-overwrite (or --output TEMPLATE with autonumber) to that command line so you don't clobber your existing files, for safety. EDIT: YT does not send a 0byte file for deleteds, only a "video unavailable" error.
- WolfRazu 6y agobest video+bestaudio are the default format, so that argument can be omitted in the future if you want.
- voltagex_ 6y agobestaudio and bestvideo get it very wrong - have a look at the output of -F and you'll see it selecting the 720P version (?)
- crtasm 6y ago"best: Select the best quality format represented by a single file with video and audio." Not the same as bestvideo+bestaudio which will merge separate sources.
- fao_ 6y agoIt will show "deleted video". If you copy the link of that and search the unique portion, you will often find google or other sites referencing the name of it, which you can use to find a reuploaded version