Companion X264 File
#!/bin/bash inotifywait -m ./raw_frames -e create | while read path action file; do nice -n 19 ionice -c 3 x264 --input-res 1920x1080 --fps 30 \ --preset fast --crf 23 --threads 4 --output "./enc/$file.mkv" \ "./raw_frames/$file" done On Windows using PowerShell (low-priority job):
| Feature | Standard x264 | Companion x264 | |--------|--------------|----------------| | | Normal or high | Idle / low (e.g., nice on Linux, IDLE_PRIORITY_CLASS on Windows) | | Thread usage | Aggressive (all logical cores) | Restricted (e.g., leaves 1–2 cores free for main app) | | Lookahead frames | Full (up to 250) | Reduced (e.g., 0–10) to lower latency & memory | | Rate control | 2-pass, CRF, or CBR | Often CBR or capped VBR for predictable load | | Input source | Pre-encoded file | Live frame buffer (e.g., from game or capture card) | companion x264
The core idea is simple: while the main application handles user-facing tasks (rendering gameplay, editing timelines, or playing media), the "companion" x264 instance quietly encodes video in the background, utilizing spare CPU cycles without disrupting the primary experience. This text is accurate as of the x264
| Aspect | GPU Encoding (NVENC) | Companion x264 | |--------|----------------------|----------------| | | ~1–5% | 20–60% (but idle-priority) | | Quality per bitrate | Good (newer NVENC) | Excellent (can match 2x bitrate of GPU) | | Latency | Very low | Low to moderate | | Multi-instance | Limited (VRAM bottleneck) | Many (RAM-bound) | | Use case | Real-time streaming, recording | Background transcoding, high-quality archives | nice on Linux
As CPUs grow more powerful with efficiency cores (Intel's P+E architecture, Apple's M-series), the role of companion x264 will likely expand, intelligently shunting encoding tasks to low-power cores while performance cores handle interactive work. The name may fade, but the concept – a silent, helpful encoding partner – is here to stay. This text is accurate as of the x264 r3100+ builds and common usage patterns up to 2026.
$p = Start-Process -FilePath "x264.exe" -ArgumentList "--input ..." -PassThru $p.PriorityClass = [System.Diagnostics.ProcessPriorityClass]::Idle Companion x264 embodies a philosophy of resource courtesy : using spare computational capacity without stealing from the user's immediate experience. It is not a flashy technology, but it underpins much of today's background video processing – from your nightly Plex transcodes to the recording of your last gaming session.