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

Stefano Sabatini stefasab at gmail.com
Mon Jan 9 00:52:17 CET 2012


On date Sunday 2012-01-08 16:22:51 +0100, Stefano Sabatini encoded:
> On date Sunday 2012-01-08 13:44:12 +0100, Clément Bœsch encoded:
> > On Sun, Jan 08, 2012 at 11:32:41AM +0100, Stefano Sabatini wrote:
> [...]
> > > 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).
> 
> Forget previous patch, this one is much simpler, output is:
> 
> {
>     "program_version": {
>         "version": "N-36604-gf740540",
>         "copyright": "Copyright (c) 2007-2012 the FFmpeg developers",
>         "build_date": "Jan  8 2012",
>         "build_time": "16:12:59",
>         "compiler_type": "gcc",
>         "compiler_version": "4.6.1",
>         "configuration": ...
>     },
>     "library_versions": [
>         {
>             "name": "libavutil",
>             "major": 51,
>             "minor": 34,
>             "micro": 100,
>             "version": 3351140
>         },
>         ...
>     ]
> }
> -- 
> FFmpeg = Funny and Fancy Mean Puritan Eretic Guru

> From 1aab40fbf4b9c5c10b29921ede1b093d0cbabbd5 Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefasab at gmail.com>
> Date: Sun, 1 Jan 2012 17:19:58 +0100
> Subject: [PATCH] ffprobe: add -show_program_version and
>  -show_library_versions options
> 
> ---
>  doc/ffprobe.texi |   17 +++++++++++
>  doc/ffprobe.xsd  |   26 +++++++++++++++++
>  ffprobe.c        |   79 +++++++++++++++++++++++++++++++++++++++++++++++++++---
>  3 files changed, 118 insertions(+), 4 deletions(-)

I'll apply this in a few days if no one has better ideas.
-- 
FFmpeg = Frenzy Fabulous Mystic Ponderous Extended Guru


More information about the ffmpeg-devel mailing list