Remove video speckle noise by API: median filter radius

Sume's video filter allowlists median, which replaces each pixel with the middle value of its neighbours. Radius runs 1 to 127; start at 1 and compare.

4 min readSume
All posts

To reduce isolated speckle in a clip, send median in the filtergraph of POST /v1/video-filter. It is on the allowlist under Blur / sharpen / noise in Video filter, and it returns a new MP4 without touching the source. It is a pixel filter, not an AI denoiser, so expect softer detail as the radius grows. Option facts are from the FFmpeg filter documentation, read 2026-10-01.

Which median options matter?

Options of median as listed in the FFmpeg filter documentation, read 2026-10-01.
OptionWhat it does
radiusNeighbourhood size, 1 to 127, default 1. Larger values smooth more and soften more.
percentile0 to 1, default 0.5. 0.5 is the true median; other values pick a darker or lighter neighbour.
planesWhich planes to filter, 0 to 15, default 15 (all). Lower it to leave some planes untouched.

How do I try median on one clip?

Check the program first; the check is free and needs no idempotency key. Then send the same filtergraph to POST /v1/video-filter with an Idempotency-Key. Keep radius at 1 for the first pass and look at the result before widening it.

curl -X POST https://api.sume.com/v1/video-filter/check \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/noisy.mp4",
    "filtergraph": "median=radius=1"
  }'

Will median fix compression blocks or banding?

Not reliably. A median pass is aimed at outlier pixels, such as hot pixels and salt-and-pepper specks. Banding in gradients is a different problem, and the allowlist has deband for it; see fixing banding in AI video. Whole-frame sensor grain is better left alone or softened lightly, because a large radius flattens fine texture such as hair and fabric.

Can I chain it with other filters?

Yes. The graph runs filters in order, up to 32 named filters, so median=radius=1,unsharp=5:5:0.6 denoises and then restores some edge crispness. Add the sharpen step only if the median result looks too soft, and judge both on the same short clip. The sharpen options are covered in sharpening after an upscale.

What does a filter job cost and where are the limits?

The docs list $0.02 per encode job, with a source of at most 300 seconds, a filtergraph of at most 2048 characters and 32 named filters. The /v1/video-filter/check route runs the same allowlist and source checks for free and returns valid and next_action; a graph that passes can still fail on the worker (bad expression, memory, time), which comes back as a structured job error.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume