[FFmpeg-cvslog] ffmpeg_opt.c: Introduce a -vstats_version option and document the existing -vstats format.

Sasi Inguva git at videolan.org
Wed Jan 25 23:58:35 EET 2017


ffmpeg | branch: master | Sasi Inguva <isasi-at-google.com at ffmpeg.org> | Tue Jan 24 08:23:54 2017 -0800| [f227fc4c2a9f355d787621f8c3698bd1921fb019] | committer: Michael Niedermayer

ffmpeg_opt.c: Introduce a -vstats_version option and document the existing -vstats format.

Signed-off-by: Sasi Inguva <isasi at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 doc/ffmpeg.texi | 4 ++++
 ffmpeg.h        | 1 +
 ffmpeg_opt.c    | 3 +++
 3 files changed, 8 insertions(+)

diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi
index b56bdbe..cdea1a2 100644
--- a/doc/ffmpeg.texi
+++ b/doc/ffmpeg.texi
@@ -636,6 +636,10 @@ Calculate PSNR of compressed frames.
 Dump video coding statistics to @file{vstats_HHMMSS.log}.
 @item -vstats_file @var{file}
 Dump video coding statistics to @var{file}.
+ at item -vstats_version @var{file}
+Specifies which version of the vstats format to use. If version is 1, format is
+
+ at code{frame= %5d q= %2.1f PSNR= %6.2f f_size= %6d s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s}
 @item -top[:@var{stream_specifier}] @var{n} (@emph{output,per-stream})
 top=1/bottom=0/auto=-1 field first
 @item -dc @var{precision}
diff --git a/ffmpeg.h b/ffmpeg.h
index 75bf50e..458bb8a 100644
--- a/ffmpeg.h
+++ b/ffmpeg.h
@@ -597,6 +597,7 @@ extern char *videotoolbox_pixfmt;
 
 extern int filter_nbthreads;
 extern int filter_complex_nbthreads;
+extern int vstats_version;
 
 extern const AVIOInterruptCB int_cb;
 
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index a1c02fc..b1a62e8 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -121,6 +121,7 @@ int frame_bits_per_raw_sample = 0;
 float max_error_rate  = 2.0/3;
 int filter_nbthreads = 0;
 int filter_complex_nbthreads = 0;
+int vstats_version = 1;
 
 
 static int intra_only         = 0;
@@ -3547,6 +3548,8 @@ const OptionDef options[] = {
         "dump video coding statistics to file" },
     { "vstats_file",  OPT_VIDEO | HAS_ARG | OPT_EXPERT ,                         { .func_arg = opt_vstats_file },
         "dump video coding statistics to file", "file" },
+    { "vstats_version",  OPT_VIDEO | OPT_INT | HAS_ARG | OPT_EXPERT ,            { &vstats_version },
+        "Version of the vstats format to use."},
     { "vf",           OPT_VIDEO | HAS_ARG  | OPT_PERFILE | OPT_OUTPUT,           { .func_arg = opt_video_filters },
         "set video filters", "filter_graph" },
     { "intra_matrix", OPT_VIDEO | HAS_ARG | OPT_EXPERT  | OPT_STRING | OPT_SPEC |



More information about the ffmpeg-cvslog mailing list