Time Remap Curve
Speed ramps with a JSON curve, not a slider
- video
- video
- output_path
- summary
Slow-mo, fast-forward, freeze, then speed up again - every edit tool calls it time remapping, and ComfyUI doesn't have it in core. MKRTimeRemapCurve adds it as a node, and it's the rare remap node that describes the timing as a curve you can actually read. The default curve says it all: [{"out":0.0,"src":0.0},{"out":1.0,"src":0.5},{"out":2.0,"src":2.0}] - at output time 1.0 it's showing source time 0.5 (a slow-motion stretch), and by output time 2.0 it's back at source 2.0 (back to real speed).
Mechanically it's a resampler. It decodes the video, reads your list of {out, src} keyframes, interpolates a curve between them (each point pairs a position on the output timeline with the source frame to show there), and rebuilds the frame sequence to that schedule at the requested output fps. The default curve is literally a speed ramp: start, hold-and-stretch, release.
The inputs
- video (any type) - an MKR_VIDEO payload or a decodable path.
- curve_json - the keyframe list. The format is the whole game: each object is
{"out": <output position>, "src": <source position>}. Flat stretches between points = slow motion; steep ones = fast-forward; a flatsrc= a freeze frame. - output_fps - the frame rate of the remapped result; 24 by default.
- fallback_fps - used when the source fps can't be read.
- output_format -
auto,gif,webp,mp4,mov,webm. mp4/mov/webm need ffmpeg installed. - filename_prefix, subfolder, overwrite, filename_label - the save side, standard for the pack.
What comes out
video (MKR_VIDEO), output_path, and summary.
Installing it
In criskb/MKRShift_Nodes from Cris K B. ComfyUI Manager search "MKRShift_Nodes", or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart. It decodes and re-encodes video, so ffmpeg matters here too - the README flags it for the video/audio nodes. No pip requirements beyond that.
Where it gets fiddly
There's no curve editor; you type JSON. That's the trade for determinism, but it means a three-point ramp is easy and a twenty-point curve is typing. Keep keyframes in out order and remember src can go backward if you want a rewind. And like every re-encode node, the output quality rides on the format and your source - remapping a 12fps latent-video render won't invent smooth motion, it just re-times the frames it has.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| video | * | — | |
| curve_json | STRING | [{"out":0.0,"src":0.0},{"out":1.0,"src":0.5},{"out":2.0,"src":2.0}] | — |
| output_fps | FLOAT | 24.01–240 | — |
| fallback_fps | FLOAT | 24.01–240 | — |
| output_format | COMBO | auto | 6 options: auto, gif, webp, mp4, mov, webm |
| filename_prefix | STRING | MKR_time_remap | — |
| subfolder | STRING | — | |
| overwrite | BOOLEAN | false | — |
| filename_labelopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| video | MKR_VIDEO | — |
| output_path | STRING | — |
| summary | STRING | — |