Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or requestreadyMeets the definition of Ready; claimableMeets the definition of Ready; claimable
Description
Summary
Several built-in services accept RTMPS but OBS connects to them over plain RTMP by default. As hardening, prefer the encrypted connection wherever the service supports it, and fall back to plain RTMP with a warning when it can't connect.
Current behaviour (master, same as upstream 33.0.0)
- Twitch: every server in
services.json, "Auto (Recommended)" (rtmp-common.c) and the built-in fallback (twitch.c) arertmp://. The ingest feed OBS already downloads (https://ingest.twitch.tv/ingests) publishes anrtmps://url_template_securefor every ingest, andservice-ingest.cparses it intortmps_url, but the Twitch path never uses it. Amazon IVS, which uses the same feed format, already prefersrtmps_url. - Also accept RTMPS on their listed ingest host, but default to
rtmp://: X / Twitter, Vimeo, niconico, CAM4, BoxCast. Checked with an RTMP handshake over TLS on port 443 (no stream started). - nanoStream Cloud / bintu lists RTMPS servers, but after the plain ones, so plain is the default.
- Probably supported, need a manual check: Nimo TV, Bitmovin, Eventials, EventLive.pro, Kuaishou, Trovo.
- Already RTMPS by default: YouTube - RTMPS, Facebook Live, Amazon IVS and a few others.
Scope
This change covers free streaming platforms only. Paid services (Vimeo, BoxCast, nanoStream, Bitmovin, Eventials, EventLive.pro) can follow later.
- In: Twitch, CAM4, Nimo TV, Trovo, Kuaishou. Nimo TV, Trovo and Kuaishou are in only if every server passes the endpoint check below.
- In if streaming from an external encoder is free: X / Twitter, niconico. Confirm before adding.
Proposal
- Prefer RTMPS where supported. Twitch uses the feed's secure URL for Auto, the server list and the fallback. In-scope services that support it get their
rtmps://server first (RTMPS port 443). - Fall back after a short countdown. If the TLS connection fails, show a dialog saying the encrypted connection failed. It has a Proceed anyway button with a 3-second progress countdown, and a Cancel button.
- When the countdown ends, or the user clicks Proceed anyway, OBS connects to the same server over plain RTMP. Cancel stops the stream start.
- When nobody is at the screen (obs-websocket
StartStream,--startstreaming), the same 3-second countdown runs and then OBS proceeds, so automated setups still go live. - Every fallback is written to stderr and to the OBS log.
- Reconnects during a stream use the protocol the stream connected with, so no dialog appears mid-stream.
- Existing profiles. They pick this up without rewriting their settings. A saved built-in
rtmp://server for one of these services maps to its RTMPS counterpart at connect time, with the same fallback. - Custom servers are unchanged.
rtmp://staysrtmp://for local and self-hosted setups. - No new option. It is the default behaviour.
Things to fix with it
- Windows network optimizations:
rtmp-stream.cturns off "Enable network optimizations" (and with it low-latency mode) for anyrtmps://URL ("not compatible with RTMPS"). Both are off by default, but users who enabled them would lose them silently. The new socket loop should work with TLS before the default changes. - Mbed TLS: RTMPS goes through the bundled Mbed TLS, so bug: bundled Mbed TLS 3.6.4 has public advisories fixed in 3.6.7 (RTMPS certificate checks) #1121 (3.6.4 → 3.6.7) should land first.
Cost
TLS is cheap at streaming bitrates. AES-GCM with hardware AES uses about 0.02% of one core at 10 Mbps (about 0.3% in pure software). Other costs are a handshake once per connect and about 0.2% extra bytes.
Testing
- Endpoint check for every RTMPS server we add. It checks the Twitch feed's secure URLs (they aren't in
services.json; OBS fetches them at runtime), the hardcoded Twitch fallback, and each newrtmps://entry inservices.json. For each one it checks DNS, a valid certificate for the hostname, the RTMP handshake over TLS, and an RTMPconnectto the service's app path. A publish with a fake key must be rejected the same way as over plain RTMP. A service switches only if all of its servers pass. Rerun the check whenever these servers change. - RED/GREEN unit tests for the URL choice (Auto, listed server, fallback, existing profile, custom unchanged) and for the RTMPS → RTMP fallback path against a local TLS listener. Cover the countdown: proceed when it ends, proceed on click, Cancel, the stderr and log lines, and the countdown with no UI.
- A product-level A/B: stream to a real Twitch ingest (bandwidth-test mode, so nothing goes live) over RTMP and RTMPS at the same settings, and compare dropped frames, connect time and CPU.
- One RTMPS stream per OS (Linux, Windows, macOS), to cover the OS-specific parts: loading trusted certificates, and the Windows socket loop.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestreadyMeets the definition of Ready; claimableMeets the definition of Ready; claimable
Type
Projects
- StatusShow more project fieldsDone
Activity
rdoupe commentedon Oct 24, 2026
Claiming: this issue.
vpacher commentedon Oct 24, 2026
One detail for the fallback: fall back only when the TLS connection can't be made (timeout, refused, reset, handshake failure). When the handshake completes but the certificate doesn't verify (
MBEDTLS_ERR_X509_CERT_VERIFY_FAILED, or a wrong host name), stop the stream start and log why. That case isn't a network or performance problem: someone presented a certificate the service wouldn't, and falling back would send the stream key to them in clear text. A test with a local TLS listener that presents a certificate for another host covers it.rtmp-services: Stream over RTMPS where the ingest server accepts it
vpacher commentedon Oct 24, 2026
Heads-up for step 2 (the fallback dialog): the shared warning that #1092's decision asks for is in progress in #2218, draft PR #2238. It's a dialog with a 3-second progress countdown that auto-accepts "Accept anyway", an optional Cancel, the error on stderr and in the log, once per session, and only logging when no window is visible. The Rust core and the frontend staticlib are in the PR; the Qt dialog and the API come next.
The planned call is
obs_frontend_warn_fallback(id, title, message, can_cancel, callback, param). For the RTMPS fallback,can_cancel = true, so Cancel stops the stream start, and the callback gets whether to continue over RTMP. If that fits, the RTMPS fallback could use it instead of its own dialog. Comments on the API shape are welcome on #2218.frontend: RED obs_frontend_warn_fallback(), the fallback warning API (o…
vpacher commentedon Oct 25, 2026
The shared fallback warning from #2218 is merged in #2238, so #2219 can use it instead of
OBSRtmpsFallback:It logs the line at error level at once (also on stderr), shows the dialog with the 3-second countdown, and calls
cb(param, accepted)once on the UI thread:truefor the countdown and "Accept anyway",falsefor Cancel or a closed dialog. The rules, the standard wording and an example are indocs/fallback-warning.md. For RTMP that is the title "Streaming unencrypted (RTMP)", the term "unencrypted", the buttons "Accept anyway" and "Cancel", and the message in the order: what failed, what OBS does instead, what the user can do.Two differences from
OBSRtmpsFallbackto decide before switching:It also waits while another modal dialog is open, and pauses its countdown when one opens over it, so it never accepts unseen.
And the point from my earlier comment, which #2219 doesn't cover yet: the fallback runs on any
OBS_OUTPUT_CONNECT_FAILED, and a certificate that doesn't verify ends there too. Please keep the fallback to connection failures (timeout, refused, reset, or a handshake failure other than certificate verification) and stop the start with the reason in the log when the certificate doesn't verify.frontend: Shared fallback warning with a countdown (obs_frontend_warn…
test: Expect RTMPS for verified ingest servers, with a plain RTMP fal…
rtmp-services: Stream over RTMPS where the ingest server accepts it
test: Stop an RTMPS start whose certificate does not verify
frontend: Use the shared fallback warning for RTMPS
frontend: Say when RTMPS failed for lack of trusted root certificates
rtmp-services: Stream over RTMPS where the ingest server accepts it (o…