BigBlueButton Recording Architecture: Asynchronous S3 Offloading & MP4 Transcoding Pipelines

Bymond Engineering
August 18, 202612 min read
BigBlueButton Recording Architecture and S3 Transcode Pipeline Blueprint

By default, BigBlueButton processes recorded lectures using its native Record-and-Playback (RAP) workflow engine. When a live class terminates, a sequence of Ruby and Shell scripts processes raw webcam feeds (.webm), FreeSWITCH audio tracks (.wav), whiteboard shapes (.xml), and presentation slides (.pdf), compiling them into an interactive HTML5 web playback format (/var/bigbluebutton/published/presentation).

While this native HTML5 format provides interactive slide navigation, it introduces three severe operational challenges for enterprise video platforms: 1. Local NVMe Disk Exhaustion: Storing raw event streams and uncompressed video chunks locally fills server disks rapidly. 2. Mobile Device Incompatibility: Mobile native apps and smart TVs cannot render raw HTML5 slide-sync packages; they require single-file MP4 video files. 3. Live Server CPU Contention: Executing FFmpeg video encoding on interactive live room servers degrades real-time WebRTC audio performance.

In this technical guide, Bymond presents a production-grade architecture for Off-Loading BigBlueButton Recordings to AWS S3 & Asynchronous MP4 Transcoding Pipelines.

Native RAP vs. Off-Loaded Asynchronous Transcode Architecture

bash
RECORDING ARCHITECTURE FLOW COMPARISON:

Native BBB Process (CPU Heavy & Local Disk Lock-In):
[ Live Meeting Ends ] ---> [ Local rap-process (FFmpeg) ] ---> [ Local Disk /var/bigbluebutton/published ]

Off-Loaded Asynchronous S3 Pipeline (Bymond Architecture):
[ Live Meeting Ends ] ---> [ Fast Raw Asset Sync ] ---> [ S3 Object Storage Bucket ]
                                                                   |
                                                                   v
                                                   [ Isolated Worker Cluster ]
                                                   [ Hardware Accelerated MP4 Encoding ]
                                                                   |
                                                                   v
                                                   [ CDN Distribution (CloudFront) ]

Technical Stages of the Custom Recording Pipeline

Stage 1: Post-Archive S3 Raw Offload (`post_archive` Hook)

Instead of processing videos locally on the live media server, configure BigBlueButton's /usr/local/bigbluebutton/core/scripts/post_archive/ hook to sync raw recording assets (/var/bigbluebutton/recording/raw/<meeting_id>) directly to an AWS S3 bucket using aws-cli or s3cmd, then purge local disk copies immediately:

bash
#!/bin/bash
# /usr/local/bigbluebutton/core/scripts/post_archive/s3_offload.sh

MEETING_ID=$1
RAW_DIR="/var/bigbluebutton/recording/raw/${MEETING_ID}"
S3_TARGET_BUCKET="s3://bymond-bbb-recording-spool/raw/${MEETING_ID}"

logger -t BBB-S3 "Starting S3 raw offload for meeting ${MEETING_ID}"

# Sync raw assets to AWS S3 Object Storage
aws s3 sync ${RAW_DIR} ${S3_TARGET_BUCKET} --quiet

if [ $? -eq 0 ]; then
    logger -t BBB-S3 "S3 sync successful. Purging local raw directory: ${RAW_DIR}"
    rm -rf ${RAW_DIR}
    exit 0
else
    logger -t BBB-S3 "ERROR: S3 sync failed for meeting ${MEETING_ID}"
    exit 1
fi

Stage 2: Asynchronous MP4 Transcoding Worker Pool

Once raw assets arrive in the S3 spool bucket, an AWS SQS event triggers an isolated GPU-Accelerated Transcoding Worker Node (using NVENC H.264 hardware acceleration).

bash
TRANSCODING WORKER ENGINE PIPELINE:
[ AWS S3 Raw Spool ] 
  ---> [ Node Worker Downloads Audio (.wav) + Webcam (.webm) + Deskshare ]
  ---> [ FFmpeg Composite Canvas Stitcher ]
  ---> [ NVENC Hardware H.264 Encoder ]
  ---> [ Published Single-File MP4 (1080p @ 30 FPS) ]

FFmpeg Composite Encoding Command Template

bash
ffmpeg -y \
  -i audio.wav \
  -i webcam.webm \
  -i deskshare.webm \
  -filter_complex "[1:v]scale=480:270[cam]; [2:v]scale=1440:1080[main]; [main][cam]overlay=main_w-overlay_w-20:main_h-overlay_h-20[outv]" \
  -map "[outv]" -map 0:a \
  -c:v h264_nvenc -preset p4 -b:v 2000k \
  -c:a aac -b:a 128k \
  output_lecture.mp4

Infrastructure Cost Optimization

Off-loading raw assets to AWS S3 and executing video rendering on spot-instance GPU workers reduces recording storage and compute costs significantly:

Storage & Processing MetricNative Local Server DiskS3 Offloaded + MP4 Transcode
Storage Unit Cost$0.15 per GB/mo (Local NVMe)$0.023 per GB/mo (AWS S3 Standard)
Long-Term Archival (Glacier)Not supported natively$0.004 per GB/mo (AWS S3 Glacier Instant)
Live Server CPU Impact45% CPU steal during encoding0% CPU steal (Off-loaded worker node)
Mobile Video PlaybackLimited (Requires HTML5 player)100% Universal (Standard MP4 URL)

Summary & Next Steps

Customizing BigBlueButton's recording pipeline eliminates disk exhaustion risks, frees up CPU cores for live classes, and delivers single-file MP4 recordings accessible across any device.

Share Article:
BigBlueButton Host Ecosystem

Ready to scale BigBlueButton without DevOps overhead?

Eliminate server crashes, TURN relay dropouts, and manual updates. Bymond operates fully managed, auto-scaling BigBlueButton clusters for universities, academies, and EdTech platforms.

Explore BigBlueButton Hosting

Continue Reading: Related Engineering Guides