[FFmpeg-devel] [PATCH] ffprobe integration

Stefano Sabatini stefano.sabatini-lala
Tue Feb 9 02:08:47 CET 2010


On date Monday 2010-02-08 15:39:11 +0100, Michael Niedermayer encoded:
> On Mon, Feb 08, 2010 at 01:01:59AM +0100, Stefano Sabatini wrote:
[...]
> > Also once given the get_flags function
> > this requires also less code (just one line and the flags definitions)
> > / options (just one compared to N).
> 
> huh?
> you need 2 lines for what i suggest
> static int print_unit;
> and a single line in the cmdline parsing array that contains the string,
> help text, default value, ...
> 
> your code does NOT work with less, you need at least the enum and
> flag_descriptor
> but its much messier, has no default, no help text

So what about to use opt.c? This has all the features you're asking
for, and the flexibility I aim to.

Sample ouput:

ffprobe -show format+streams -format +pretty in.avi
[STREAM]
index=0
codec_name=mpeg4
codec_long_name=MPEG-4 part 2
codec_type=video
codec_time_base=1/25
codec_tag_string=FMP4
codec_tag=0x34504d46
width=199
height=199
has_b_frames=0
sample_aspect_ratio=5:4
display_aspect_ratio=5:4
pix_fmt=yuv420p
r_frame_rate=25/1
avg_frame_rate=0/0
time_base=1/25
start_time=0:00:00.000000
duration=0:00:53.400000
[/STREAM]
[STREAM]
index=1
codec_name=mp2
codec_long_name=MP2 (MPEG audio layer 2)
codec_type=audio
codec_time_base=0/1
codec_tag_string=P___
codec_tag=0x0050
sample_rate=48.000 KHz
channels=2
bits_per_sample=0
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=3/125
start_time=0:00:00.000000
duration=0:00:53.328000
[/STREAM]
[FORMAT]
filename=in.avi
nb_streams=2
format_name=avi
format_long_name=AVI format
start_time=0:00:00.000000
duration=0:00:53.400000
size=1.873 Mibyte
bit_rate=294.232 Kbit/s
ISFT=Lavf52.41.0
[/FORMAT]

Regards.
-- 
FFmpeg = Fucking and Fiendish Magical Philosophical Evangelical Ghost
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-ffprobe.patch
Type: text/x-diff
Size: 20314 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100209/45f685c2/attachment.patch>



More information about the ffmpeg-devel mailing list