The screen pulses. Frames feed into themselves, tighter and sharper with each pass. This is the heart of an FFmpeg feedback loop.
An FFmpeg feedback loop uses the output of its own processing as the next input. It can produce striking visual effects, recursive audio transformations, or automated motion amplification. The mechanics rely on FFmpeg’s ability to read from one stream while writing to another, feeding work back into the same pipeline.
To build one, start with a basic input stream:
ffmpeg -i input.mp4 -vf "scale=1280:720"output.mp4
Now, loop it by replacing the input with the output in repeated runs, or by chaining filters that reference previous frame states. For live loops, use intermediate buffers and named pipes (fifo) to keep the data moving without disk writes:
mkfifo looppipe
ffmpeg -i source.mp4 -vf "scale=1280:720"-f matroska looppipe &
ffmpeg -i looppipe -vf "hue=s=0"-f matroska looppipe
Each pass can stack filters: blur, hue shifts, edge detection, or audio reverb. The loop applies them cumulatively. Control the feedback strength with filter parameters and avoid runaway amplification by inserting normalization steps. Common filter chains for visual feedback include zoompan, rotate, and tblend. For audio, use aecho, alimiter, and aphasemeter to monitor stability.