> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liv.tv/llms.txt
> Use this file to discover all available pages before exploring further.

# Core SDK

> Overview of the LIV Camera Kit (LCK) Core plugin for Unreal Engine, covering video encoding, audio mixing, scene capture architecture, and the recording workflow.

<Info>
  **Module:** LCKCore | **Version:** 1.0 | **Platforms:** Windows, Android
</Info>

## Overview

The LCK Core plugin provides the fundamental recording infrastructure — video encoding, audio mixing, and scene capture management. It serves as the foundation for all other LCK plugins.

## Key Components

<CardGroup cols={2}>
  <Card title="ULCKRecorderSubsystem" icon="circle-play">
    World subsystem managing the recording lifecycle, frame capture, and encoder coordination
  </Card>

  <Card title="ILCKEncoder" icon="film">
    Platform-specific video encoder interface with hardware acceleration
  </Card>

  <Card title="FLCKAudioMix" icon="sliders">
    Multi-source audio mixer aggregating all registered audio sources
  </Card>

  <Card title="ILCKAudioSource" icon="microphone">
    Modular audio source interface for game audio, microphone, and voice chat
  </Card>
</CardGroup>

## Architecture

```
┌─────────────────────────────────────────────────────────┐
│                 ULCKRecorderSubsystem                   │
│              (World Subsystem - Tick)                    │
├─────────────────────────────────────────────────────────┤
│  ┌─────────────────┐      ┌─────────────────┐          │
│  │ SceneCapture    │      │  FLCKAudioMix   │          │
│  │   Component     │      │  (Audio Mixer)  │          │
│  └────────┬────────┘      └────────┬────────┘          │
│           │                        │                    │
│           ▼                        ▼                    │
│  ┌─────────────────────────────────────────────┐       │
│  │              ILCKEncoder                     │       │
│  │    (Platform-Specific Implementation)        │       │
│  └─────────────────────────────────────────────┘       │
└─────────────────────────────────────────────────────────┘
                            │
            ┌───────────────┴───────────────┐
            ▼                               ▼
┌───────────────────────┐      ┌───────────────────────┐
│   FLCKWindowsEncoder  │      │   FLCKAndroidEncoder  │
│  (Media Foundation)   │      │    (MediaCodec)       │
└───────────────────────┘      └───────────────────────┘
```

## Recording Workflow

<Steps>
  <Step title="Setup">
    Configure recording parameters (resolution, bitrate, framerate)
  </Step>

  <Step title="Register Capture">
    Register a SceneCaptureComponent2D as the video source
  </Step>

  <Step title="Start Recording">
    Initialize encoder and begin frame capture
  </Step>

  <Step title="Capture Loop">
    Each tick: capture frame, mix audio, encode data
  </Step>

  <Step title="Stop Recording">
    Finalize encoding and save to file
  </Step>
</Steps>

## Supported Formats

| Component | Format      | Details                                        |
| --------- | ----------- | ---------------------------------------------- |
| Video     | H.264 (AVC) | Hardware-accelerated, Baseline to High profile |
| Audio     | AAC-LC      | 44.1/48 kHz, stereo                            |
| Container | MP4         | Standard fragmented MP4                        |

## Quick Example

```cpp theme={null}
#include "LCKRecorderSubsystem.h"

void AMyRecorder::SetupRecording()
{
    ULCKRecorderSubsystem* Recorder = GetWorld()->GetSubsystem<ULCKRecorderSubsystem>();

    // Configure parameters
    FLCKRecorderParams Params;
    Params.Width = 1920;
    Params.Height = 1080;
    Params.Framerate = 60;
    Params.VideoBitrate = 12 << 20;  // 12 Mbps
    Params.AudioBitrate = 256 << 10; // 256 Kbps
    Params.Samplerate = 48000;

    // Setup with scene capture component
    Recorder->SetupRecorder(Params, MySceneCaptureComponent);

    // Start recording
    Recorder->StartRecording();
}

void AMyRecorder::StopRecording()
{
    ULCKRecorderSubsystem* Recorder = GetWorld()->GetSubsystem<ULCKRecorderSubsystem>();
    Recorder->StopRecording();
}
```

## Log Categories

```cpp theme={null}
DECLARE_LOG_CATEGORY_EXTERN(LogLCK, Log, All);
DECLARE_LOG_CATEGORY_EXTERN(LogLCKEncoding, Log, All);
```

<Tip>
  Enable verbose logging with `LogLCK=VeryVerbose` and `LogLCKEncoding=VeryVerbose` in your DefaultEngine.ini for debugging.
</Tip>

## Next Steps

<CardGroup cols={3}>
  <Card title="Recording" icon="circle-play" href="/unreal/core-sdk/recording">
    Recording system details
  </Card>

  <Card title="Encoding" icon="film" href="/unreal/core-sdk/encoding">
    Encoder implementation
  </Card>

  <Card title="Project Settings" icon="gear" href="/unreal/core-sdk/project-settings">
    SDK configuration
  </Card>
</CardGroup>
