没有这样的文件或目录 - 找不到 ffprobe 二进制文件错误
No such file or directory - the ffprobe binary could not be found error
我正在使用 carrierwave-video gem 通过载波上传视频,但无法正常工作。
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
我得到的错误是:
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
您需要安装 ffmpeg
。对于 OS X 那将是 brew install ffmpeg
。详情请看这里:https://ffmpeg.org/download.html
这 shell script 让我开心!
我正在使用 carrierwave-video gem 通过载波上传视频,但无法正常工作。
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
我得到的错误是:
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
您需要安装 ffmpeg
。对于 OS X 那将是 brew install ffmpeg
。详情请看这里:https://ffmpeg.org/download.html
这 shell script 让我开心!