ffmpeg 命令行将输出写入文本文件 [英] ffmpeg command line write output to a text file

查看:110
本文介绍了ffmpeg 命令行将输出写入文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此脚本在 ffmpeg 中进行镜头检测.

I'm using this script for shot detection in ffmpeg.

ffprobe -show_frames -of compact=p=0 -f lavfi "movie=test.mp4,select=gt(scene,0.3)"

我需要将输出写入文本文件,以便从 c 程序中读取输出.我怎样才能做到这一点?任何帮助表示赞赏.

I need to write the output into a text file in order to read the output from a c program. How can I do this? Any help is appreciated.

推荐答案

您将输出重定向到文件:

You redirect the output to a file:

ffprobe -show_frames -of compact=p=0 -f lavfi "movie=test.mp4,select=gt(scene,0.3)" >output.txt 2>&1

如果你想要 stdoutstderr 的单独文件,你可以这样做:

If you want separate files for stdout and stderr you can do:

<代码>[..] >out.txt 2>错误.txt

这篇关于ffmpeg 命令行将输出写入文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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