Recording
Built-in recording with optional S3/MinIO upload.
Recording Architecture
Configuration
bash
# Enable recording
RECORD_ENABLED=1
# Recording directory
RECORD_DIR=records
# Upload to S3/MinIO
UPLOAD_RECORDINGS=1
DELETE_RECORDING_AFTER_UPLOAD=1
# S3 Configuration
S3_ENDPOINT=s3.amazonaws.com
S3_REGION=us-east-1
S3_BUCKET=my-recordings
S3_ACCESS_KEY=$AWS_ACCESS_KEY_ID
S3_SECRET_KEY=$AWS_SECRET_ACCESS_KEY
S3_USE_SSL=1
S3_PREFIX=recordings/Supported Codecs
| Codec | Container | Extension |
|---|---|---|
| VP8 | IVF | .ivf |
| VP9 | IVF | .ivf |
| Opus | OGG | .ogg |
File Naming
{room}_{trackID}_{timestamp}.{ext}Example:
demo_video0_1710123456.ivf
demo_audio1_1710123456.oggRecording Flow
S3/MinIO Configuration
AWS S3
bash
S3_ENDPOINT=s3.amazonaws.com
S3_REGION=us-east-1
S3_BUCKET=my-bucket
S3_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
S3_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
S3_USE_SSL=1MinIO
bash
S3_ENDPOINT=minio.example.com:9000
S3_BUCKET=recordings
S3_ACCESS_KEY=minioadmin
S3_SECRET_KEY=minioadmin
S3_USE_SSL=0
S3_PATH_STYLE=1 # Required for MinIOObject Key Format
{S3_PREFIX}{room}_{trackID}_{timestamp}.{ext}Example with S3_PREFIX=recordings/:
recordings/demo_video0_1710123456.ivfRecording Lifecycle
API Endpoints
List Recordings
http
GET /api/recordsResponse:
json
[
{
"name": "demo_video0_1710123456.ivf",
"size": 1048576,
"modTime": "2024-03-10T12:34:56Z",
"url": "/records/demo_video0_1710123456.ivf"
}
]Download Recording
http
GET /records/{filename}Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| No recordings | RECORD_ENABLED=0 | Set to 1 |
| Empty files | Codec not supported | Use VP8/VP9/Opus |
| Permission denied | Cannot write to RECORD_DIR | Check directory permissions |
| Upload fails | Invalid S3 credentials | Verify S3_* configuration |
Debug Commands
bash
# Check recording directory
ls -la records/
# Verify S3 configuration
echo $S3_ENDPOINT $S3_BUCKET
# Test S3 connection (AWS CLI)
aws s3 ls --endpoint-url http://minio:9000Storage Considerations
File Size Estimation
| Resolution | Bitrate | 1 Hour Size |
|---|---|---|
| 720p | 2 Mbps | ~900 MB |
| 1080p | 4 Mbps | ~1.8 GB |
| 4K | 15 Mbps | ~6.75 GB |
Disk Space Management
- Monitor
RECORD_DIRdisk usage - Implement retention policy (e.g., delete after 7 days)
- Use
DELETE_RECORDING_AFTER_UPLOAD=1for S3 storage