yt-dlp
Wrapper for the yt-dlp video download tool. This gem is heavily inspired by the youtube_dl.rb gem
Install the gem
Add this line to your application's Gemfile:
gem 'yt-dlp.rb'
And then execute:
$ bundle
Or install it yourself as:
$ gem install yt-dlp.rb
Install yt-dlp
This gem ships with the latest (working) version of yt-dlp built-in, so you don't have to install yt-dlp at all! Unless you want to.
Some features of yt-dlp require ffmpeg or avconf to be installed. Normally these are available for installation from your distribution's repositories.
Usage
Pretty simple.
YtDlp.download "https://www.youtube.com/watch?v=gvdf5n-zI14", output: 'some_file.mp4'
All options available to yt-dlp can be passed to the options hash
= {
username: 'someone',
password: 'password1',
rate_limit: '50K',
format: :worst,
continue: false
}
YtDlp.download "https://www.youtube.com/watch?v=gvdf5n-zI14",
Options passed as options = {option: true}
or options = {option: false}
are passed to yt-dlp as --option
or --no-option
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Pass test suite (
rake test
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Remember: commit now, commit often.