Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ffmpeg command line write output to a text file

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.

like image 317
Asanka sanjaya Avatar asked Apr 16 '15 16:04

Asanka sanjaya


1 Answers

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

like image 161
aergistal Avatar answered Oct 10 '22 10:10

aergistal