How to Add Visual Noise to Video Using FFmpeg
This article provides a straightforward guide on how to use the
FFmpeg noise video filter to add film grain, static, or
analog-style visual noise to your videos. You will learn the basic
command syntax, key parameters for adjusting noise intensity, and
practical command-line examples to achieve different visual effects.
To add visual noise to a video, you must use FFmpeg’s video filter
flag (-vf) followed by the noise filter and
its parameters. The filter allows you to inject random noise into both
the luma (brightness) and chroma (color) channels of the video.
Basic Syntax and Parameters
The basic structure of the filter is:
ffmpeg -i input.mp4 -vf "noise=parameter_1=value:parameter_2=value" output.mp4The most common parameters you will configure include:
alls(all strength): Sets the noise strength for all channels (luma and chroma) simultaneously. The value ranges from 0 to 100.allf(all flags): Sets the behavior of the noise for all channels.ls/luma_strength: Sets noise strength specifically for the luma channel (brightness).lf/luma_flags: Sets flags specifically for the luma channel.cs/chroma_strength: Sets noise strength specifically for the chroma channels (color).cf/chroma_flags: Sets flags specifically for the chroma channels.
Available Flags
Flags control the type and movement of the noise: *
t (temporal): The noise pattern changes
with every frame. Without this flag, the noise pattern remains static
over the video. * u (uniform): Uses
uniform noise instead of the default Gaussian (normal distribution)
noise. * p (positive): Adds only positive
noise values, which tends to brighten the image.
Practical Examples
1. Adding Temporal Film Grain (Recommended)
To create a natural-looking film grain, you should add temporal noise primarily to the luma (brightness) channel. This ensures the noise changes every frame and does not introduce unrealistic color artifacts.
ffmpeg -i input.mp4 -vf "noise=luma_strength=15:luma_flags=t" output.mp42. Adding Heavy Color Static
To create a harsh, analog TV static effect, apply high noise strength to both luma and chroma channels with temporal enabled.
ffmpeg -i input.mp4 -vf "noise=alls=50:allf=t" output.mp43. Adding Static (Non-Moving) Grain
If you want to apply a textured, dusty look that does not move across
frames, omit the temporal (t) flag.
ffmpeg -i input.mp4 -vf "noise=alls=20" output.mp44. Combining with Uniform Noise
For a harsher, more digital-looking pixel noise, add the uniform
(u) flag alongside the temporal flag.
ffmpeg -i input.mp4 -vf "noise=alls=25:allf=tu" output.mp4