如何启用FFMPEG日志记录,哪里可以找到FFMPEG日志文件? [英] How do I enable FFMPEG logging and where can I find the FFMPEG log file?

查看:3155
本文介绍了如何启用FFMPEG日志记录,哪里可以找到FFMPEG日志文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想能够记录FFMPEG进程,因为我正在努力计算一段视频需要多长时间进行转换,以帮助我的视频编码服务器的容量规划。如何启用日志记录和保存日志文件的位置。我在CentOS LAMP机器上安装了FFMPEG。

I want to be able to log FFMPEG processes because I am trying to work out how long a minute of video takes to convert to help with capacity planning of my video encoding server. How do I enable logging and where is the log file saved. I have FFMPEG installed on a CentOS LAMP machine.

推荐答案

FFmpeg不会写入特定的日志文件,而是发送其输出标准错误。要捕获,您需要

FFmpeg does not write to a specific log file, but rather sends its output to standard error. To capture that, you need to either


  • 捕获并解析它生成

  • 重定向标准错误到文件,然后阅读,之后过程完成

std错误重定向示例:

Example for std error redirection:

ffmpeg -i myinput.avi {a-bunch-of-important-params} out.flv 2> /path/to/out.txt

过程完成后,您可以检查 out.txt

Once the process is done, you can inspect out.txt.

做第一个选项有点棘手,但这是可能的。 (我自己做了,所以有别人,看看周围的SO和网的细节。)

It's a bit trickier to do the first option, but it is possible. (I've done it myself. So have others. Have a look around SO and the net for details.)

这篇关于如何启用FFMPEG日志记录,哪里可以找到FFMPEG日志文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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