Paperclip.Run和FFMPEG退出代码 [英] Paperclip.Run and FFMPEG exit codes

查看:191
本文介绍了Paperclip.Run和FFMPEG退出代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Paperclip.run命令编写ffmpeg类的回形针处理器。目前,该行抛出一个可卡因:: CommandLineError说明


命令'/ opt / local / bin / ffmpeg -i
/tmp/stream20110729-2442-133evp0.mp3
/tmp/stream20110729-2442-133evp020110729-2442-15k6sr4.ogg
2> / dev / null'返回1.预期0


这不是真的告诉我很多关于发生了什么,我找不到关于FFMPEG错误代码1的任何内容。 >

我需要查找有关FFMPEG发生的更多信息,但似乎错误输出被发送到/ dev / null(Paperclip添加到我的命令中)。



BTW我在OSX Snow Leopard上的Apache 2上运行RoR与Passenger。



我可以收到ffmpeg来记录有关这个问题的更多细节吗?



感谢您的帮助!

解决方案

尝试添加选项:swallow_stderr => false 到Paperclip.run调用。它会指示命令行处理器不要将标准错误重定向到/ dev / null,您可能会收到FFMPEG生成的错误。


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!

解决方案

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.

这篇关于Paperclip.Run和FFMPEG退出代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆