I can give ffmpeg videos to convert via command line, and it converts them happily, but when I ask it to convert things in rails, it returns "Unknown encoder libfaac" no matter the video I give it.

I call it using this line: process encode_video: [:mp4, resolution: "640x480"]

I've already spent hours trying to (unsuccessfully) compile ffmpeg with libfaac on Windows, but now it just seems ridiculous, because not everything I pass it is even aac. What's going on?

有帮助吗?

解决方案 2

I fixed it! For some reason it was always using libfaac. I fixed this by adding audio_codec: "aac", custom: "-strict experimental -q:v 5 -preset slow -g 30" to the arguments of encode_video.

其他提示

In uploader/video_uploader.rb add these lines

version :mp4 do
   process :encode_video=> [:mp4, audio_codec: "aac",:custom => "-strict experimental -q:v 5 -preset slow -g 30"]
end
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top