FFmpeg Framerate Filter Scene Change Threshold

The FFmpeg framerate filter allows you to alter video frame rates by interpolating new frames between existing ones, but fast transitions or scene cuts can result in ugly blending artifacts. To prevent this, the filter includes a scene change detection mechanism. This article explains how to configure the scene option within the framerate filter to fine-tune sensitivity and ensure clean frame generation during video cuts.

The scene Option

In FFmpeg, the framerate video filter provides the scene parameter to control scene detection sensitivity. When the visual difference between adjacent frames exceeds this threshold, the filter recognizes a scene change and duplicates or drops frames instead of blending them, avoiding "ghosting" artifacts across cuts.

  • Parameter: scene
  • Value Range: 0.0 to 100.0 (expressed as a percentage)
  • Default Value: 7.0

Basic Syntax

To set the threshold, define the scene parameter inside the -vf (video filter) argument alongside your target output frame rate:

ffmpeg -i input.mp4 -vf "framerate=fps=60:scene=10.0" output.mp4

In this example, the video is interpolated to 60 frames per second, and the scene change threshold is adjusted to 10.0%.

Tuning the Threshold

  • Lower Values (e.g., scene=3.0 to scene=5.0): Makes detection more sensitive. Use this if the filter interpolates across scene cuts, causing fast-moving objects or sudden angle changes to blur or smear together.
  • Higher Values (e.g., scene=10.0 to scene=15.0): Makes detection less sensitive. Use this if natural, rapid motion within the same scene is incorrectly triggering a scene cut, causing the interpolation to stutter instead of smoothing out.

Practical Examples

Increasing Sensitivity for Fast-Paced Content

If an action video or music video exhibits ghosting across quick cuts, lower the threshold to trigger cuts more aggressively:

ffmpeg -i input.mp4 -vf "framerate=fps=60:scene=4.0" -c:a copy output.mp4

Reducing Sensitivity for High-Motion Scenes

If panning shots or fast object tracking stutter because FFmpeg mistakes continuous motion for a scene cut, increase the threshold:

ffmpeg -i input.mp4 -vf "framerate=fps=60:scene=12.5" -c:a copy output.mp4

Adjusting Interpolation Boundaries

The framerate filter also includes interp_start and interp_end (both accepting values from 0 to 255), which define the range where motion blending transitions into a hard cut. You can combine these with scene for advanced control:

ffmpeg -i input.mp4 -vf "framerate=fps=60:scene=8.0:interp_start=10:interp_end=240" -c:a copy output.mp4