From 21ebc2365dd7a66c05d130dc87861f7399ae834b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 5 Apr 2024 23:17:03 +0200 Subject: Allow specification of video bit rate separately for J2K and MPEG2. --- src/lib/create_cli.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/create_cli.cc') diff --git a/src/lib/create_cli.cc b/src/lib/create_cli.cc index b33537974..8fe5a2a14 100644 --- a/src/lib/create_cli.cc +++ b/src/lib/create_cli.cc @@ -320,8 +320,8 @@ CreateCLI::CreateCLI (int argc, char* argv[]) _name = content[0].path.filename().string(); } - if (_video_bit_rate && (*_video_bit_rate < 10000000 || *_video_bit_rate > Config::instance()->maximum_video_bit_rate())) { - error = String::compose("%1: video-bit-rate must be between 10 and %2 Mbit/s", argv[0], (Config::instance()->maximum_video_bit_rate() / 1000000)); + if (_video_bit_rate && (*_video_bit_rate < 10000000 || *_video_bit_rate > Config::instance()->maximum_video_bit_rate(VideoEncoding::JPEG2000))) { + error = String::compose("%1: video-bit-rate must be between 10 and %2 Mbit/s", argv[0], (Config::instance()->maximum_video_bit_rate(VideoEncoding::JPEG2000) / 1000000)); return; } } @@ -373,7 +373,7 @@ CreateCLI::make_film() const film->set_resolution(Resolution::FOUR_K); } if (_video_bit_rate) { - film->set_video_bit_rate(*_video_bit_rate); + film->set_video_bit_rate(VideoEncoding::JPEG2000, *_video_bit_rate); } int channels = 6; -- cgit v1.2.3