[libav-bugs] [Bug 335] New: avprobe - easier machinable parsing output

bugzilla-daemon at aruru.libav.org bugzilla-daemon at aruru.libav.org
Fri Jul 20 12:31:03 CEST 2012


https://bugzilla.libav.org/show_bug.cgi?id=335

           Summary: avprobe - easier machinable parsing output
           Product: Libav
           Version: git HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: utilities
        AssignedTo: bugzilla at libav.org
        ReportedBy: ts at dmb.at


Created attachment 332
  --> https://bugzilla.libav.org/attachment.cgi?id=332
Patch for avprobe.c

Hi.

We are using ffmpeg and wanted to switch to libav - but avprobe is missing an
easy parsable output format. ffprobe has "-print_format compact" which is easy
parsable by grep. So we implemented it in avprobe.

Attached is the proposed Patch.
The infrastructure for more output formats was already in place - so this is a
minimal patch.


Sample output:
$ avprobe -show_streams -show_format -of compact test.mp4 2>/dev/null
format|filename=test.mp4|nb_streams=2|format_name=mov,mp4,m4a,3gp,3g2,mj2|format_long_name=QuickTime/MPEG-4/Motion
JPEG 2000
format|start_time=0.000000|duration=276.433560|size=22187608.000000|bit_rate=642110.000000|tag:major_brand=isom|tag:minor_version=512|tag:compatible_brands=isomiso2avc1mp41|tag:creation_time=2012-07-09
10:52:55|tag:encoder=Lavf54.6.100
stream|index=0|codec_name=h264|codec_long_name=H.264 / AVC / MPEG-4 AVC /
MPEG-4 part
10|codec_type=video|codec_time_base=1/50|codec_tag_string=avc1|codec_tag=0x31637661|profile=Main|width=1024|height=576|has_b_frames=2|pix_fmt=yuv420p|level=31|r_frame_rate=25/1|avg_frame_rate=25/1|time_base=1/25|start_time=0.000000|duration=276.400000|nb_frames=6910|tag:creation_time=2012-07-09
10:52:55|tag:language=eng
stream|index=1|codec_name=aac|codec_long_name=Advanced Audio
Coding|codec_type=audio|codec_time_base=1/44100|codec_tag_string=mp4a|codec_tag=0x6134706d|sample_rate=44100.000000|channels=2|bits_per_sample=0|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_time=0.000000|duration=276.433560|nb_frames=11905|tag:creation_time=2012-07-09
10:52:55|tag:language=eng

-- 
Configure bugmail: https://bugzilla.libav.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the libav-bugs mailing list