Before/after side-by-side video: hstack in Sume video filter
Make a before/after comparison clip with ffmpeg hstack through the Sume video filter API. Split the video, grade one side, stack, and dry-run first.

Use split to copy the video into two streams, change one, and join them with hstack in the filtergraph of Sume's video filter. The output is twice as wide as the source. Run the free POST /v1/video-filter/check first to confirm the graph is accepted before you pay for a job.
The graph
FFmpeg's documentation says hstack stacks input videos horizontally, that all streams must be the same pixel format and height, and that it is faster than using overlay and pad (read 2026-10-02). Its inputs option defaults to 2. Because the two halves come from one split, the heights match automatically as long as the graph only changes colour.
| Filter | Role here | Documented behaviour |
|---|---|---|
| split | Copy the input into two streams | Splits the input into several identical outputs |
| colortemperature | Change one copy | temperature 1000 to 40000 K, default 6500; mix 0 to 1 |
| hstack | Place the copies side by side | Same pixel format and height required; inputs default 2 |
Dry-run it, then submit
The check endpoint is unbilled and validates the program. The same body goes to POST /v1/video-filter with an Idempotency-Key. The filtergraph limit is 2048 characters and 32 filters, and the source clip can be at most 300 seconds. Internal labels like [a] are allowed; stream specifiers are refused.
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/talk.mp4",
"filtergraph": "split[a][b];[b]colortemperature=temperature=5200:pl=0.4[c];[a][c]hstack=inputs=2"
}'Things to watch
The result is a new MP4 with twice the source width, so a 1920-wide source becomes 3840 wide. If you need a standard size, use a second step to scale the stack down, or start from a smaller clip. Label the halves in your editor or in your post; drawtext is not on the filter allowlist, so a text label cannot be added in this call.
The video must already be a media.sume.com URL in your workspace. After the job succeeds, read GET /v1/jobs/:id/result for the new video_url.
Sources
Related posts
More in Media tools
- Captions with sound cues for deaf viewers: W3C checklist on Sume
W3C says captions carry speech and non-speech sound. Sume's STT burn covers speech only, so here is how to author the full cue list and burn it.
- caption_no_speech on a silent clip: burn Halloween text with cues
A silent AI clip fails video captions with caption_no_speech. Pass cues with text, start and end instead: a worked giveaway announcement on Sume at $0.20.
- Captions unreadable on busy footage: dim the clip, then burn
Busy B-roll can swallow burned captions. Sume can dim the clip with video-filter, then burn captions with colour overrides, for about $0.22 a clip.
- Check character drift across AI shots with video_frames
Pull up to 24 evenly spaced stills from each AI clip with the unbilled video_frames route and compare faces and products before you stitch shots together.
Written by Sume