I am using carrierwave-video gem uploading videos through carrierwave and it's not working.
video_uploader.rb
class VideoUploader < CarrierWave::Uploader::Base
include CarrierWave::Video
storage :file
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
end
video.rb
class Video < ActiveRecord::Base
mount_uploader :file, VideoUploader
def set_success(format, opts)
self.success = true
end
end
The error I am getting is:
No such file or directory - the ffprobe binary could not be found in /home/administrator/.rvm/gems/ruby-2.3.0/bin:/home/administrator/.rvm/gems/ruby-2.3.0@global/bin:/usr/share/rvm/rubies/ruby-2.3.0/bin:/usr/share/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
This shell script made my day!
As Bart said:
You need to install ffmpeg. For OS X that would be brew install ffmpeg. See here for details: https://ffmpeg.org/download.html