[FFmpeg-devel] [PATCH] ffprobe integration

Stefano Sabatini stefano.sabatini-lala
Sat Jan 9 23:47:58 CET 2010


On date Friday 2010-01-08 13:31:52 +0100, Artur Bodera encoded:
> On Fri, Jan 8, 2010 at 12:54 AM, Stefano Sabatini
> <stefano.sabatini-lala at poste.it> wrote:
> > I'm aware of dump_format(), its non-easily parsable format is one of
> > the reasons of existence of ffprobe.
> 
> Just a quick user-based suggestion. Because of different applications
> of ffdump, please leave an option to choose the time format or report
> multiple time formats at once, for example:

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

with a +pretty flag == unit+sexagesimal+prefix+byte_binary_prefix

What we lack is some functions to convert flag <-> string, *or* we
could use an AVOption FFprobeContext (we should extend it, for example
is not yet possible to call a function for setting some value).

> --timeformat timestamp (default?)
>    Length: 00:23:15.22914
> 
> --timeformat sec
>    Length: 1395.22914
> 
> --timeformat frames
>    Length: 34881
> 
> --timeformat secframes
>    Length: 00:23:15.15
>
> Or all at once:
>   Length: 00:23:15.22914 (00:23:15.15, 34881 frames)

A duration is a time, the frames number is a different thing and
should go in a frames_nb fields (which unfortunately is not always
present in the header), also that would complicate the parsing which
is what I want to avoid.
 
> A short switch(){} and sprintf() in the code, an invaluable functionality.

Regards.
-- 
FFmpeg = Free and Foolish Mortal Power Esoteric Geisha



More information about the ffmpeg-devel mailing list