[FFmpeg-devel] [PATCH] ffprobe: add -show_headers_first option

Dave Rice dave at dericed.com
Sun Sep 4 21:35:18 EEST 2016

> On Sep 4, 2016, at 1:09 PM, Nicolas George <george at nsup.org> wrote:
> Le nonidi 19 fructidor, an CCXXIV, Stefano Sabatini a écrit :
>> This is meant to be used for generating output suitable for the
>> ffprobe_default demuxer.
>> ---
>> ffprobe.c | 30 ++++++++++++++++++++++++++----
>> 1 file changed, 26 insertions(+), 4 deletions(-)
> I find the naming a bit clumsy. It says what it says, but what it the next
> step? -show_format_after_frames_but_before_streams?
> I would like to suggest another avenue, a little more work but not by much:
> deprecate all the -show_<section> options, and replace them by a single
> -show option that takes the sections name in order:
> ffprobe -show packets,streams,format
> would be equivalent to the current "ffprobe -show_frames -show_streams
> -show_format", but:
> ffprobe -show format,streams,packets
> would yield the same result as with -show_headers_first.
> The syntax could later be updated for various extra features:
> ffprobe -show format,streams,packets,rewind,packets+frames=silent=1,streams
> I do not know how it interacts with the -show_entries feature, but I must
> say I never understood how the -show_entries feature works.

I’m not clear as to the reasoning for this, as the ordering of the elements doesn’t effect any of the meaing of the xml. However I wanted to note that such reordering would create invalid ffprobe xml. ffprobe.xsd defines the elements in a `sequence`, so if the order of elements is really arbitrary it should be changed to a `choice`.
Dave Rice

More information about the ffmpeg-devel mailing list