]> git.sesse.net Git - ffmpeg/commitdiff
ffmpeg_opt.c: Introduce a -vstats_version option and document the existing -vstats...
authorSasi Inguva <isasi-at-google.com@ffmpeg.org>
Tue, 24 Jan 2017 16:23:54 +0000 (08:23 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 25 Jan 2017 21:03:10 +0000 (22:03 +0100)
Signed-off-by: Sasi Inguva <isasi@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
doc/ffmpeg.texi
ffmpeg.h
ffmpeg_opt.c

index b56bdbe261b3db1f1f569feaf57f28496e9171ab..cdea1a271fd3e7f0e509f5eaee65878036f2f1ec 100644 (file)
@@ -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}.
+@item -vstats_version @var{file}
+Specifies which version of the vstats format to use. If version is 1, format is
+
+@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}
index 75bf50ec29d307e509e957db8ec89b490dff841a..458bb8a3dc280623494657db2a8ea2cbe9369dd2 100644 (file)
--- 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;
 
index a1c02fc29b2494d478513ea2581fccd8fce28d8d..b1a62e8620d90ffa410ff3cb27d9afbb934c0130 100644 (file)
@@ -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 |