Browse Source

obs-ffmpeg: Localize NVENC error dialog messages

Localize messages for lack of 10-bit support, and exceeding the hardware
B-frame limit.
jpark37 3 years ago
parent
commit
f21ea744f8
2 changed files with 4 additions and 3 deletions
  1. 2 0
      plugins/obs-ffmpeg/data/locale/en-US.ini
  2. 2 3
      plugins/obs-ffmpeg/jim-nvenc.c

+ 2 - 0
plugins/obs-ffmpeg/data/locale/en-US.ini

@@ -30,6 +30,8 @@ NVENC.LookAhead.ToolTip="Enables dynamic B-frames.\n\nIf disabled, the encoder w
 NVENC.PsychoVisualTuning="Psycho Visual Tuning"
 NVENC.PsychoVisualTuning.ToolTip="Enables encoder settings that optimize the use of bitrate for increased perceived visual quality,\nespecially in situations with high motion, at the cost of increased GPU utilization."
 NVENC.CQLevel="CQ Level"
+NVENC.10bitUnsupported="Cannot perform 10-bit encode on this encoder"
+NVENC.TooManyBFrames="Max B-frames setting (%d) is more than encoder supports (%d)"
 
 FFmpegSource="Media Source"
 LocalFile="Local File"

+ 2 - 3
plugins/obs-ffmpeg/jim-nvenc.c

@@ -972,13 +972,12 @@ static bool init_encoder(struct nvenc_data *enc, bool hevc,
 #endif
 
 	if (obs_p010_tex_active() && !support_10bit) {
-		NV_FAIL("Cannot perform 10-bit encode on this encoder");
+		NV_FAIL(obs_module_text("NVENC.10bitUnsupported"));
 		return false;
 	}
 
 	if (bf > bf_max) {
-		NV_FAIL("Max B-frames setting (%d) is more than encoder supports (%d)",
-			bf, bf_max);
+		NV_FAIL(obs_module_text("NVENC.TooManyBFrames"), bf, bf_max);
 		return false;
 	}