Skip to content
Ruby wrapper for youtube-dl
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Updated binaries to 2016.09.11.1 Sep 12, 2016
test Add ::VERSION tests. Jul 14, 2016
vendor/bin Updated binaries to 2016.09.11.1 Sep 12, 2016
.gitignore
.rubocop.yml Rubocop-ing Oct 19, 2015
.rubocop_todo.yml
.travis.yml Update Ruby versions [ci skip] Jun 17, 2016
1.0_RELEASE_GOALS.md
Gemfile
LICENSE.txt
README.md Added example boolean option with the example options. [ci skip] Jul 22, 2016
Rakefile Add check for correctly formed version number. Aug 22, 2016
youtube-dl.rb.gemspec Remove activesupport version constraint hack Jul 16, 2016

README.md

youtube-dl.rb

Ruby wrapper for youtube-dl.

Build Status Code Climate Test Coverage security Inline docs Dependency Status

Build history for master branch Stories in Ready

Gem::InstallError: activesupport requires Ruby version >= 2.2.2.

This gem indirectly depends on ActiveSupport, but ActiveSupport 5 (the latest version) requires Ruby version >= 2.2.2. If you are using a version older than this, add this line to your Gemfile:

gem 'activesupport', '< 5.0'

Install the gem

IMPORTANT NOTE: The youtube_dl gem and the ruby-youtube-dl gem will cause a conflict with this gem. Please gem uninstall those gems before using this one.

Add this line to your application's Gemfile:

gem 'youtube-dl.rb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install youtube-dl.rb

Install youtube-dl

This gem ships with the latest (working) version of youtube-dl built-in, so you don't have to install youtube-dl at all! Unless you want to.

Some features of youtube-dl require ffmpeg or avconf to be installed. Normally these are available for installation from your distribution's repositories.

Usage

Pretty simple.

YoutubeDL.download "https://www.youtube.com/watch?v=gvdf5n-zI14", output: 'some_file.mp4'

All options available to youtube-dl can be passed to the options hash

options = {
  username: 'someone',
  password: 'password1',
  rate_limit: '50K',
  format: :worst,
  continue: false
}

YoutubeDL.download "https://www.youtube.com/watch?v=gvdf5n-zI14", options

Options passed as options = {option: true} or options = {option: false} are passed to youtube-dl as --option or --no-option

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Pass test suite (rake test)
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request

Remember: commit now, commit often.

You can’t perform that action at this time.