Skip to main content
Battles Record uses FFmpeg for post-processing recorded streams. Configure how recordings are processed after capture.

Processing Modes

Concatenate (Fastest)

Joins HLS segments directly without re-encoding:
Segment 1 + Segment 2 + ... → Output.ts
  • Pros: Fastest, no quality loss, minimal CPU usage
  • Cons: Output is TS format, larger file size
  • Use when: You need recordings quickly or will process later
Remuxes segments into a container without re-encoding:
Segments → FFmpeg (copy codec) → Output.mp4
  • Pros: Fast, no quality loss, MP4 output
  • Cons: Slightly slower than concatenate
  • Use when: You want MP4 files without re-encoding

Re-encode

Transcodes the recording to a different format or quality:
Segments → FFmpeg (encode) → Output.mp4
  • Pros: Smaller files, consistent quality, custom settings
  • Cons: CPU/GPU intensive, takes longer
  • Use when: You need smaller files or specific format requirements

Configuration

Navigate to Settings → Post-Processing to configure:

Output Format

FormatExtensionDescription
MP4.mp4Most compatible, recommended for sharing
MKV.mkvBetter metadata support, good for archiving
TS.tsRaw transport stream, fastest processing

Video Codec

When re-encoding:
CodecDescriptionGPU Support
H.264Universal compatibilityNVENC, QSV, AMF
H.265/HEVCBetter compression, smaller filesNVENC, QSV, AMF
VP9Open format, good compressionNone
AV1Best compression, newerNVENC (40-series+)

Audio Codec

CodecDescription
AACStandard, compatible everywhere
OpusBetter quality at low bitrates
CopyKeep original audio unchanged

GPU Acceleration

Enable hardware acceleration for faster encoding:

NVIDIA (NVENC)

1

Requirements

NVIDIA GPU with NVENC support (most GTX 900 series and newer)
2

Enable in Settings

Go to Settings → Post-Processing → Hardware Acceleration and select NVENC
3

Verify

Check the post-processing logs to confirm NVENC is being used

Intel Quick Sync (QSV)

1

Requirements

Intel CPU with integrated graphics (most 6th gen and newer)
2

Enable in Settings

Go to Settings → Post-Processing → Hardware Acceleration and select QSV

AMD (AMF)

1

Requirements

AMD GPU with VCE/VCN support (most RX 400 series and newer)
2

Enable in Settings

Go to Settings → Post-Processing → Hardware Acceleration and select AMF
Docker users need to pass through GPU devices. See the installation guide for GPU passthrough configuration.

Quality Presets

When re-encoding, choose a quality preset:
PresetCRFDescription
Lossless0No quality loss, large files
High18Visually lossless, recommended
Medium23Good balance of quality and size
Low28Smaller files, some quality loss
Tiny35Minimum size, noticeable quality loss
For archiving, use High or Lossless. For sharing, Medium provides good results with reasonable file sizes.

CRF Quality Guide

CRF RangeQualityRecommended Use Case
0-17Visually losslessArchival, video editing source material
18-23High qualityGeneral viewing, recommended for most users
24-28Medium qualitySpace-constrained storage, sharing
29-51Low qualityPreview files, mobile viewing
Lower CRF values produce larger files with better quality. A CRF of 0 is truly lossless and can produce very large files. For most users, CRF 18-23 provides an excellent balance.

Custom FFmpeg Arguments

For advanced users, specify custom FFmpeg arguments:
-c:v libx264 -preset slow -crf 20 -c:a aac -b:a 192k
Enter custom arguments in Settings → Post-Processing → Custom FFmpeg Arguments.
Custom arguments override preset settings. Make sure you understand FFmpeg syntax before using this feature.

Custom FFmpeg Path

By default, the daemon uses whichever ffmpeg is found on the system PATH. To use a specific FFmpeg binary:
SettingDefaultDescription
ffmpeg_pathSystem PATHPath to a custom FFmpeg binary
Configure in Settings → Post-Processing → FFmpeg Path or via TOML config:
[post_processing]
ffmpeg_path = "/usr/local/bin/ffmpeg"

Segment Handling

Configure how segments are handled after processing:
OptionDescription
DeleteRemove segments after successful processing
KeepRetain segments for potential reprocessing
ArchiveMove segments to an archive directory
Segments are stored in the temporary directory configured in Settings → Storage.

Processing Queue

When multiple recordings finish simultaneously:
  • Recordings are queued for processing
  • Process one at a time to avoid CPU overload
  • View queue status in Recordings → Processing Queue

Queue Priority

Higher priority channels are processed first. Adjust priority in channel settings.

Concurrent Processing

For powerful systems, enable concurrent processing:
ConcurrentDescription
1Process one at a time (default)
2Process two simultaneously
3+For high-end systems only
High concurrent processing requires significant CPU/GPU resources. Monitor system performance and reduce if needed.

Background Reconciliation

A background worker periodically scans for recordings that need post-processing:
SettingDefaultDescription
Check Interval15 minutesHow often to scan for unprocessed recordings
How it works:
  • Runs an initial scan on daemon startup, then periodically at the configured interval
  • Finds recordings in completed status and queues them for processing
  • Updates missing stats (duration, size) for processed recordings by probing output files with FFmpeg
  • Retries failed recordings up to 5 attempts before permanently giving up
  • Skips recordings for channels that are currently actively recording
  • Estimates duration from segment count (~2 seconds per segment) when FFmpeg metadata is unavailable
This ensures recordings are never stuck in completed status - even if a processing job was missed or the daemon was restarted.

Per-Channel Overrides

Individual channels can override the global post-processing settings:
SettingDescription
Enable/DisableEnable or disable post-processing for this channel
Output FormatOverride the output format (re-encode, copy, concatenate)
Segment HandlingOverride segment handling (delete, concatenate, keep)
Filename TemplateCustom output filename template
Configure per-channel overrides in the channel detail panel under the Post-Processing tab.
Per-channel settings take precedence over global settings. If a channel doesn’t have an override, the global settings apply.

Troubleshooting

Processing Takes Too Long

  • Enable GPU acceleration
  • Use Copy mode instead of re-encoding
  • Reduce concurrent recording count
  • Lower quality preset

Output File Is Corrupted

  • Check FFmpeg logs for errors
  • Try re-processing with Copy mode
  • Ensure segments weren’t deleted prematurely
  • Verify sufficient disk space

GPU Encoding Fails

  • Verify GPU driver is up to date
  • Check GPU is supported
  • Try software encoding as fallback
  • Review FFmpeg error output