Stefano Sabatini <[EMAIL PROTECTED]> added the comment:

ffprobe already performs such things (plus many others).
For example:

[EMAIL PROTECTED] ~> ~/src/ffprobe/src/ffprobe -show_streams test.avi 
FFprobe version SVN-r63, Copyright (c) 2007-2008 Stefano Sabatini.
  libavutil version: 49.7.0
  libavcodec version: 51.58.0
  libavformat version: 52.16.0
  libavdevice version: 52.0.0
  built on Jul  7 2008 13:05:01, gcc: 4.2.3 20071014 (prerelease) (Debian 
4.2.2-3)
Input #0, avi, from 'test.avi':
  Duration: 00:00:30.04, start: 0.000000, bitrate: 410 kb/s
    Stream #0.0: Video: h264, yuv420p, 320x240, 25.00 tb(r)
    Stream #0.1: Audio: mp2, 44100 Hz, mono, 64 kb/s
[STREAM]
codec_name=h264
codec_long_name=H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
decoder_time_base=1/25
codec_type=video
r_frame_rate=25.000000
r_frame_rate_num=25
r_frame_rate_den=1
width=320
height=240
gop_size=12
has_b_frames=0
sample_aspect_ratio=0/1
display_aspect_ratio=0/1
pix_fmt=yuv420p
index=0
time_base=1/25
start_time=0.000000 
duration=30.040000 
nb_frames=0
[/STREAM]
[STREAM]
codec_name=mp2
codec_long_name=MP2 (MPEG audio layer 2)
decoder_time_base=0/1
codec_type=audio
sample_rate=44100.000000 
channels=1
bits_per_sample=0
index=1
time_base=32/1225
start_time=0.000000 
duration=29.675102 
nb_frames=0
[/STREAM]

I developed it with the explicit intent (and hope) to get it into FFmpeg, so it
strives to be consistent with both behaviour and coding conventions of the ff*
tools.

XML output could be easily added using a filter for those who like it.

Not to say, I volunteer as a maintainer for it if we decide to integrate it into
FFmpeg, this will simplify many things (mainly related to the building) both for
me and for the ffprobe users.

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue442>
______________________________________________________

Reply via email to