diff --git a/doc/bin/obs.md b/doc/bin/obs.md index f2de02b73b3..5a68b3dccd7 100644 --- a/doc/bin/obs.md +++ b/doc/bin/obs.md @@ -8,7 +8,7 @@ description: Stream from OBS Studio to MoQ, or bring a broadcast into a scene The plugin adds a **MoQ** streaming service and a **MoQ Source** to a stock OBS Studio install. -- **Publish**: Settings > Stream, choose "MoQ", enter the relay URL (with `?jwt=` if needed) and broadcast path, Start Streaming. +- **Publish**: in the **MoQ** dock, enter the relay URL (with `?jwt=` if needed) and broadcast name, Go Live. OBS's own Start Streaming publishes over MoQ once obs-websocket sets the stream service, as [simulcast renditions](#simulcast-renditions) shows. - **Subscribe**: add a "MoQ Source", enter the relay URL and broadcast path, and the stream appears in the scene. - **Dock**: a **MoQ** dock with Go Live, encoding that uses the OBS Output settings or custom settings for this stream only, and live stats (protocol, RTT, bandwidth, loss), and the reason while a stream connects or reconnects. @@ -44,9 +44,32 @@ shows the current video target beside the configured rate. An encoder shared with a recording follows too, so record with a separate encoder to keep the recording at the full rate. +## Simulcast renditions + +Every video encoder on OBS's stream output is its own rendition of the +broadcast, with its size, codec, and (under CBR) configured bitrate in the +catalog, so `` picks between them. OBS adds encoders from its WHIP +simulcast layer count, `Stream1` / `WHIPSimulcastTotalLayers` in the profile, +whatever the service: `N` layers add `N - 1` copies of the stream encoder, +layer `i` at `i/N` of the output size and bitrate. 3 layers on a 1080p +6000 kbps stream add 720p at 4000 kbps and 360p at 2000 kbps. + +OBS's Settings window shows that count only for WHIP and cannot select the +MoQ service, so set both over obs-websocket: + +1. `SetStreamServiceSettings` with `streamServiceType` `moq_service` and + `streamServiceSettings` `{"server": "", "key": ""}`. +2. `SetProfileParameter` with `Stream1`, `WHIPSimulcastTotalLayers`, and a + count such as `"3"`. OBS applies it on restart or a profile switch. +3. `StartStream`. + +Saving Settings > Stream afterwards replaces the MoQ service. The dock's Go +Live publishes one rendition. OBS's Enhanced Broadcasting (multitrack video) +always streams through its RTMP output, so it cannot drive MoQ. + ## Source quality and moq-transcode -OBS publishes **one** rendition and does not encode a viewer ladder. When a +Without simulcast layers, OBS publishes **one** rendition. When a relay or moq.pro runs [`moq-transcode`](/bin/cli#transcode), the ladder appears beside the source as `{broadcast}/transcode.hang`. For a good ladder, name the broadcast with a `.hang` suffix, use a canvas at least as tall as the top rung diff --git a/quest/m1/simulcast-rung-disable.md b/quest/m1/simulcast-rung-disable.md index 0a56c9bf223..b3507ab4392 100644 --- a/quest/m1/simulcast-rung-disable.md +++ b/quest/m1/simulcast-rung-disable.md @@ -42,5 +42,4 @@ its `moq_video_encode_options`. - [JS rung disable](/quest/m2/probe/rung-disable-js.md) - the same rule in `js/publish`, probing with padding - [Ladder controller](/quest/m3/ladder/controller.md) - the same rung disable for generated transcode ladders -- [OBS multitrack](/quest/m2/obs-multitrack.md) - OBS's native multitrack encoders as the renditions this disables - [Viewer up-switch](/quest/m2/probe/viewer-upswitch.md) - the viewer side of moving between renditions as capacity changes diff --git a/quest/m2/README.md b/quest/m2/README.md index bcf0ca391ae..7c59412cf1c 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -67,7 +67,6 @@ lite-07; bitrate enforcement is not part of this release. - [Pipelined requests](/quest/m2/pipeline-requests/README.md) - SUBSCRIBE and the first FETCH go out with the track-info request at every hop, so first data arrives a round trip sooner per hop - [OBS native codecs](/quest/m2/obs-moq-video/README.md) - replace FFmpeg video and audio decoding with moq-video and moq-audio, deliver GPU frames, and use native audio/video encoders -- [OBS multitrack](/quest/m2/obs-multitrack.md) - the obs-moq output publishes OBS's native multitrack video encoders as simulcast renditions, configured like OBS multitrack and over obs-websocket - [MoQ in obs-studio](/quest/m2/obs-studio/README.md) - a native MoQ output and service merged into obs-studio, once its maintainers agree; the plugin carries it until then - [OBS source renditions](/quest/m2/obs-source-renditions.md) - the OBS source picks the best enabled decodable rendition, using a `preference` the bindings now carry, and resubscribes when a referenced publisher's epoch changes - [CMake qlog option for OBS](/quest/m2/obs-qlog.md) - an OBS build can opt into qlog trace capture through moq-ffi's `qlog` feature diff --git a/quest/m2/obs-multitrack.md b/quest/m2/obs-multitrack.md deleted file mode 100644 index 80ae07948ba..00000000000 --- a/quest/m2/obs-multitrack.md +++ /dev/null @@ -1,39 +0,0 @@ -# [M] OBS multitrack video as simulcast renditions - -## Goal - -The obs-moq output publishes OBS's native multitrack video encoders as -simulcast renditions of one broadcast, one rendition per track, each with -its own size and bitrate in the catalog. A user configures them the way OBS -multitrack video is configured, including over obs-websocket. Disabling the -top renditions as the bandwidth grant falls is -[simulcast rung disable](/quest/m1/simulcast-rung-disable.md)'s work, not -this quest's. - -## Plan - -Verify the gap first. The output already declares -`OBS_OUTPUT_MULTI_TRACK_VIDEO` and keeps one track per video encoder -(`video_tracks` in `cpp/obs/src/moq-output.cpp`), so the work is likely -configuration, naming, and catalog correctness rather than new plumbing. -moq-mux already imports enhanced-RTMP multitrack -(`rs/moq-mux/src/container/flv/import.rs`); match how it names and describes -renditions so an OBS stream looks the same whether it arrives over MoQ or -RTMP. - -- Reuse OBS's own multitrack settings rather than adding a MoQ-only ladder - UI, so obs-websocket and existing profiles drive it unchanged. Find out - what OBS needs from a custom service to enable multitrack and record it. -- Each rendition advertises its real encoded size, codec, and maximum - bitrate; disabling one never removes it from the catalog. -- Update `doc/bin/obs.md`, whose "OBS publishes one rendition" section this - changes. - -Verify with `just obs compile` and `just obs test`, and one manual run with -at least two video tracks watched in ``. - -## Related - -- [Simulcast rung disable](/quest/m1/simulcast-rung-disable.md) - the grant-driven rung disable these renditions follow -- [MoQ in obs-studio](/quest/m2/obs-studio/README.md) - the native output this configuration carries into -- [OBS native codecs](/quest/m2/obs-moq-video/README.md) - the encoders behind each track when MoQ encoders are chosen diff --git a/quest/m2/obs-studio/README.md b/quest/m2/obs-studio/README.md index e6901cc7741..99ee2751026 100644 --- a/quest/m2/obs-studio/README.md +++ b/quest/m2/obs-studio/README.md @@ -32,6 +32,5 @@ Open, for when the port starts: ## Related -- [OBS multitrack](/quest/m2/obs-multitrack.md) - multitrack video renditions the native output should carry - [First C++ package release](/quest/m2/release/cpp-release.md) - the published C++ package the port would build on - [OBS native codecs](/quest/m2/obs-moq-video/README.md) - the plugin's codec work, which stays plugin-side