Dim a background clip under text: video filter dim amounts

The Sume video-filter dim op multiplies luma by an amount between 0 and 1; black stays black and chroma is untouched. Amount table, request and the $0.02 price.

3 min readSume
All posts

To darken a clip so text on top reads, send one dim op with an amount in (0, 1]. The docs define it as a luma multiplier: 0.45 makes the clip less bright, 1 changes nothing, and 0 or anything above 1 is refused with video_filter_amount_out_of_range. Black stays black and chroma is unchanged (Video filter).

What each amount does to luma

Because dim is a multiplication, you can predict the result for a pixel of known brightness. The table assumes full-range 8-bit luma on a 0 to 255 scale and rounds to the nearest integer; a mid-grey of 128 becomes:

Plain multiplication of the docs' definition; the encoder may round differently
`amount`Luma 255 becomesLuma 128 becomesLuma 0 becomes
12551280
0.82041020
0.6153770
0.45115580
0.377380
0.1538190

Request

One job, one op, $0.02. Run the free /check first if you are scripting this over many clips.

curl -X POST https://api.sume.com/v1/video-filter \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: dim-bg-001" \
  -d '{
    "video_url": "https://media.sume.com/artifacts/artf_demo/broll.mp4",
    "ops": [{"op": "dim", "amount": 0.45}]
  }'

Where it fits

Dim is material preparation, not placement. Put the result into video[] of Timeline 1.0 and let your caption step draw on top. The dim op accepts only {op, amount}: any extra key returns unsupported_filter_op_field.

  • Dim does not blur; blur lives in the allowlisted filtergraph.
  • Up to 8 ops, applied in order before any filtergraph.
  • Source up to 300 s.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume