obs-webrtc: Add Simulcast Support #10885
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds supports for Simulcast to the obs-webrtc output. Simulcast allows for multiple quality levels to be sent over one track in WebRTC.
RFC 8853 is a technical description. For a less technical explanation Wowza, Dolby and LiveKit have all written articles on it.
This PR starts with adding a checkbox to enable it when the
![image](https://private-user-images.githubusercontent.com/1302304/340906445-47c584ca-371c-4487-866a-94e5bf16b10b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODkxNTgsIm5iZiI6MTcxOTk4ODg1OCwicGF0aCI6Ii8xMzAyMzA0LzM0MDkwNjQ0NS00N2M1ODRjYS0zNzFjLTQ0ODctODY2YS05NGU1YmYxNmIxMGIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMDY0MDU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWY1YjI2MzZhOGJjYzQ0ZDI4ZGQyMTg2ODFkMzJkNDUzMTY0NTVlMzU5MDI1NzEyY2NiZTZmOThhYTA0ODI0OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.r1_e-zon3l1QRifoFMxdA_0CvZbO3EEmIfxHPW-SnRM)
WHIP Service
is enabled.When enabled it sends two additional video streams. They are encoded at 1/2 and 1/4 bitrate + resolution.
Motivation and Context
Some questions that have been asked by reviewers already.
What about Enhanced Broadcasting? - Simulcast is part of an existing standard that already sees a billion minutes per day so it is here to stay and is already deployed massively. I would like to see Enhanced Broadcasting in the JSON blob be able to specify the protocol. When a user starts a enhanced broadcasting session it should be able to switch between RTMP/WebRTC/$x. I think both flows can/should exist because they serve different purposes.
UI/UX Considerations - A single opt-in checkbox is non-intrusive and respects the user. The configuration of 50% and 25% is not a standard, but is a common pattern. It would be good to get feedback from all OBS WebRTC users (Dolby, LiveKit, Cloudflare etc...) that this is a sound decision though.
How Has This Been Tested?
This has been tested with the nvenc, qsv, and x264.
I have tested this against Twitch, Broadcast Box, LiveKit and Dolby.
Types of changes
Checklist: