youtube-autodl is a wrapper around youtube-dl, for downloading youtube videos.
Current status: pre-alpha! Use at your own risk.
It downloads your favorite youtube channels and playlists, putting them into folders on your computer, laid out how you want.
youtube-dl is designed to run periodically. Run it once a day yourself, or add it to cron.
Features:
- Browse youtube locally. No ads or distracting "maybe you would also like to watch" sidebars.
- Uses standard files and folders. No fancy browser needed.
- Simple YAML-based configuration with reasonable defaults. Just pick your own favorite channels and organize folders how you want. Check out my example config file.
- Relatively fast refresh. Channels and playlist fetch takes seconds. Video download is as fast your internet connection allows.
- Supports downloading channels, playlists, or individual videos. Search support is planned.
- Supports downloading videos to multiple locations. For example, you might want to:
- save a video to
to_watch/20220708 BobTech - All About Hats.mpvto watch and then delete once you've seen it - save a video to
channels/BobTech/All About Hats.mpvandplaylists/BobTech/Clothing Playlist/All About Hats.mkvfor long-term storage. - let youtube-autodl save a master copy so it never re-downloads a video
- save a video to
- Downloads each file only once, even if you request it multiple times.
- By default, youtube-autodl stores only one actual copy of each file on disk, even if you want the file saved multiple places. Deduplication can be configured to use symlinks, hardlinks, or be turned off.
- Manually specify any youtube-dl options that are missing, either globally or for each playlist.
- yt-dlp support
youtube-autodl requires yt-dlp. In addition, install the following python packages: sqlitedict
Q: I want to re-organize my existing downloads. I hate how I set up folders! A: You turned on the archive, right? Delete the database (.cache.sqlite), archive/ARCHIVE.txt, and all of youtube-dl's folders except the archive. Run youtube-autodl again. It will take a little bit to grab the metadata again, but it should re-organize everything.
Q: I already have a ton of downloaded videos. How do I avoid downloading them again when I start using youtube-autodl? A:
- If you just want to avoid downloading them again, set up or share an ARCHIVE.txt file. The easiest way to do this is to use
youtube-dl --download-archive ARCHIVE.txtwhen downloading them in the first place. If you didn't do that, you can probably make one for existing video folders with a bash one-liner and some cleverness. - If you want youtube-autodl to actively know about existing videos and make organized copies, set
formats.archiveto point to your existing videos. This way, youtube-dl will see your videos as its "master" copy, and simply realize they're downloaded already. (Note, this means youtube-autodl will add new videos to your existing collection when they are downloaded.)
Q: Help! I checked my computer and there are a dozen copies of youtube-dl running. A: You probably made an hourly cronjob for youtube-autodl. youtube-autodl is being started every hour, whether or not the previous instance finished. Kill all the existing processes. Then, do an initial download before adding it to cron. You can also add flock to your cron tab, to prevent a second instance from starting before your first one finishes.
youtube-dlp is written by Zachary "za3k" Vance. It released into the public domain.
Special thanks to the yt-dlp maintainers, who in addition to writing excellent software, took time to answer my many questions.