[FFmpeg-devel] [PATCH] ffmpeg: add -progress option.

Michael Niedermayer michaelni at gmx.at
Thu Jul 12 03:44:18 CEST 2012


On Thu, Jul 12, 2012 at 01:54:57AM +0200, Stefano Sabatini wrote:
> On date Sunday 2012-07-08 13:41:22 +0200, Nicolas George encoded:
> > It allows to send program-friendly (easy to parse)
> > progress information to a file or an URL.
> > 
> > Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> [...]
> > @@ -2135,14 +2151,35 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
> >               (100 * us) / AV_TIME_BASE);
> >      snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
> >               "bitrate=%6.1fkbits/s", bitrate);
> > +    av_bprintf(&buf_script, "total_size=%"PRId64"\n", total_size);
> > +    av_bprintf(&buf_script, "out_time_ms=%"PRId64"\n", pts);
> > +    av_bprintf(&buf_script, "out_time=%02d:%02d:%02d.%06d\n",
> > +               hours, mins, secs, us);
> >  
> >      if (nb_frames_dup || nb_frames_drop)
> >          snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), " dup=%d drop=%d",
> >                  nb_frames_dup, nb_frames_drop);
> > +    av_bprintf(&buf_script, "dup=%d\n", nb_frames_dup);
> > +    av_bprintf(&buf_script, "drop=%d\n", nb_frames_drop);
> >  
> 
> > +    if (print_stats || is_last_report) {
> >      av_log(NULL, AV_LOG_INFO, "%s    \r", buf);
> >  
> >      fflush(stderr);
> > +    }
> 
> unrelated?
> 
> [...]
> 
> Also could you show an instance of such an output? Just in case we
> have some ideas for making it more beatiful.
> 
> (Note: there is always the parsing problem, again a generic solution
> may involve a writer API).
> 

> Looks good otherwise (but maybe wait a comment from Michael).

no need to wait for me ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120712/3d8e513d/attachment.asc>


More information about the ffmpeg-devel mailing list