encoders/handlers/nvenc: Don't list 'each' mode for H.264

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2020-07-06 00:51:15 +02:00
parent c9e8b889b0
commit 75663f73a4
2 changed files with 5 additions and 1 deletions

View file

@ -471,8 +471,8 @@ FFmpegEncoder.NVENC.Other="Other Options"
FFmpegEncoder.NVENC.Other.BFrames="Maximum B-Frames"
FFmpegEncoder.NVENC.Other.BFrames.Description="Maximum number of B-Frames to insert into the encoded bitstream.\nActual number of B-Frames may be lower depending on content and lookahead settings.\nOnly Turing NVENC supports B-Frames for HEVC."
FFmpegEncoder.NVENC.Other.BFrameReferenceMode="B-Frame Reference Mode"
FFmpegEncoder.NVENC.Other.BFrameReferenceMode.Each="Each B-Frame will be used for references"
FFmpegEncoder.NVENC.Other.BFrameReferenceMode.Middle="Only (# of B-Frames)/2 will be used for references"
FFmpegEncoder.NVENC.Other.BFrameReferenceMode.Each="Each B-Frame will be used for references"
FFmpegEncoder.NVENC.Other.ZeroLatency="Zero Latency"
FFmpegEncoder.NVENC.Other.ZeroLatency.Description="Enable zero latency operation, which ensures that there is no reordering delay."
FFmpegEncoder.NVENC.Other.WeightedPrediction="Weighted Prediction"

View file

@ -441,6 +441,10 @@ void nvenc::get_properties_post(obs_properties_t* props, const AVCodec* codec)
obs_properties_add_list(grp, KEY_OTHER_BFRAMEREFERENCEMODE, D_TRANSLATE(ST_OTHER_BFRAMEREFERENCEMODE),
OBS_COMBO_TYPE_LIST, OBS_COMBO_FORMAT_INT);
for (auto kv : b_ref_modes) {
if (kv.first == nvenc::b_ref_mode::EACH && (static std::string_view("h264_nvenc") == codec->name)) {
// H.264 does not support using all B-Frames as reference.
continue;
}
obs_property_list_add_int(p, D_TRANSLATE(kv.second.c_str()), static_cast<std::int64_t>(kv.first));
}
}