diff --git a/Source/SettingsPublish.cpp b/Source/SettingsPublish.cpp index 9367c163..cde69a0b 100644 --- a/Source/SettingsPublish.cpp +++ b/Source/SettingsPublish.cpp @@ -315,6 +315,19 @@ void SettingsPublish::SetWarningInfo() } } + if (r->HasItem(L"supported audio codec")) + { + StringList codecs; + r->GetStringList(L"supported audio codec", codecs); + if (codecs.FindValueIndex(currentAudioCodec) == INVALID) + { + String msg = Str("Settings.Publish.Warning.UnsupportedAudioCodec"); //good thing OBS only supports MP3 (and AAC), otherwise I'd have to come up with a better translation solution + msg.FindReplace(L"$1", codecs[0].Array()); + msg.FindReplace(L"$2", currentAudioCodec.Array()); + strWarnings << msg; + } + } + break; } } diff --git a/rundir/locale/en.txt b/rundir/locale/en.txt index 0a28d85d..24a8d964 100644 --- a/rundir/locale/en.txt +++ b/rundir/locale/en.txt @@ -246,6 +246,7 @@ Settings.Publish.Warning.Maxbitrate="\tEncoding Settings: Reduce your maximum bi Settings.Publish.Warning.RecommendMainProfile="\tAdvanced Settings: Recommended x264 encoding profile is 'main' for this service\r\n\r\n" Settings.Publish.Warning.Keyint="\tAdvanced Settings: Set a keyframe interval of %d seconds\r\n\r\n" Settings.Publish.Warning.MaxAudiobitrate="\tEncoding Settings: Reduce your audio bitrate to %d\r\n\r\n" +Settings.Publish.Warning.UnsupportedAudioCodec="\tEncoding Settings: Set audio codec to '$1' instead of '$2'\r\n\r\n" Settings.Video.Custom="Custom:" Settings.Video.Device="Video Adapter:"