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.
ffmpeg carrierwave-video always returns "unknown encoder libfaac"
-
04-07-2022 - |
質問
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
他のヒント
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
所属していません StackOverflow