#!/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):
1. Introduction: What is "Companion x264"? "Companion x264" is not an official name for a specific software product, but rather a descriptive term that has emerged within video processing, streaming, and content creation communities. It refers to a secondary, background instance of the x264 video encoder running alongside a primary application (e.g., a game, a video editor, a live streaming software, or a media server). 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. It refers to a secondary, background instance of
| 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 | The name may fade, but the concept β
| 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) |
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.