How to rip audio or music from Youtube

There’s a lot of good reasons to rip audio from Youtube videos, including being able to turn seminars into audio files that you can listen to as a podcast, to being able to grab some great music from some indy artist.

There are a bunch of tools out there that can accomplish this I’m sure.

But am a developer, this is how I do it. All the commands here are for OS X, but you accomplish the same on linux or windows quite easily.

So say I want to rip the audio from my Youtube video:

Making sure I have youtube-dl installed:

$ brew install ffmpeg

Then I run:

$ youtube-dl -x  https://www.youtube.com/watch?v=y4HOCjf5ARE
 Setting language
 y4HOCjf5ARE: Downloading webpage
 y4HOCjf5ARE: Downloading video info webpage
 y4HOCjf5ARE: Extracting video information
[download] Destination: How to Boost Your Traffic and Rankings in Youtube with Transcripts-y4HOCjf5ARE.m4a
[download] 100% of 3.13MiB in 00:00
 Post-process file How to Boost Your Traffic and Rankings in Youtube with Transcripts-y4HOCjf5ARE.m4a exists, skipping

And now you should have a shiny new .m4a file that you can play which is the same quality as the original (no generation loss due to re-transcoding).

Enjoy!