# Tool for archiving / downloading a YouTube playlist?



## MannDude (Jun 2, 2017)

I have a YouTube playlist of just about 900 'videos' (songs) that I'd like to archive locally. It's music that I can stand, and I'd like a local copy to shuffle through.

Are there any decent tools available that will do this? I can rip them one by one, but that would take way too much time. With just the playlist URL, is there a tool available that can archive the entire list?

Thanks!


----------



## raindog308 (Jun 2, 2017)

http://rg3.github.io/youtube-dl/

Command line linux. Make sure to keep it updated and download the latest, because it's sensitive to Google HTML changes, etc. I always download from github and keep in /usr/local/bin rather than using the hopelessly behind distro version.

Works flawlessly for me. something like:

# discover which formats are available
youtube-dl -F '$url'
# download one in a chosen format and pick its file name
youtube-dl -f 18 -o 'tentacle hentai.mp4' '$url'
# download an entire playlist
youtube-dl -f 18 '$url'

Then I use Handbrake to convert for video...if I'm just stripping the audio out, I use Format Factory.


----------



## MannDude (Jun 2, 2017)

Thanks, dude! I'll give it a whirl.


----------



## ServerGuy (Jun 3, 2017)

raindog308 said:


> http://rg3.github.io/youtube-dl/
> 
> Command line linux. Make sure to keep it updated and download the latest, because it's sensitive to Google HTML changes, etc. I always download from github and keep in /usr/local/bin rather than using the hopelessly behind distro version.
> 
> ...



you can use youtube-dl -F '$url' and it will list all the format and I think 139 is for .m4a so you don't have to convert it to audio later, it will download audio only


----------



## WasNotWSS (Jun 6, 2017)

Don't forget to have ffmpeg installed as well. You may get m4a, .opus, etc for audio formats- it seems to differentiate depending on the uploader's choice of codec at the time.

youtube-dl -x is what I used for audio download as filler for last weeks' funeral, then just scripted a simple ffmpeg {options} -i $file -o $file.mp3 - VLC came to the rescue yet again as I needed to adapt an HDMI video output but the audio device was only available via RCA (or 3.5mm stereo plug). Took less than a few seconds to get running.

--

There is a YT-DL Windows standalone port that works just ducky with a statically-built ffmpeg. Ended up using that when they changed the lineup on me. I had to lookup how to do for loops in cmd, but everything actually worked!


----------



## raindog308 (Jun 6, 2017)

MannDude said:


> Thanks, dude! I'll give it a whirl.



Actually, you're the dude. I'm the dog.

Though if you're making me an honorary dude, I would be honored. So much so that I'd make you an honorary dog.

MannDog and RainDude.


----------



## ChrisM (Jun 9, 2017)

Thanks @raindog308 I was just looking for something like this and remembered this thread.


----------



## raindog308 (Jun 9, 2017)

I use youtube-dl frequently to download youtube stuff for plane rides. Just remember that if get an error, most times it's because your youtube-dl is older. Every time Google changes YT html, youtube-dl can potentially break.

There is a youtube-dl -u feature that will auto-update if you run it sudo/root. 

I usually don't bother installing from a repo because it's out of date at the start and it's easy to invoke the wrong one. Just doing a git clone works fine, since it's just a python script.


----------

