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

查看:72
本文介绍了如何启用 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

  • 在生成时捕获并解析它
  • 将标准错误重定向到一个文件并在该过程完成后读取该文件

标准错误重定向示例:

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天全站免登陆