[FFmpeg-user] astats to csv file

Reino Wijnsma rwijnsma at xs4all.nl
Sat Feb 13 13:43:17 EET 2021


On 2021-02-11T16:39:47+0100, Benjamin Houtman <houtmania at gmail.com> wrote:
> I ran the
>
> ffprobe -f lavfi -i amovie=X.flac,astats=metadata=1 -show_frames -of csv
>
> command, but I don't need the entire printout, just the "Parsed_astats..."
> data that appears at the end of the printout. How would I limit the results
> to just that?
You could try Xidel [1] to parse FFprobe's output.

Assuming you're on Windows:

ffprobe -f lavfi -i "amovie='X.flac',astats=metadata=1" 2>&1 | xidel - -se "x:lines($raw)[starts-with(.,'[Parsed_astats')] ! replace(substring(.,30),': ',',')"

Swap the single- and double-quotes if you're on Unix.

[1]: http://videlibri.sourceforge.net/xidel.html

-- 
Reino



More information about the ffmpeg-user mailing list