[FFmpeg-devel] [PATCH] ffprobe: show codec_time_base in streams section

Stefano Sabatini stefasab at gmail.com
Fri Sep 14 11:04:10 CEST 2012


On date Friday 2012-09-14 10:33:11 +0200, Stefano Sabatini encoded:
> On date Friday 2012-09-14 02:32:00 +0200, Clément Bœsch encoded:
> > On Thu, Sep 13, 2012 at 11:36:59AM +0200, Stefano Sabatini wrote:
> > > The field is useful to compute times from values expressed in codec time
> > > base units, for example the duration field in the "frame" section.
> > > ---
> > >  doc/ffprobe.xsd |    1 +
> > >  ffprobe.c       |    1 +
> > >  2 files changed, 2 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd
> > > index 9549bdb..6ea27a5 100644
> > > --- a/doc/ffprobe.xsd
> > > +++ b/doc/ffprobe.xsd
> > > @@ -123,6 +123,7 @@
> > >        <xsd:attribute name="r_frame_rate"     type="xsd:string" use="required"/>
> > >        <xsd:attribute name="avg_frame_rate"   type="xsd:string" use="required"/>
> > >        <xsd:attribute name="time_base"        type="xsd:string" use="required"/>
> > > +      <xsd:attribute name="codec_time_base"  type="xsd:string" use="required"/>
> > >        <xsd:attribute name="start_pts"        type="xsd:long"/>
> > >        <xsd:attribute name="start_time"       type="xsd:float"/>
> > >        <xsd:attribute name="duration_ts"      type="xsd:long"/>
> > > diff --git a/ffprobe.c b/ffprobe.c
> > > index a770a25..6b7e3ff 100644
> > > --- a/ffprobe.c
> > > +++ b/ffprobe.c
> > > @@ -1717,6 +1717,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
> > >      print_q("r_frame_rate",   stream->r_frame_rate,   '/');
> > >      print_q("avg_frame_rate", stream->avg_frame_rate, '/');
> > >      print_q("time_base",      stream->time_base,      '/');
> > > +    print_q("codec_time_base", stream->codec->time_base, '/');
> > >      print_ts  ("start_pts",   stream->start_time);
> > >      print_time("start_time",  stream->start_time, &stream->time_base);
> > >      print_ts  ("duration_ts", stream->duration);
> > 
> > This field seems already printed, why the dup?
> 
> codec time-base != stream time-base

No you're right, patch dropped.
-- 
FFmpeg = Frightening and Faithless Multimedia Problematic Ecstatic Glue


More information about the ffmpeg-devel mailing list