[FFmpeg-cvslog] avconv: add -stats option to enable/disable printing encoding progress

Anton Khirnov git at videolan.org
Mon Oct 10 03:59:50 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Oct  9 15:57:30 2011 +0200| [3460dd8acf457218980487cb99c47107af8531fb] | committer: Anton Khirnov

avconv: add -stats option to enable/disable printing encoding progress

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3460dd8acf457218980487cb99c47107af8531fb
---

 avconv.c        |    6 ++++++
 doc/avconv.texi |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/avconv.c b/avconv.c
index a5548ec..f1d23ed 100644
--- a/avconv.c
+++ b/avconv.c
@@ -132,6 +132,8 @@ static int input_sync;
 
 static float dts_delta_threshold = 10;
 
+static int print_stats = 1;
+
 static uint8_t *audio_buf;
 static uint8_t *audio_out;
 static unsigned int allocated_audio_out_size, allocated_audio_buf_size;
@@ -1313,6 +1315,9 @@ static void print_report(OutputFile *output_files,
     static int64_t last_time = -1;
     static int qp_histogram[52];
 
+    if (!print_stats && !is_last_report)
+        return;
+
     if (!is_last_report) {
         int64_t cur_time;
         /* display the report every 0.5 seconds */
@@ -3980,6 +3985,7 @@ static const OptionDef options[] = {
 #if CONFIG_AVFILTER
     { "filter", HAS_ARG | OPT_STRING | OPT_SPEC, {.off = OFFSET(filters)}, "set stream filterchain", "filter_list" },
 #endif
+    { "stats", OPT_BOOL, {&print_stats}, "print progress report during encoding", },
 
     /* video options */
     { "vframes", HAS_ARG | OPT_VIDEO | OPT_FUNC2, {(void*)opt_video_frames}, "set the number of video frames to record", "number" },
diff --git a/doc/avconv.texi b/doc/avconv.texi
index d585db8..74e9e77 100644
--- a/doc/avconv.texi
+++ b/doc/avconv.texi
@@ -191,6 +191,9 @@ codec-dependent.
 the stream. Use @code{-filters} to show all the available filters
 (including also sources and sinks).
 
+ at item -stats (@emph{global})
+Print encoding progress/statistics. On by default.
+
 @end table
 
 @section Video Options



More information about the ffmpeg-cvslog mailing list