From 012378b69e0db697308e82c8ac03d1e14b91f075 Mon Sep 17 00:00:00 2001 From: Norbert Schlia Date: Fri, 9 Aug 2024 09:58:32 +0200 Subject: [PATCH] Changed quality from 34 to 40 for hardware encoded video streams to create slightly smaller files. --- HISTORY.md | 1 + NEWS | 2 ++ README.md | 1 + src/ffmpeg_transcoder.cc | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 15cc2da0..6dd8a3b7 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ History - **Bugfix:** Wrong error message fixed when an invalid audio/video codec was selected. The message should rather say "unsupported codec" instead of talking about "sample format not supported.". - **Bugfix:** Issue [#162](https://github.com/nschlia/ffmpegfs/issues/162): If not present, add time stamps to the copied streams. +- Changed quality from 34 to 40 for hardware encoded video streams to create slightly smaller files. **New in 2.16 (2024-06-10):** diff --git a/NEWS b/NEWS index 66ff6148..63a3345d 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ Important changes in 2.17 (2024-08-XX): selected. The message should rather say "unsupported codec" instead of talking about "sample format not supported.". * Bugfix: Issue #162: If not present, add time stamps to the copied streams. +* Changed quality from 34 to 40 for hardware encoded video streams to create + slightly smaller files. Important changes in 2.16 (2024-06-10): diff --git a/README.md b/README.md index ae78c267..d0524888 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ To see what's been done so far, checkout the [windows](https://github.com/nschli - **Bugfix:** Wrong error message fixed when an invalid audio/video codec was selected. The message should rather say "unsupported codec" instead of talking about "sample format not supported.". - **Bugfix:** Issue [#162](https://github.com/nschlia/ffmpegfs/issues/162): If not present, add time stamps to the copied streams. +- Changed quality from 34 to 40 for hardware encoded video streams to create slightly smaller files. **New in 2.16 (2024-06-10):** diff --git a/src/ffmpeg_transcoder.cc b/src/ffmpeg_transcoder.cc index 35ccfc0e..ce0b0e7d 100644 --- a/src/ffmpeg_transcoder.cc +++ b/src/ffmpeg_transcoder.cc @@ -2001,7 +2001,7 @@ int FFmpeg_Transcoder::add_stream(AVCodecID codec_id) // Logging::error(virtname(), "Could not set 'qp' for %1 output codec %2 (error '%3').", get_media_type_string(output_codec->type), get_codec_name(codec_id), ffmpeg_geterror(ret).c_str()); // return ret; //} - output_codec_ctx->global_quality = 34; + output_codec_ctx->global_quality = 40; } // Avoid mismatches for H264 and profile