Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/i18n/en-US/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@
"Remote Controller": "Remote Controller",
"Third Party Connections": "Third Party Connections",
"Stream your phone camera or mobile game on the go with Streamlabs Mobile App.": "Stream your phone camera or mobile game on the go with Streamlabs Mobile App.",
"The currently configured encoder is not supported for the selected Dual Output destinations. Would you like to reset the stream encoder to Software (x264) or select a different encoder in settings?": "The currently configured encoder is not supported for the selected Dual Output destinations. Would you like to reset the stream encoder to Software (x264) or select a different encoder in settings?",
"The currently configured encoder is not supported for the selected Dual Output destinations. Please reset the stream encoder to Software (x264) or select a different encoder in settings.": "The currently configured encoder is not supported for the selected Dual Output destinations. Please reset the stream encoder to Software (x264) or select a different encoder in settings.",
"Cancel": "Cancel",
"Open Settings": "Open Settings",
"Use x264": "Use x264",
"Incompatible Codec Detected": "Incompatible Codec Detected",
"Use H.264 Codec": "Use H.264 Codec",
"Select Codec": "Select Codec",
Expand Down
4 changes: 4 additions & 0 deletions app/services/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,10 @@ export class SettingsService extends StatefulService<ISettingsServiceState> {
}
}

isValidEncoder(streamType: 'Stream' | 'StreamSecond' | 'Both') {
return obs.NodeObs.OBS_settings_isValidEncoder(streamType);
}

isEnhancedBroadcasting() {
return obs.NodeObs.OBS_settings_isEnhancedBroadcasting();
}
Expand Down
40 changes: 40 additions & 0 deletions app/services/streaming/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,46 @@ export class StreamingService
// save current settings in store so we can re-use them if something will go wrong
this.SET_GO_LIVE_SETTINGS(settings);

//if !streamShift, !multistream, and dual output mode is enabled, check for valid encoder and prompt user to change if necessary
if (!settings.streamShift && !this.views.isMultiplatformMode && this.views.isDualOutputMode) {
let streamToCheck = 'Both';

//special case for YouTube dual streaming because it doesn't use Stream/StreamSecond, just uses the main stream
const ytSettings = getDefined(settings.platforms.youtube);
if (ytSettings?.display === 'both') {
streamToCheck = 'Stream';
}

const validEncoder = this.settingsService.isValidEncoder(
streamToCheck as 'Stream' | 'StreamSecond' | 'Both',
);
if (!validEncoder) {
const choice = remote.dialog.showMessageBoxSync(this.windowsService.windows.child, {
type: 'error',
message: $t(
'The currently configured encoder is not supported for the selected Dual Output destinations. Would you like to reset the stream encoder to Software (x264) or select a different encoder in settings?',
),
defaultId: 2,
cancelId: 0,
buttons: [$t('Cancel'), $t('Open Settings'), $t('Use x264')],
noLink: true,
});
if (choice === 0) {
const newError = createStreamError('DUAL_OUTPUT_SETUP_FAILED');
newError.details = $t(
'The currently configured encoder is not supported for the selected Dual Output destinations. Please reset the stream encoder to Software (x264) or select a different encoder in settings.',
);
this.setError(newError);
return;
} else if (choice === 1) {
this.settingsService.actions.showSettings('Output');
return;
} else {
this.settingsService.actions.setDefaultVideoEncoder();
}
}
}

// show the GoLive checklist
this.UPDATE_STREAM_INFO({ lifecycle: 'runChecklist' });

Expand Down
Loading