Ffmpeg command line output to a text file

I use this script to detect a shot 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 to a text file in order to read the result from a c-program. How can i do this? Any help is appreciated.

+6
source share
1 answer

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 need separate files for stdout and stderr , you can do:

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

+15
source

Source: https://habr.com/ru/post/985282/


All Articles