[FFmpeg-cvslog] avconv: link '-passlogfile' option to libx264 'stats' AVOption.

Anton Khirnov git at videolan.org
Wed Mar 14 03:54:17 CET 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Mar 12 17:42:57 2012 +0100| [6e8be949f12734f38d360aad0f5c503a0f9606fa] | committer: Anton Khirnov

avconv: link '-passlogfile' option to libx264 'stats' AVOption.

Fixes bug 204.

CC: libav-stable at libav.org

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

 avconv.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/avconv.c b/avconv.c
index 53a7661..518f8b8 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2497,6 +2497,9 @@ static int transcode_init(OutputFile *output_files,
                 snprintf(logfilename, sizeof(logfilename), "%s-%d.log",
                          pass_logfilename_prefix ? pass_logfilename_prefix : DEFAULT_PASS_LOGFILENAME_PREFIX,
                          i);
+                if (!strcmp(ost->enc->name, "libx264")) {
+                    av_dict_set(&ost->opts, "stats", logfilename, AV_DICT_DONT_OVERWRITE);
+                } else {
                 if (codec->flags & CODEC_FLAG_PASS1) {
                     f = fopen(logfilename, "wb");
                     if (!f) {
@@ -2515,6 +2518,7 @@ static int transcode_init(OutputFile *output_files,
                     }
                     codec->stats_in = logbuffer;
                 }
+                }
             }
         }
     }



More information about the ffmpeg-cvslog mailing list