4
我通过streamio-FFMPEG Rails的宝石使用FFMPEG - https://github.com/streamio/streamio-ffmpegFFMPEG说文件不存在,但是,它的存在
出于某种原因,想转码的视频文件(该文件的确存在)时, FFMPEG说该文件不存在。
下面是Rails的控制台一些输出,显示出我的头痛:
1.9.3p125 :001 > File.exist?("/Applications/MAMP/htdocs/video-app/public/uploads/tmp/20131208-1416-1234-0984/videotest.mp4")
=> true
1.9.3p125 :002 > FFMPEG::Movie.new("/Applications/MAMP/htdocs/video-app/public/uploads/tmp/20131208-1416-1234-0984/videotest.mp4")
Errno::ENOENT: No such file or directory - ffmpeg -i /Applications/MAMP/htdocs/video-app/public/uploads/tmp/20131208-1416-1234-0984/videotest.mp4
from /Users/my-comp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open3.rb:202:in `spawn'
from /Users/my-comp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open3.rb:202:in `popen_run'
from /Users/my-comp/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/open3.rb:90:in `popen3'
from /Users/my-comp/.rvm/gems/[email protected]/gems/streamio-ffmpeg-1.0.0/lib/ffmpeg/movie.rb:17:in `initialize'
from (irb):2:in `new'
from (irb):2
from /Users/my-comp/.rvm/gems/[email protected]/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
from /Users/my-comp/.rvm/gems/[email protected]/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
from /Users/my-comp/.rvm/gems/[email protected]/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)> '
from script/rails:6:in `require'
from script/rails:6:in `<main>'
1.9.3p125 :003 >
任何帮助,将不胜感激。
你能显示movie.rb吗? –
当然,它是其中的一部分宝石 - 可以在这里查看:https://github.com/streamio/streamio-ffmpeg/blob/master/lib/ffmpeg/movie.rb – cmw
这真的很奇怪,因为你已经完成file.exists? => true。不知道我可以帮忙,但我会投票 –