我关注这颗 gem https://github.com/streamio/streamio-ffmpeg ,然后我这样做:
movie = FFMPEG::Movie.new("#{Rails.root}/public/aaa.mov")
但结果是:
Errno::ENOENT: No such file or directory - ffmpeg -i /home/user/projects/test/public/aaa.mov
有人知道吗?
谢谢
最佳答案
此 gem 假定 ffmpeg
在您的 PATH
中可用。如果它不在您的PATH
中,您需要指定ffmpeg
二进制文件的路径。
FFMPEG.ffmpeg_binary = '/usr/local/bin/ffmpeg'
如果您没有安装ffmpeg
,则需要安装它。
关于ruby-on-rails - 在 Rails 上使用 Streamio FFMPEG 的正确视频路径是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15830707/