Answer the question
In order to leave comments, you need to log in
How to call the FFMPEG system command in Ruby on rails?
Good evening.
Tell me how to call the ffmpeg system command?
Found this example but it doesn't work for me
def convert_in_flv
flv = File.join(File.dirname(source.path), "#{id}.flv")
system("ffmpeg -i #{source.path} -ar 22050 -ab 32 -s 480x360 -vcodec flv -r 25 -qscale 8 -f flv -y #{flv}")
end
Answer the question
In order to leave comments, you need to log in
Provided that ffmpeg is present and the parameters in the keys are correctly set, the command should be executed. After system, you can check the exit code of the process with $?.exitstatus.
I advise you to debug the code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question