Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obs-webrtc: Add Simulcast Support #10885

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sean-Der
Copy link
Contributor

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 WHIP Service is enabled.
image

When enabled it sends two additional video streams. They are encoded at 1/2 and 1/4 bitrate + resolution.

Motivation and Context

  • Low Latency - Decoding/Re-encoding adds too much latency for interactive content
  • Make self hosting easier - Running ffmpeg is costly and difficult to scale
  • Streamers more control - If streamers can generate transcodes they control the quality
  • E2E Encryption/Prevent Modification- Streamers can distribute keys to viewers and servers can't modify video anymore.

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

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

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM WizardCM added the New Feature New feature or plugin label Jun 19, 2024
@Sean-Der
Copy link
Contributor Author

Hi @tytan652 I see you gave a 👎 was that an accident? Do you have any feedback/things I can improve?

@tytan652
Copy link
Collaborator

tytan652 commented Jun 20, 2024

Hi @tytan652 I see you gave a 👎 was that an accident?

No, I used that to avoid always adding an "off-topic" to PRs saying that the PR adds code complexity to the streaming codepath which adds more work to my plans for a Service Overhaul.

Do you have any feedback/things I can improve?

No, this is why I just reacted.

@czoli1976
Copy link

About time we get Simulcast for WHIP, holy cow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature New feature or plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants