The squirrel, carrying messages it does not own
Ratatoskr subscribes to a CultMesh media stream and hands frames to a renderer.
First lowering target is OBS.
It exists because the receiver it replaces hand-rolled CultNet RUDP in C++
inside Mimir: acknowledgement, fragment reassembly, sockets, cultmesh:// URL
parsing, wire framing and two erasure codes, in 973 lines of headers linking no
CultLib. That made the receiving end of a protocol a separate implementation
from the sending end, in another language and another repository, and every
CultNet fix from August and September reached cultnet-rs and cultnet-ts without
reaching it.
So the constraint this repo holds is that it implements no transport. It
consumes CultNet. A sequence number or an ACK mask appearing here means
something belongs upstream in CultLib instead, where both ends can share it.
What works: the core opens a subscription over cultnet-rs, drains it, and hands
payloads across a C ABI. Nine Rust tests and fourteen C checks, the latter
loading the cdylib and verifying the header tells the truth rather than assuming
it. The MSVC staticlib is what the plugin will link; the C smoke test loads the
cdylib dynamically so the ABI is checkable with any compiler.
What does not: no reassembly, no FEC, no receiver feedback, and no plugin. It
cannot decode a real Muninn stream yet, because the wire envelope
(MuninnMediaWireRecord, encode_media_wire_record) still lives in Muninn and
needs to move to CultLib where both ends can reach it. README says so plainly
rather than implying more than exists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 01:40:26 +02:00
# Ratatoskr
**Carries CultMesh media streams to a renderer, and owns none of them.**
The squirrel runs up and down Yggdrasil carrying messages between the eagle at
the crown and the serpent at the root. It repeats what it is given. It is not
the eagle, it is not the serpent, and it has no opinion about the argument.
Ratatoskr subscribes to a CultMesh media stream, hands decoded frames to a
renderer, and reports back what actually arrived. Its first lowering target is
OBS.
---
## Why it exists
The receiver it replaces lived in Mimir as a 6,515-line OBS plugin that
hand-rolled CultNet RUDP in C++: acknowledgement, fragment reassembly, sockets,
`cultmesh://` URL parsing, wire framing, and two erasure codes, in 973 lines of
headers that linked no CultLib.
That made the receiving end of a protocol a separate implementation from the
sending end, in a different language, in a different repository, maintained by
nobody in particular. Every CultNet fix from August and September 2026 — split
reliable and lossy sequence domains, bounded reliable windows, ACK-horizon
binding, cumulative acknowledgement — reached `cultnet-rs` and `cultnet-ts` and
could not reach it.
So the rule this repository exists to hold:
> **Ratatoskr implements no transport.** It consumes CultNet. If something here
> starts to look like a sequence number, an ACK mask, or a retransmit timer, it
> belongs upstream in CultLib where both ends of the conversation can share it.
## Authority
- **Owner:** Ratatoskr owns turning a CultMesh media stream into frames a
renderer can present, and the lifetime of that subscription.
- **Inputs:** typed media records over a CultNet RUDP media channel.
- **Outputs:** ordered, reassembled media payloads, and the receiver feedback a
producer needs in order to adapt.
- **Not Ratatoskr's:** the media contract (CultLib), discovery and rendezvous
(Odin), what gets captured (Muninn), how frames are presented (the renderer).
Ratatoskr is one consumer of a general contract. It is not the contract, and it
does not know or care which producer it is attached to.
## Shape
```
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
crates/ratatoskr-core/ Rust. Everything below the OBS callbacks.
The squirrel, carrying messages it does not own
Ratatoskr subscribes to a CultMesh media stream and hands frames to a renderer.
First lowering target is OBS.
It exists because the receiver it replaces hand-rolled CultNet RUDP in C++
inside Mimir: acknowledgement, fragment reassembly, sockets, cultmesh:// URL
parsing, wire framing and two erasure codes, in 973 lines of headers linking no
CultLib. That made the receiving end of a protocol a separate implementation
from the sending end, in another language and another repository, and every
CultNet fix from August and September reached cultnet-rs and cultnet-ts without
reaching it.
So the constraint this repo holds is that it implements no transport. It
consumes CultNet. A sequence number or an ACK mask appearing here means
something belongs upstream in CultLib instead, where both ends can share it.
What works: the core opens a subscription over cultnet-rs, drains it, and hands
payloads across a C ABI. Nine Rust tests and fourteen C checks, the latter
loading the cdylib and verifying the header tells the truth rather than assuming
it. The MSVC staticlib is what the plugin will link; the C smoke test loads the
cdylib dynamically so the ABI is checkable with any compiler.
What does not: no reassembly, no FEC, no receiver feedback, and no plugin. It
cannot decode a real Muninn stream yet, because the wire envelope
(MuninnMediaWireRecord, encode_media_wire_record) still lives in Muninn and
needs to move to CultLib where both ends can reach it. README says so plainly
rather than implying more than exists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 01:40:26 +02:00
src/receiver.rs Subscription over cultnet-rs. No transport of its own.
2026-09-10 21:21:47 +02:00
src/video.rs Chunks and parity in, whole access units out.
2026-09-10 21:39:33 +02:00
src/feedback.rs What the receiver says back, and how often.
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
src/catalog.rs What advertises through Odin; asking for a stream.
The squirrel, carrying messages it does not own
Ratatoskr subscribes to a CultMesh media stream and hands frames to a renderer.
First lowering target is OBS.
It exists because the receiver it replaces hand-rolled CultNet RUDP in C++
inside Mimir: acknowledgement, fragment reassembly, sockets, cultmesh:// URL
parsing, wire framing and two erasure codes, in 973 lines of headers linking no
CultLib. That made the receiving end of a protocol a separate implementation
from the sending end, in another language and another repository, and every
CultNet fix from August and September reached cultnet-rs and cultnet-ts without
reaching it.
So the constraint this repo holds is that it implements no transport. It
consumes CultNet. A sequence number or an ACK mask appearing here means
something belongs upstream in CultLib instead, where both ends can share it.
What works: the core opens a subscription over cultnet-rs, drains it, and hands
payloads across a C ABI. Nine Rust tests and fourteen C checks, the latter
loading the cdylib and verifying the header tells the truth rather than assuming
it. The MSVC staticlib is what the plugin will link; the C smoke test loads the
cdylib dynamically so the ABI is checkable with any compiler.
What does not: no reassembly, no FEC, no receiver feedback, and no plugin. It
cannot decode a real Muninn stream yet, because the wire envelope
(MuninnMediaWireRecord, encode_media_wire_record) still lives in Muninn and
needs to move to CultLib where both ends can reach it. README says so plainly
rather than implying more than exists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 01:40:26 +02:00
src/ffi.rs The C ABI, deliberately small.
plugin/
include/ratatoskr.h Hand-written header. Small enough to read in one sitting.
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
src/ratatoskr_source.c The OBS source. Owns the OBS lifecycle and nothing else.
The squirrel, carrying messages it does not own
Ratatoskr subscribes to a CultMesh media stream and hands frames to a renderer.
First lowering target is OBS.
It exists because the receiver it replaces hand-rolled CultNet RUDP in C++
inside Mimir: acknowledgement, fragment reassembly, sockets, cultmesh:// URL
parsing, wire framing and two erasure codes, in 973 lines of headers linking no
CultLib. That made the receiving end of a protocol a separate implementation
from the sending end, in another language and another repository, and every
CultNet fix from August and September reached cultnet-rs and cultnet-ts without
reaching it.
So the constraint this repo holds is that it implements no transport. It
consumes CultNet. A sequence number or an ACK mask appearing here means
something belongs upstream in CultLib instead, where both ends can share it.
What works: the core opens a subscription over cultnet-rs, drains it, and hands
payloads across a C ABI. Nine Rust tests and fourteen C checks, the latter
loading the cdylib and verifying the header tells the truth rather than assuming
it. The MSVC staticlib is what the plugin will link; the C smoke test loads the
cdylib dynamically so the ABI is checkable with any compiler.
What does not: no reassembly, no FEC, no receiver feedback, and no plugin. It
cannot decode a real Muninn stream yet, because the wire envelope
(MuninnMediaWireRecord, encode_media_wire_record) still lives in Muninn and
needs to move to CultLib where both ends can reach it. README says so plainly
rather than implying more than exists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 01:40:26 +02:00
tests/abi_smoke.c Loads the cdylib and checks the header tells the truth.
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
CMakeLists.txt find_package(libobs) + the core static library.
The squirrel, carrying messages it does not own
Ratatoskr subscribes to a CultMesh media stream and hands frames to a renderer.
First lowering target is OBS.
It exists because the receiver it replaces hand-rolled CultNet RUDP in C++
inside Mimir: acknowledgement, fragment reassembly, sockets, cultmesh:// URL
parsing, wire framing and two erasure codes, in 973 lines of headers linking no
CultLib. That made the receiving end of a protocol a separate implementation
from the sending end, in another language and another repository, and every
CultNet fix from August and September reached cultnet-rs and cultnet-ts without
reaching it.
So the constraint this repo holds is that it implements no transport. It
consumes CultNet. A sequence number or an ACK mask appearing here means
something belongs upstream in CultLib instead, where both ends can share it.
What works: the core opens a subscription over cultnet-rs, drains it, and hands
payloads across a C ABI. Nine Rust tests and fourteen C checks, the latter
loading the cdylib and verifying the header tells the truth rather than assuming
it. The MSVC staticlib is what the plugin will link; the C smoke test loads the
cdylib dynamically so the ABI is checkable with any compiler.
What does not: no reassembly, no FEC, no receiver feedback, and no plugin. It
cannot decode a real Muninn stream yet, because the wire envelope
(MuninnMediaWireRecord, encode_media_wire_record) still lives in Muninn and
needs to move to CultLib where both ends can reach it. README says so plainly
rather than implying more than exists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 01:40:26 +02:00
```
The core builds as `rlib` , `cdylib` and `staticlib` , following the
`muninn-move-tracker` precedent already in the estate. The plugin links the
staticlib under MSVC; `abi_smoke.c` loads the cdylib dynamically so the ABI can
be checked with any compiler.
## Status
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
The OBS source exists and installs; it has not yet carried a live stream.
**In OBS:** * Sources → Add → CultMesh Media Stream * . Its properties name an
Odin endpoint, pull every `gamecult.media_stream_advertisement` Odin holds,
and offer each stream's video sources, audio sources and codecs from the
advertisement itself, plus bitrate and latency budget (zero means the
producer's default). Selecting and activating publishes a
2026-09-10 23:03:30 +02:00
`gamecult.media_stream_request` ; the producer answers on the same request
key, and the source dials the `media_endpoint` the advertisement named,
repeating the dial until the producer answers. The consumer never listens:
the machine running OBS admits nothing inbound and needs no firewall rule or
port forward. Nothing in the properties comes from configuration or from
Muninn: the picker shows whatever advertises.
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
Video reaches OBS the way the previous plugin proved in the field: the core
relays each whole access unit as a raw byte stream to a loopback UDP port and
the source draws a private `ffmpeg_source` child reading it, so OBS's own
decoder decodes. Audio is PCM and goes straight to `obs_source_output_audio`
with the producer's presentation time.
**Building the plugin** needs a libobs to link against. There is no SDK
download for Windows; `.sdk/` (git-ignored) holds an obs-studio checkout at
the installed version, the matching obs-deps, and a libobs-only build:
```
cmake -S .sdk/obs-studio -B .sdk/obs-build -G "Visual Studio 17 2022" -A x64 -DCMAKE_PREFIX_PATH=.sdk/obs-deps-<version>-x64 -DENABLE_FRONTEND=OFF -DENABLE_PLUGINS=OFF -DENABLE_SCRIPTING=OFF -DENABLE_BROWSER=OFF
cmake --build .sdk/obs-build --config Release --target libobs
cargo build --release -p ratatoskr-core
cmake -S plugin -B plugin/build -G "Visual Studio 17 2022" -A x64 -DCMAKE_MODULE_PATH=.sdk/obs-studio/cmake/finders -DCMAKE_PREFIX_PATH=".sdk/obs-build/libobs;.sdk/obs-build/deps/w32-pthreads;.sdk/obs-deps-<version>-x64"
cmake --build plugin/build --config Release
cmake --install plugin/build --config Release --prefix %APPDATA%/obs-studio/plugins/ratatoskr
```
The core opens a CultNet media subscription, drains it, decodes the
2026-09-10 21:21:47 +02:00
CultMesh media envelope, reassembles video, and hands whole access units and
audio packets across the ABI with a kind discriminator so a caller routes them
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
without parsing records itself. Tests sit on both sides of that boundary,
including a loopback Odin-shaped catalog server for the discovery path.
2026-09-10 21:21:47 +02:00
Video reassembly follows the contract's erasure code and adds only receiver
policy. The producer splits each access unit into datagram-sized chunks and,
for frames of more than one chunk, XOR stripe parity: shard `s` of
`parity_count` covers every chunk whose index is `s` modulo `parity_count` , so
each stripe gives back exactly one lost chunk. What the contract does not say
and this crate decides: an incomplete frame is given up on after 250 ms on the
receiver's clock, or sooner if 64 newer frames are pending — the bound evicts,
it never errors; a completed frame is complete forever, so late chunks are
discarded rather than reopening it; and after any loss nothing reaches the
renderer until the next keyframe, because a decoder fed a frame whose reference
is missing produces garbage that looks like a stream. Every one of those is a
counter in `VideoStats` , observed rather than configured.
Audio is not chunked on the wire and carries no parity, so audio packets pass
through as sent. The previous receiver's GF(256) audio erasure code had no
producer; it is not missing here, it never existed on this contract.
2026-09-10 02:03:41 +02:00
2026-09-10 21:39:33 +02:00
The return path is `gamecult.media_receiver_feedback` , built by CultLib's
`build_receiver_feedback` so both ends agree on its shape, and sent back down
the producer's own session on the media channel. A frame still waiting is
asked for by chunk after 64 ms, then every 32 ms, three times — the previous
receiver's field-tested cadence — and a repair request never asks for a
keyframe, because it exists so that one is not needed. A frame given up on is
reported late and, once per 500 ms, a keyframe is requested, since whatever
depended on it cannot be decoded either. `highest_decodable_frame_id` is the
newest frame actually handed to the renderer. `jitter_us` and
`decode_queue_us` are sent as zero: the producer reads neither, and "not
measured" is the truth where a plausible number would not be. With no
producer attached, feedback is reported as not sent and counted, never
dropped on the floor.
2026-09-10 02:03:41 +02:00
A payload that arrives on the media channel and fails to decode is surfaced as
`Undecodable` and counted, never silently dropped. A consumer that discards what
it cannot parse gives a producer no way to learn its stream is unreadable, which
is how the last receiver and sender drifted apart without either noticing.
What is not here yet:
The squirrel, carrying messages it does not own
Ratatoskr subscribes to a CultMesh media stream and hands frames to a renderer.
First lowering target is OBS.
It exists because the receiver it replaces hand-rolled CultNet RUDP in C++
inside Mimir: acknowledgement, fragment reassembly, sockets, cultmesh:// URL
parsing, wire framing and two erasure codes, in 973 lines of headers linking no
CultLib. That made the receiving end of a protocol a separate implementation
from the sending end, in another language and another repository, and every
CultNet fix from August and September reached cultnet-rs and cultnet-ts without
reaching it.
So the constraint this repo holds is that it implements no transport. It
consumes CultNet. A sequence number or an ACK mask appearing here means
something belongs upstream in CultLib instead, where both ends can share it.
What works: the core opens a subscription over cultnet-rs, drains it, and hands
payloads across a C ABI. Nine Rust tests and fourteen C checks, the latter
loading the cdylib and verifying the header tells the truth rather than assuming
it. The MSVC staticlib is what the plugin will link; the C smoke test loads the
cdylib dynamically so the ABI is checkable with any compiler.
What does not: no reassembly, no FEC, no receiver feedback, and no plugin. It
cannot decode a real Muninn stream yet, because the wire envelope
(MuninnMediaWireRecord, encode_media_wire_record) still lives in Muninn and
needs to move to CultLib where both ends can reach it. README says so plainly
rather than implying more than exists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 01:40:26 +02:00
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
- **A live frame.** No stream has crossed Raven → Starfire through this path.
2026-09-10 23:03:30 +02:00
It needs Muninn on Raven running a build that advertises a media
endpoint, listens on it, and answers requests; Raven's firewall admits
that one UDP port. Starfire admits nothing.
The OBS source, and the mesh side it needs
A new source type, "CultMesh Media Stream". Its properties pull every
gamecult.media_stream_advertisement Odin holds and offer each stream's
video sources, audio sources and codecs from the advertisement, with
bitrate and latency budget; activating publishes a
gamecult.media_stream_request naming this receiver's endpoint. Nothing
in the picker comes from configuration or from Muninn.
The core grows the mesh half (catalog.rs): pull the advertisements,
publish a request, read the producer's answer, all over cultmesh-rs and
tested against an Odin-shaped RUDP catalog server on loopback. The C ABI
gains the catalog and request calls, a video relay that copies each
whole access unit to a loopback UDP port as a raw byte stream, and the
producer's presentation time on every payload.
The plugin itself owns only the OBS lifecycle. Video is drawn from a
private ffmpeg_source child reading the relay — the arrangement the
previous plugin proved in the field, minus the 2,500 lines of transport
it hand-rolled underneath. Audio is PCM straight to
obs_source_output_audio.
Built against a libobs-only build of obs-studio 32.2.2 with obs-deps
2026-07-15 under .sdk/ (git-ignored; the README says how). Installed to
the per-user OBS plugins directory. Not yet exercised with a live stream.
cargo test -p ratatoskr-core -> 31 passed
abi_smoke.exe ratatoskr_core.dll -> ABI SMOKE PASSED
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 22:22:42 +02:00
- **Opus.** The request carries `audio_codec` ; the only producer today emits
`pcm-f32le-interleaved` . When Opus lands, the audio path here grows a
decoder or a second `ffmpeg_source` child.
The squirrel, carrying messages it does not own
Ratatoskr subscribes to a CultMesh media stream and hands frames to a renderer.
First lowering target is OBS.
It exists because the receiver it replaces hand-rolled CultNet RUDP in C++
inside Mimir: acknowledgement, fragment reassembly, sockets, cultmesh:// URL
parsing, wire framing and two erasure codes, in 973 lines of headers linking no
CultLib. That made the receiving end of a protocol a separate implementation
from the sending end, in another language and another repository, and every
CultNet fix from August and September reached cultnet-rs and cultnet-ts without
reaching it.
So the constraint this repo holds is that it implements no transport. It
consumes CultNet. A sequence number or an ACK mask appearing here means
something belongs upstream in CultLib instead, where both ends can share it.
What works: the core opens a subscription over cultnet-rs, drains it, and hands
payloads across a C ABI. Nine Rust tests and fourteen C checks, the latter
loading the cdylib and verifying the header tells the truth rather than assuming
it. The MSVC staticlib is what the plugin will link; the C smoke test loads the
cdylib dynamically so the ABI is checkable with any compiler.
What does not: no reassembly, no FEC, no receiver feedback, and no plugin. It
cannot decode a real Muninn stream yet, because the wire envelope
(MuninnMediaWireRecord, encode_media_wire_record) still lives in Muninn and
needs to move to CultLib where both ends can reach it. README says so plainly
rather than implying more than exists.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 01:40:26 +02:00
## A note on health signals
`delivered()` counts payloads and bytes that actually arrived. Nothing in this
repository may report stream health from configuration.
The previous generation published *"typed video/audio access units are
publishing over CultNet RUDP media"* from a match on two boolean options. It
said that continuously while the audio lane degraded to silence, because the
string was derived from what had been requested rather than from anything
observed. That is the specific mistake this line exists to prevent.