From 83583a7fc85cee34207ad12432327dda59377787 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 25 Mar 2025 21:34:47 +0100 Subject: Fill min/max bit rate in MPEG2 header so that e.g. mediainfo reports the expected numbers. --- src/mpeg2_transcode.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mpeg2_transcode.cc') diff --git a/src/mpeg2_transcode.cc b/src/mpeg2_transcode.cc index 0ac2c1af..b8a66647 100644 --- a/src/mpeg2_transcode.cc +++ b/src/mpeg2_transcode.cc @@ -162,6 +162,8 @@ MPEG2Compressor::MPEG2Compressor(dcp::Size size, int video_frame_rate, int64_t b _context->time_base = AVRational{1, video_frame_rate}; _context->pix_fmt = AV_PIX_FMT_YUV420P; _context->bit_rate = bit_rate; + _context->rc_max_rate = bit_rate; + _context->rc_min_rate = bit_rate; int const r = avcodec_open2(_context, _codec, nullptr); if (r < 0) { -- cgit v1.2.3