Skip to content

Extract mp3s for flash videos all over the web (using youtube-dl)

Notifications You must be signed in to change notification settings

hjhart/music_extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

music_extractor is a non-elegant prototype I whipped up because of the lack of decent youtube-to-mp3 solutions on the internet. It is dependant on two different libraries, but it makes the process of downloading and converting any youtube-dl compatible online video painless.

Sites include (but are not limited to): Youtube, Vimeo, Google Video, MetaCafe, Yahoo Video.

Prerequisites:

I apologize for there being so many. This is more of a proof of concept than a slick implementation. However, if youre on a UNIX-based system this really shouldn't be that hard to set up.

  • Python (comes with OSX)
  • Ruby (comes with OSX)
  • Have ffmpeg installed (usually a brew install ffmpeg does the trick)
  • Have youtube-dl installed instructions

Setup

Copy over config file. This rake task will create a config.yml. Use the configuration section below to configure Youtube

rake init

Usage:

Download a single URL

rake download["http://www.youtube.com/watch?v=xNQ5fj9uqVo"]

Download using a search term (only on youtube)

rake search["Michael Jackson - Thriller"]

Download from a file: One "video" per line on the file. The lines can be either urls or search terms. There is a test file checked in at test.txt. Make sure your links all start with http://

rake download_file["test.txt"]

Configuration

destination_directory is fairly obvious. Right now only absolute or relative links work (nothing using the home dir shortcut: ~)

download_movie by default the movie file will be deleted. If you want to retain the movie and the music file, set this to true.

music_format - by default this is set to mp3. You have the choice of: "aac", "vorbis" or "mp3"

TODO:

  • Configurable video types/qualities
  • download a file based on a search term best result
  • Figure out a "best result" algorithm for youtube
  • mkdir_p the destination directory?
  • Edit meta data (upon importing into iTunes we should get an artist and a title at least - perhaps a year and genre - query allmusic from mashable?)
  • download N number of search_term videos (e.g. rake search_multiple["Cold War Kids", 15] would download 15 songs from Cold War Kids)
  • Update instructiosn on how to install metadata stuff
  • Update instructions on best practices for tagging (artist - title.mp3 naming, etc...)
  • Just general best practices.

Metadata installation:

We need a C package called libtag. Installation instructions here

About

Extract mp3s for flash videos all over the web (using youtube-dl)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages