Search code examples
ruby-on-railsffmpegcarrierwavelibfaac

ffmpeg carrierwave-video always returns "unknown encoder libfaac"


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?


Solution

  • 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.