[FFmpeg-devel] [PATCH] ffprobe integration

Artur Bodera abodera
Mon Jan 11 12:44:42 CET 2010

On Sat, Jan 9, 2010 at 11:47 PM, Stefano Sabatini <
stefano.sabatini-lala at poste.it> wrote:

> I like this idea, we could make it even more general, maybe with
> something like:
> -format unit+sexagesimal+prefix+byte_binary_prefix

I don't think it is a good idea, because this makes the format not
customizable, just "switchable". For further parsing it would be harder, not
easier, to parse - let's think regex for parsing "-format unit+prefix" vs.
regex for parsing  "-format sexagesimal+byte_binary_prefix" or whatever

To make it easier, other cli-based video manipulation tools (unnamed :-) )
often use templates. If a common naming convention is set, we just need to
have "--dump-symbols" or "-symbols" that would output all possible

Then we would write for example:
     ffparse -format "Length: %length_sexagesimal %length_unit (%vframes,
%fps)"  test.mp4

     echo 'Length: %length_sexagesimal %length_unit (%vframes, %fps)' >
     echo 'Read from a file that has %audio_channels audio channels' >>
     ffparse -formatfile format.txt test.mp4

This makes it ultra-flexible and easily extensible. For other tasks (not
using formats), a generic info template would be used to output all the
commonly-used information.

I can read your mind - I know it sucks because it's extra work, but it will
probably be easier to maintain in the future - for you and other
maintainers. It would also offer expandability if there is new info to
output, instead of grepping multiple files, there would be one place to add
a symbol and one place to add reader/parser.


    /.)\   +48 695 600 936
    \(./   abodera at gmail.com

More information about the ffmpeg-devel mailing list