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

Clément Bœsch ubitux at gmail.com
Sun Jan 8 13:44:12 CET 2012


On Sun, Jan 08, 2012 at 11:32:41AM +0100, Stefano Sabatini wrote:
> On date Saturday 2012-01-07 23:15:01 +0100, Clément Bœsch encoded:
> > On Sat, Jan 07, 2012 at 11:11:00PM +0100, Stefano Sabatini wrote:
> > > On date Saturday 2012-01-07 12:59:18 +0100, Clément Bœsch encoded:
> > > > On Sat, Jan 07, 2012 at 11:25:29AM +0100, Stefano Sabatini wrote:
> > > [...]
> > > > Another way of doing this would be to have -show_versions, and:
> [...]
> > > version: {
> > >    program: {
> > >       ...
> > >    },
> > >    ...
> > > 
> > > > 
> > > >     "libavformat": {
> > > >       "micro": ...
> > > >       "minor": ...
> > > >       "major": ...
> > > >     },
> > > > 
> > > >     "libav...": {
> > > >       ...
> > > >     },
> > > >   }
> > > 
> > > Possibly a good idea, but requires more changes in ffprobe.c (mainly
> > > in the JSON writer).
> > 
> > That was just a suggestion; if it's too much trouble to implement, I'm
> > fine with the current patch, push anytime you believe it's decent enough
> > :)
> 
> Now it is:
> 
> {
>     "versions": {
>         "program_version": {
>             "version": "N-36604-g029c58b",
>             "copyright": "Copyright (c) 2007-2012 the FFmpeg developers",
>             "build_date": "Jan  8 2012",
>             "build_time": "11:26:39",
>             "compiler_type": "gcc",
>             "compiler_version": "4.6.1",
>             "configuration": ...
>         },
>         "library_versions": [
>             {
>                 "name": "libavutil",
>                 "major": 51,
>                 "minor": 34,
>                 "micro": 100,
>                 "version": 3351140
>             },
>             {
>                 "name": "libavcodec",
>                 "major": 53,
>                 "minor": 54,
>                 "micro": 100,
>                 "version": 3487332
>             },
>             ...
>         ]
>     }

I forgot to mention that direct access can be a bit painful in this case:
you have to loop over the different libraries if you are looking for one
in particular (or sort them in a particular way).

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120108/d406cff5/attachment.asc>


More information about the ffmpeg-devel mailing list