Nodes/MKRShift_Nodes/Time Remap Curve
ComfyUI Node

Time Remap Curve

Speed ramps with a JSON curve, not a slider

By criskb·Created 7 months ago·Updated 5 months ago· 0
Time Remap Curve
  • video
  • video
  • output_path
  • summary
curve_json[{"out":0.0,"src":0.0},{"out":1.0,"src":0.5},{"out":2.0,"src":2.0}]
output_fps24.0
fallback_fps24.0
output_formatauto
filename_prefixMKR_time_remap
subfolder
overwritefalse
filename_label

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 flat src = 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.

CategoryMKRShift Nodes/Media/Video/Edit

Inputs (9)

NameTypeDefaultDescription
video*
curve_jsonSTRING[{"out":0.0,"src":0.0},{"out":1.0,"src":0.5},{"out":2.0,"src":2.0}]
output_fpsFLOAT24.01–240
fallback_fpsFLOAT24.01–240
output_formatCOMBOauto6 options: auto, gif, webp, mp4, mov, webm
filename_prefixSTRINGMKR_time_remap
subfolderSTRING
overwriteBOOLEANfalse
filename_labeloptSTRING

Outputs (3)

NameTypeDescription
videoMKR_VIDEO
output_pathSTRING
summarySTRING