From 3157d757477edfc14f226a1e3ce430a97176e2d6 Mon Sep 17 00:00:00 2001 From: eisneinechse <42617957+eisneinechse@users.noreply.github.com> Date: Thu, 2 Jul 2020 16:54:32 -0700 Subject: [PATCH 1/3] Leave the values for qmin and qmax at their default values except for mpeg2. Changing them for the other codecs resultet in exporting with the wrong bitrate. --- src/FFmpegWriter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index d960d677..d8695501 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -1202,8 +1202,10 @@ AVStream *FFmpegWriter::add_video_stream() { ) { c->bit_rate = info.video_bit_rate; if (info.video_bit_rate >= 1500000) { - c->qmin = 2; - c->qmax = 30; + if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) { + c->qmin = 3; + c->qmax = 30; + } } // Here should be the setting for low fixed bitrate // Defaults are used because mpeg2 otherwise had problems From 9ef8f8478eca5b128c7bf7e6946c134e1ed82762 Mon Sep 17 00:00:00 2001 From: eisneinechse <42617957+eisneinechse@users.noreply.github.com> Date: Tue, 7 Jul 2020 10:14:02 -0700 Subject: [PATCH 2/3] Formating --- src/FFmpegWriter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index d8695501..e737462f 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -1202,10 +1202,10 @@ AVStream *FFmpegWriter::add_video_stream() { ) { c->bit_rate = info.video_bit_rate; if (info.video_bit_rate >= 1500000) { - if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) { - c->qmin = 3; - c->qmax = 30; - } + if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) { + c->qmin = 3; + c->qmax = 30; + } } // Here should be the setting for low fixed bitrate // Defaults are used because mpeg2 otherwise had problems From 6114be5e0ff9fbdd5ab439dbe98840a97afb8d7d Mon Sep 17 00:00:00 2001 From: eisneinechse <42617957+eisneinechse@users.noreply.github.com> Date: Tue, 7 Jul 2020 10:20:48 -0700 Subject: [PATCH 3/3] Fixed typo --- src/FFmpegWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FFmpegWriter.cpp b/src/FFmpegWriter.cpp index e737462f..158ef662 100644 --- a/src/FFmpegWriter.cpp +++ b/src/FFmpegWriter.cpp @@ -1203,7 +1203,7 @@ AVStream *FFmpegWriter::add_video_stream() { c->bit_rate = info.video_bit_rate; if (info.video_bit_rate >= 1500000) { if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) { - c->qmin = 3; + c->qmin = 2; c->qmax = 30; } }