Вопрос

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