[FFmpeg-devel] [PATCH] filters/metadata: add CSV output support

Werner Robitza werner.robitza at gmail.com
Thu Feb 25 13:58:22 EET 2021


On Thu, Feb 25, 2021 at 12:47 PM Nicolas George <george at nsup.org> wrote:
> Werner Robitza (12021-02-25):
> > After fiddling around a bit, when I run:
> >
> > ffprobe -loglevel error -f lavfi -i "testsrc,signalstats"
> > -show_entries tags -of csv=nk=0 | head -n 1
> >
> > I get a line like:
> >
> > packet,tag:lavfi.signalstats.YMIN=16,tag:lavfi.signalstats.YLOW=16,…
>
> I doubt ffprobe did output an ellipsis character on its own.

That's why I wrote "like" – I am sure you were able to interpret the
meaning of the ellipsis in this example.

> For simpler parsing, use a different writer than csv. I would recommend
> flat.

That seems to be a custom format, so parsing is inherently more
complex, and there's no support for simply loading this in whatever
tool you have for data analysis (Excel, MATLAB, R, Python, …). Hence
the usefulness of semantically meaningfully structured CSV.

I guess I could live with replacing the "flat" output dots with
commas, and the equal sign with another comma, but that's bound to
break with some metadata value contents.


More information about the ffmpeg-devel mailing list