ffmpeg command line write output to a text file

久未见 提交于 2019-11-30 08:25:40

问题


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)"

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.


回答1:


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

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

[..] > out.txt 2> err.txt



来源:https://stackoverflow.com/questions/29680391/ffmpeg-command-line-write-output-to-a-text-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!