Hi everybody,
First time for me here !!!
I have a problem with my own Paperclip processor, wich try to run a
ffmpeg command line.
The ffmpeg command line is good, I tried it a bunch of time. But when it
is executed from the processor, I can’t find what happen but the
processor never end. I see in the Rails log that everything is ok before
hit the Paperclip.run line. The log seems fine to me, no error showed,
but I never have anything else after the ffmpeg command.
Here is the code and then last line of my log showing the ffmpeg command
:
def make
@file.pos = 0 # Reset the file position incase it is coming out of
a another processor
dst = Tempfile.new([@basename, ‘.ogg’])
dst.binmode
cmd = "-i #{File.expand_path(file.path)}
#{File.expand_path(dst.path)}"
begin
success = Paperclip.run('ffmpeg', cmd)
rescue PaperclipCommandLineError
raise PaperclipError, "Error converting audio file #{@basename}"
end
Rails.logger.debug { dst.size }
dst
end
The log :
[paperclip] /usr/local/bin/ffmpeg -i
/var/folders/f4/f4tN4SBQHRetALFP3FCJGE+++Tc/-Tmp-/stream20110629-7151-1x4dwfq.mp3
/var/folders/f4/f4tN4SBQHRetALFP3FCJGE+++Tc/-Tmp-/stream20110629-7151-1x4dwfq20110629-7151-os44or.ogg
2>/dev/null
I can’t find the solution after spending multiple hours on this problem.
Please give me some hint on how I could find the problem. I’m sure I am
making a mistake somewhere, maybe the command line has no rights on the
tmp file ? Ask me anything you need from my app to find a solution.
Thanks
PS: excuse my english, I’m french.