nimeet Docs
中文

Quickstart

Build the SDK, start a recording, query state, stop and collect the files.

Version v1.1.0 · Updated 2026-10-26 · revision 1

Quick start

1. Build

bash
cmake -S the Linux recording SDK -B build/linux-recording -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build/linux-recording --parallel 2
ctest --test-dir build/linux-recording --output-on-failure

On Windows, use the build script shipped with the SDK (CXX selects the compiler).

2. Record a real MP4 (legacy IRecordingEngine)

cpp
MyHandler handler;
agora::IRecordingEngine* engine = agora::IRecordingEngine::createAgoraRecordingEngine("app-id", &handler);
auto* concrete = static_cast<nimeet::recording::RecordingEngine*>(engine);

agora::RecordingConfig config{};
config.recordFileRootDir = const_cast<char*>("./recordings");
config.mixResolution = const_cast<char*>("640,360,15");
if (engine->joinChannel(token, "channel-1", 1001, config) != 0) return 1;

concrete->SetFrameSource(std::make_shared<nimeet::recording::SyntheticFrameSource>(640, 360, 15));
concrete->PumpFrames(150);  // 10 seconds at 15 fps

if (engine->leaveChannel() != 0) return 2;  // output failed verification; onError was raised
const auto& output = concrete->output();    // verified=true, container="mp4", duration>0
engine->release();

3. The 4.x surface (IAgoraMediaRtcRecorder)

cpp
agora::IAgoraService* service = agora::createAgoraService();
agora::AgoraServiceConfiguration serviceConfig{};
serviceConfig.appId = const_cast<char*>("app-id");
serviceConfig.enableAudioDevice = false;  // the recorder has no audio device
service->initialize(serviceConfig);

agora_refptr factoryReference = agora::createAgoraMediaComponentFactory();
auto* factory = static_cast<agora::IAgoraMediaComponentFactory*>(factoryReference.raw());
agora::IAgoraMediaRtcRecorder* recorder =
    static_cast<agora::IAgoraMediaRtcRecorder*>(factory->createMediaRtcRecorder().raw());
recorder->initialize(service, /*enable_mix=*/true, /*recordEncodedOnly=*/false);
recorder->registerRecorderEventHandle(&handler);  // IAgoraMediaRtcRecorderEventHandler
recorder->joinChannel(token, "channel-1", "recorder");
recorder->startRecording();
// ... push frames or use the egress sink ...
recorder->stopRecording();
recorder->leaveChannel();

4. Verify the output

bash
ffprobe -v error -show_entries format=duration,size ./recordings/channel-1_1001.mp4

The SDK performs the same verification internally (container header + byte count + ffprobe duration).

Generated by the documentation build pipeline · 2026-10-31 01:24:02 UTC · Documentation center v1.1.0.

Content follows the public API definitions.

ni-meet is a self-hosted RTC PaaS with a LiveKit-based media plane (Apache-2.0) and an Agora-compatible API.