CarrierWave::FFmpeg
Simple Streamio FFmpeg wrapper for CarrierWave uploader
Installation
Add this line to your application's Gemfile:
gem 'carrierwave-ffmpeg'
And then execute:
$ bundle
Or install it yourself as:
$ gem install carrierwave-ffmpeg
Usage
Include wrapper into your CarrierWave uploader class
class VideoUploader < CarrierWave::Uploader::Base
include CarrierWave::FFmpeg
end
Example:
To take screenshot from video:
class VideoUploader < CarrierWave::Uploader::Base
include CarrierWave::FFmpeg>
version :thumb do
process encode: [:jpg, seek: 5]
end
end
Default seek is 10% from video duration. Also you can pass frame_num
option to
take screenshot for specific frame.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request