Skip to main content
Module: LCKStreaming | Version: 1.0 | Platforms: Win64, Android (Quest)

What is LCKStreaming?

LCKStreaming adds live streaming to your Unreal Engine project. It connects to the LIV backend to authenticate users, resolve streaming targets, and push video/audio over RTMP to YouTube, Twitch, or any manual RTMP endpoint. The module handles the full lifecycle: device-based authentication, streaming configuration, RTMP connection management, encoder health monitoring, and automatic bitrate selection per platform.

Architecture

┌──────────────────────────────────────────────────────┐
│                   Your Game                          │
│                                                      │
│   ULCKStreamingSubsystem (GameInstanceSubsystem)     │
│       ├── StartLogin / Authenticate                  │
│       ├── StartStreaming / StopStreaming              │
│       └── Delegates (events)                         │
└──────────────────┬───────────────────────────────────┘

          ┌────────▼────────┐
          │  LIV API Client │  REST (dashboard.liv.tv)
          │  - Auth polling  │
          │  - Profile fetch │
          │  - RTMP resolve  │
          └────────┬────────┘

          ┌────────▼────────┐
          │  Native RTMP    │  librtmp (Win64)
          │  Bridge         │  librtmp.so (Android)
          │  - Mux & send   │
          │  - Health check │
          └─────────────────┘
The subsystem coordinates two layers: a REST API client that handles authentication, streaming config, and RTMP URL resolution, and a native RTMP bridge that muxes encoded video/audio and pushes it to the ingest server.

Module Structure

ModuleDescription
LCKStreamingCore streaming subsystem, API client, RTMP logic
LCKStreamingAndroidAndroid-specific RTMP bridge and LIV Hub interop

Prerequisites

All four prerequisites must be met before streaming will function. Missing any one of them causes StartStreaming() to return false silently.
  1. Enable streaming — Set bEnableStreaming = true in Project Settings → Plugins → LCK SDK → Features. Defaults to false.
  2. Valid Tracking ID — Your project must have a Tracking ID configured in LCK Developer Settings.
  3. RTMP libraries loadedlibrtmp DLLs (Win64) or librtmp.so (Android) must be present and loadable at runtime. Check FLCKStreamingModule::IsRtmpAvailable().
  4. LIV account with subscription — The end user needs a LIV account with an active streaming subscription.

Platform Support

PlatformStatusNotes
Win64SupportedUses bundled librtmp
Android (Quest)SupportedUses librtmp.so, LIV Hub app
OtherNot supported at this time

Streaming Targets

TargetDescription
YouTubeAutomatic broadcast creation via LIV backend
TwitchDirect RTMP ingest via LIV backend
ManualUser-provided RTMP URL for custom destinations

Platform Bitrates

Bitrates are selected automatically based on the target platform and resolution.

YouTube

QualityVideo BitrateAudio Bitrate
SD4 Mbps128 Kbps
HD @308 Mbps128 Kbps
HD @6012 Mbps128 Kbps
2K24 Mbps128 Kbps
4K35 Mbps128 Kbps

Twitch

QualityVideo BitrateAudio Bitrate
SD3 Mbps96 Kbps
HD @304.5 Mbps96 Kbps
HD @606 Mbps96 Kbps
2K9 Mbps96 Kbps
4K10 Mbps96 Kbps
Keyframe interval is fixed at 2 seconds for all targets, as required by YouTube and Twitch ingest servers.

Relationship to Recording

Streaming and recording share the same encoder pipeline. When both are active simultaneously, the streaming module piggybacks on the active recording encoder rather than creating a second one. This means you can stream and record at the same time with no additional encoding overhead.
If a recording is already in progress when StartStreaming() is called, the stream reuses the existing encoder. If no recording is active, streaming acquires its own encoder instance.

Streaming State Machine

StateDescription
IdleNo streaming activity
PairingDevice login in progress
PairedAuthenticated, ready to stream
StreamingRTMP connection active, pushing frames
ErrorAn error occurred (see OnStreamError)

Key Timing Constants

ConstantValueDescription
Auth poll interval2.5sHow often the subsystem polls for pairing confirmation
Stream start timeout15sMaximum wait time for a stream to begin
Health check interval5sFrequency of encoder health monitoring
Health check tolerance2Consecutive failures before stopping stream

Delegates

The subsystem exposes seven delegates for responding to streaming lifecycle events:
DelegateParametersFired When
OnPairingCodeReceivedFString CodeA new pairing code is generated
OnAuthenticatedUser successfully authenticates
OnStreamingConfigReceivedELCKStreamingTargetType, FLCKUserSubscriptionStream configuration loaded from server
OnStreamStartedLive stream begins
OnStreamStoppedLive stream ends
OnStreamErrorFString ErrorMessageA streaming error occurs
OnLoggedOutUser logs out

Log Category

DECLARE_LOG_CATEGORY_EXTERN(LogLCKStreaming, Log, All);

See Also