$ show joncampbell123/composite-video-simulator
This repository is a collection of command-line C++ tools that simulate analog composite video artifacts and vintage VHS degradation effects. The primary program, ffmpeg_ntsc, decodes input video via FFmpeg, applies a chain of emulated NTSC/PAL encoding, VHS tape defects, audio hiss and crosstalk, then re-encodes the result as interlaced H.264. The codebase also includes many experimental or disabled utilities for specific effects like posterization, chroma keying, scanimate raster distortion, and raw composite capture processing. All tools are standalone monolithic executables built on legacy (pre-4.0) FFmpeg APIs, using autotools for configuration. The architecture is single-file per tool with significant code duplication, global mutable state, and extensive technical comments on analog video standards. There are no unit tests, and the code suffers from deprecated library APIs, making it compile only against older FFmpeg versions. The project is best suited for producing retro-looking video content, but its development appears to have stalled, with many tools disabled in the build system and no active maintenance.
The LLM identified 2 files worth highlighting for reuse:
The LowpassFilter class provides a single-pole IIR filter with lowpass and highpass methods. It is instantiated in multiple tools for both audio filtering (hiss, preemphasis) and video sync detection. The class is small, self-contained, and could be extracted into a project of its own with minimal effort, making it a safe candidate for reuse in digital signal processing contexts.
The HiLoComboPass class aggregates multiple HiLoPair instances to create a configurable multi-pass lowpass/highpass audio filter chain. It manages per-channel state and provides a simple process method. This pattern is reusable for any audio pipeline that needs combined filtering, and it is only dependent on the simple LowpassFilter class.