obs-ffmpeg: Add localization for NVENC error messages

master
Richard Stanway 2020-04-27 01:22:05 +02:00
parent 0ea39baf95
commit 35e218e05b
3 changed files with 21 additions and 26 deletions

View File

@ -58,3 +58,11 @@ ReplayBuffer.Save="Save Replay"
HelperProcessFailed="Unable to start the recording helper process. Check that OBS files have not been blocked or removed by any 3rd party antivirus / security software."
UnableToWritePath="Unable to write to %1. Make sure you're using a recording path which your user account is allowed to write to and that there is sufficient disk space."
WarnWindowsDefender="If Windows 10 Ransomware Protection is enabled it can also cause this error. Try turning off controlled folder access in Windows Security / Virus & threat protection settings."
NVENC.Error="Failed to open NVENC codec: %1"
NVENC.GenericError="Check your video drivers are up to date. Try closing other recording software which might be using NVENC such as NVIDIA Shadowplay or Windows 10 Game DVR."
NVENC.BadGPUIndex="You have selected GPU %1 in your output encoder settings. Set this back to 0 and try again."
NVENC.OutdatedDriver="Your current video card driver does not support this NVENC version, please update your drivers."
NVENC.UnsupportedDevice="NVENC Error: Unsupported device. Check your video card supports NVENC and that the drivers are up to date."
NVENC.TooManySessions="NVENC Error: Too many concurrent sessions. Try closing other recording software which might be using NVENC such as NVIDIA Shadowplay or Windows 10 Game DVR."
NVENC.CheckDrivers="Please check your video drivers are up to date."

View File

@ -21,18 +21,12 @@ bool nv_failed(obs_encoder_t *encoder, NVENCSTATUS err, const char *func,
case NV_ENC_ERR_OUT_OF_MEMORY:
obs_encoder_set_last_error(
encoder,
"NVENC Error: Too many concurrent sessions. "
"Try closing other recording software which might "
"be using NVENC such as Windows 10 Game DVR.");
encoder, obs_module_text("NVENC.TooManySessions"));
break;
case NV_ENC_ERR_UNSUPPORTED_DEVICE:
obs_encoder_set_last_error(
encoder,
"NVENC Error: Unsupported device. Check your "
"video card supports NVENC and that the drivers are "
"up to date.");
encoder, obs_module_text("NVENC.UnsupportedDevice"));
break;
default:
@ -140,9 +134,7 @@ static inline bool init_nvenc_internal(obs_encoder_t *encoder)
NVENCAPI_MINOR_VERSION;
if (cur_ver > ver) {
obs_encoder_set_last_error(
encoder,
"Your current video card driver does not support "
"this NVENC version, please update your drivers.");
encoder, obs_module_text("NVENC.OutdatedDriver"));
error("Current driver version does not support this NVENC "
"version, please upgrade your driver");

View File

@ -96,23 +96,18 @@ static bool nvenc_init_codec(struct nvenc_encoder *enc)
if (!obs_encoder_get_last_error(enc->encoder)) {
struct dstr error_message = {0};
// special case for common NVENC error
dstr_copy(&error_message,
obs_module_text("NVENC.Error"));
dstr_replace(&error_message, "%1", av_err2str(ret));
dstr_cat(&error_message, "\r\n\r\n");
if (ret == AVERROR_EXTERNAL) {
dstr_printf(
&error_message,
"Failed to open NVENC codec: %s\r\n\r\n"
"Check your video drivers are up to "
"date. Disable other software that may "
"be using NVENC such as NVIDIA "
"ShadowPlay or Windows 10 Game "
"DVR.",
av_err2str(ret));
// special case for common NVENC error
dstr_cat(&error_message,
obs_module_text("NVENC.GenericError"));
} else {
dstr_printf(
&error_message,
"Failed to open NVENC codec: %s\r\n\r\n"
"Please check your video drivers are up to date.",
av_err2str(ret));
dstr_cat(&error_message,
obs_module_text("NVENC.CheckDrivers"));
}
obs_encoder_set_last_error(enc->encoder,