Record a LiveKit room to S3 with a grid layout

Add meeting recording to a LiveKit app without provisioning recording workers or an upload queue.

The pipeline

  1. LiveKit source
  2. video mixer
  3. audio mixer
  4. S3 segment sink

What this replaces

Build it yourself

  • Deploy and scale one recorder per concurrent room
  • Keep browser recording quality stable across platforms
  • Mux audio and video into a deterministic composite
  • Manage multipart uploads and failure retries

With AVFlow

  • Pass your own S3 credentials and path prefix
  • Let the segment sink encode and upload the output
  • Poll job state or receive lifecycle webhooks
  • Use the same JSON model later for captions and translation

The validated Job

This is the same file 02-room-grid-recording.json serves. Replace platform credentials, output URLs, and storage secrets before running it.

02-room-grid-recording.json Download
{
  "name": "room-grid-recording",
  "sources": [
    {
      "name": "room_src",
      "type": "livekit",
      "config": {
        "serverUrl": "wss://your-project.livekit.cloud",
        "token": "eyJ...",
        "select": {
          "mediaTypes": [
            "video",
            "audio"
          ]
        }
      }
    }
  ],
  "nodes": [
    {
      "name": "mix_video",
      "type": "video_mixer",
      "inputs": [
        "room_src"
      ],
      "config": {
        "canvas": {
          "width": 1920,
          "height": 1080,
          "backgroundColor": "#1a1a2e"
        },
        "layout": {
          "mode": "grid",
          "common": {
            "borderRadius": 8
          },
          "grid": {
            "maxColumns": 3,
            "gap": 4,
            "fit": "cover"
          }
        }
      }
    },
    {
      "name": "mix_audio",
      "type": "audio_mixer",
      "inputs": [
        "room_src"
      ],
      "config": {}
    }
  ],
  "sinks": [
    {
      "name": "segment_out",
      "type": "segment",
      "inputs": [
        "mix_video",
        "mix_audio"
      ],
      "config": {
        "storageType": "s3",
        "storageConfig": {
          "bucket": "recordings",
          "region": "us-east-1",
          "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
          "secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
          "pathPrefix": "rooms/{jobName}/{date}/",
          "filename": "{jobName}_{timestamp}"
        },
        "encoding": {
          "videoCodec": "h264",
          "audioCodec": "aac"
        }
      }
    }
  ]
}
Submit it API
curl -X POST "https://api.avflow.dev/v1/jobs" \
  -H "Authorization: Bearer $AVFLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d @02-room-grid-recording.json

Know the limits before you ship

  • The example uses placeholder AWS credentials; replace them before submitting.
  • Object storage and CDN fees are paid directly to your provider.
  • AVFlow bills successfully processed and delivered media, not configured paper specifications.

Run this LiveKit pipeline

Generate the Job in Playground, then run it with $20 promotional credit.