Hacker News new | ask | show | jobs
by sun_n_surf 2588 days ago
I actually have a different problem -- not sure it is one that I can legally solve.

I have 10 years of lovingly curated YouTube videos playlists, which, now when I look into the older ones, are a barren wasteland of "Video removed" or "Video not available". It is heartbreaking. Is there any way I can prevent this from happening?

1 comments

I’d download and store the videos locally with youtube-dl.
I concur, youtube-dl is what I’ve been using during the last few years: whenever I find a YT video I might want to watch again, I now immediately download it. Learned the need for that the hard way.

Check out its options here: https://github.com/ytdl-org/youtube-dl/blob/master/README.md...

With --add-metadata you can embed the YT video description in the video file. The downloaded video file name will contain the YT identifier so you can still match them back if needed.

There is another option to save the metadata to a separate JSON file if you prefer that.

To download your playlists, give it each playlist’s URL instead of the video url:

    youtube-dl --add-metadata --ignore-errors 'https://www.youtube.com/watch?v=8GW6sLrK40k&list=RDQMc4l8l2aQrNo'
That example URL includes a specific video from the list, but will download all of them. It works just the same if you only give it the `list` parameter, but all links to playlists I’ve seen point to one of their videos.

The option --ignore-errors will jump over the unavailable videos instead of stopping.

Edit to add: If you want to download your playlists as separate directories, with each video file name including its original index in the playlist, see these examples in youtube-dl’s documentation: https://github.com/ytdl-org/youtube-dl/blob/master/README.md...