Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert any YouTube video into an audio file you can listen to on the go...
# Convert any YouTube video into an audio file you can listen to on the go, using:
# http://rg3.github.com/youtube-dl/
{ ~ } > brew install ffmpeg
{ ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl
{ ~ } > chmod u+x youtube-dl
# Pick which video format you want to download.. (use any YT video link)
{ ~ } > ./youtube-dl -s -F http://www.youtube.com/watch?v=vT1KmTQ-1Os
[youtube] Setting language
[youtube] vT1KmTQ-1Os: Downloading video webpage
[youtube] vT1KmTQ-1Os: Downloading video info webpage
[youtube] vT1KmTQ-1Os: Extracting video information
Available formats:
22 : mp4 [720x1280]
45 : webm [720x1280]
35 : flv [480x854]
44 : webm [480x854]
34 : flv [360x640]
18 : mp4 [360x640]
43 : webm [360x640]
5 : flv [240x400]
17 : mp4 [144x176]
# Extract audio track from video
{ ~ } > ./youtube-dl -f 5 --extract-audio http://www.youtube.com/watch?v=vT1KmTQ-1Os
[youtube] Setting language
[youtube] vT1KmTQ-1Os: Downloading video webpage
[youtube] vT1KmTQ-1Os: Downloading video info webpage
[youtube] vT1KmTQ-1Os: Extracting video information
[download] Destination: vT1KmTQ-1Os.flv
[download] 100.0% of 74.36M at 43.23k/s ETA 00:00
[ffmpeg] Destination: vT1KmTQ-1Os.mp3
{ ~ } > open vT1KmTQ-1Os.mp3
# woot.
@sethladd

This comment has been minimized.

Copy link

sethladd commented Jul 20, 2012

When I run "brew install ffprobe" I get "No available formula for ffprobe". I'm running brew 0.9.2.

However, ffprobe is installed from 'brew install ffmpeg'

@igrigorik

This comment has been minimized.

Copy link
Owner Author

igrigorik commented Jul 20, 2012

Woops, right.. scratch that! You get ffprobe when you install ffmpeg.

@gavinhogan

This comment has been minimized.

Copy link

gavinhogan commented Jul 24, 2012

Wow - thanks, so much better than the plugin poison I was dealing with before

@PabloC

This comment has been minimized.

Copy link

PabloC commented Dec 30, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.