Turn a video into a line drawing: edgedetect in video-filter

Send edgedetect=low=0.08:high=0.3 to Sume's video-filter for an outline look on any hosted clip. Add negate for dark lines on white. One $0.02 job.

4 min readSume
All posts

To make a video look like a line drawing with the Sume API, send edgedetect=low=0.08:high=0.3 as the filtergraph of a video-filter job. It keeps the outlines and drops the colors. Add ,negate at the end for dark lines on a white page. The job costs a flat $0.02 and returns a new MP4.

Edge detection is a stylized effect, not a repair. It works well on a clean, high-contrast clip such as a product turntable or a title card, and badly on a noisy, busy one.

What do low and high mean?

The FFmpeg documentation lists three options for edgedetect: low and high thresholds, each from 0 to 1 (defaults 0.1 and 0.4), and a mode that can be sobel, roberts, laplace or canny (default sobel). Edges weaker than low are dropped; edges stronger than high are always kept.

Lowering both values keeps more of the fine detail and makes the drawing busier. Raising them leaves only the strongest outlines. Try 0.08 and 0.3 first, then move in steps of 0.05.

How do I request it?

The clip must already be on media.sume.com, so import it first. Then submit the filtergraph with an Idempotency-Key. Edge detection draws white lines on black; chaining negate flips that to black lines on white, which reads better in print-style promos.

Run the unbilled check endpoint first if you are scripting this. It validates the schema and the allowlist and returns diagnostics instead of an error.

curl -X POST https://api.sume.com/v1/video-filter \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: outline-look-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/clip.mp4",
    "filtergraph": "edgedetect=low=0.08:high=0.3,negate"
  }'

Which clips look good as outlines?

Flat lighting and a simple background give the cleanest lines. The sources below are the clip lengths of Sume's video models; all of them fit inside the filter's 300-second source cap, so a generated result can go straight into the filter.

Because the filter keeps the geometry, frame rate and audio of the source unless the graph changes them, the outline version drops straight into a timeline beside the original, for a before-and-after reveal.

Clip lengths from Sume's video models, all under the 300-second filter cap (Sume docs, read 2026-10-12)
Model idClip lengthResolutions
wan-3.02 to 30 seconds480p, 720p, 1080p
gemini-omni-flash-1.13 to 10 seconds360p, 720p, 1080p, 4K
grok-imagine-video-1.54 to 15 seconds480p, 720p

What can go wrong?

If a threshold is outside 0 to 1 or the graph names a filter off the allowlist, the check returns invalid_filtergraph with the unknown token. A source over 300 seconds returns output_duration_exceeded; trim it first with video trim. Remember that the original is untouched, so you can try several threshold pairs and keep the best result.

Plan the workflow around a short test. Pull a few frames of the result with video frames, check that the outlines hold from one frame to the next, and only then run the graph on the full clip. A fast-moving subject can make the lines shimmer, because each frame is detected on its own. If that happens, raise the thresholds so only the strongest edges survive, or cut the clip shorter with video trim so the effect covers just the moment you need. The job price is flat, so each retry costs another $0.02 and nothing more.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume