Skip to content

Conversation

@aleksandr-voitenko
Copy link
Collaborator

@aleksandr-voitenko aleksandr-voitenko commented Jan 27, 2026

Description

This code allows Enhanced Broadcasting to be used with the new back-end API.
At first I was trying to implement it as a simple Boolean flag in the settings, but soon realized that dual output mode would be near impossible to implement this way, so I came up to a new design.

export interface IEnhancedBroadcastingAdvancedStreaming extends IAdvancedStreaming {
    // If set, the Enhanced Broadcasting stream will be in the Dual Output mode.
    // This value should be initialized before the stream start.
    additionalVideo?: IVideo,
}
export interface IEnhancedBroadcastingAdvancedStreamingFactory {
    create(): IEnhancedBroadcastingAdvancedStreaming;
    destroy(stream: IEnhancedBroadcastingAdvancedStreaming): void;
    legacySettings: IEnhancedBroadcastingAdvancedStreaming;
}

Essentially, in the example above you see AdvancedStreaming enhanced by the optional canvas.

Interface of Streaming has also changes slightly. Now presence of an encoder is optional.

export interface IStreaming {
    // Video encoder value is ignored in the Enhanced Broadcasting mode
    videoEncoder?: IVideoEncoder;
    ...

Why this design?

Mainly because of the Twitch Dual Streaming mode that requires vertical and horizontal videos to be streamed to a single endpoint.

On top of that

I refactored and generalized code related to streaming. Additionally, improved encapsulation of several classes.
I refactored existing Enhanced Broadcasting code to support both new and old (OBS_service) APIs. As a result, backward compatibility is enabled.

And finally

Error handling has been improved, especially during stream start.

How Has This Been Tested?

Manually and via unit tests. Windows only.

Types of changes

  • New feature (non-breaking change which adds functionality) -->

@aleksandr-voitenko aleksandr-voitenko force-pushed the enhanced-broadcasting-new-api branch from 8f2a0b2 to 9f211b5 Compare January 27, 2026 17:48
@aleksandr-voitenko aleksandr-voitenko force-pushed the enhanced-broadcasting-new-api branch from d99331e to f68fb07 Compare January 28, 2026 14:14
@aleksandr-voitenko aleksandr-voitenko force-pushed the enhanced-broadcasting-new-api branch from f68fb07 to 2a373b3 Compare January 28, 2026 14:30
@aleksandr-voitenko aleksandr-voitenko changed the title [WIP] Enhanced broadcasting new API Enhanced broadcasting new API Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants