问题
I'm writing a paperclip processor that class ffmpeg using the Paperclip.run command. Currently, that line throws an Cocaine::CommandLineError stating
Command '/opt/local/bin/ffmpeg -i "/tmp/stream20110729-2442-133evp0.mp3" "/tmp/stream20110729-2442-133evp020110729-2442-15k6sr4.ogg" 2>/dev/null' returned 1. Expected 0
This doesn't really tell me a lot about what's going on, and I can't find anything about FFMPEG error code 1.
I need to find more information about what's happening in FFMPEG, but it seems the error output is being sent to /dev/null (something Paperclip adds to my command).
BTW I'm running RoR with Passenger on Apache 2 on OSX Snow Leopard.
How can I get ffmpeg to log more details about the issue?
Thank you for your help!
回答1:
Try adding the option :swallow_stderr => false
to the Paperclip.run call. It'll instruct the command line processor not to redirect the standard error to /dev/null and you might get the errors FFMPEG is generating.
回答2:
You can try running this command manually to see what's happening. Is this your mp3-file?
Also, check if ffmpeg is actually installed where it tries to run it from(it can be in /usr/bin
, /usr/local/bin
...).
来源:https://stackoverflow.com/questions/6878505/paperclip-run-and-ffmpeg-exit-codes