Load Video (C2C)
Frames, audio, mask and VAE latents from one loader
- vae
- IMAGE
- frame_count
- audio
- video_info
- video
- mask
- info
- frame_map
- exr_passes
- metadata
Most video loaders give you frames and call it a day. This one gives you six outputs from a file in ComfyUI's input folder: IMAGE (or LATENT, if you wire a VAE in), frame_count, audio, video_info in VideoHelperSuite's format, a lazy C2C_VIDEO handle, and mask.
That combination is the reason to pick it over the stock loader. Taking audio out of the same node that gives you frames means a restore/upscale pass can hand both to the combiner without a second loader and a second decode. And the C2C_VIDEO handle is the pack's lazy type: it carries the plan - path, in/out points, resampling - and only the consumers that need pixels pay for decoding.
How it works
The file is probed rather than decoded: PyAV reads the container metadata, builds an index table of presentation timestamps, and reads the display matrix so a phone video shot in portrait isn't quietly sideways. Decoding then happens in chunks, respecting your skip/nth/cap selection, and the whole batch is budget-checked against free system memory before it's built - the node refuses with the actual numbers ("this selection is N frames of WxH, X GB as an IMAGE, and only Y GB of RAM is free") and suggests a cap that fits, instead of letting the OS find out for you.
force_rate resamples the output frame rate; 0 keeps the source. custom_width / custom_height resize, and 0 on one of them derives it from the other to preserve aspect. frame_load_cap, skip_first_frames and select_every_nth are the trim trio.
The two non-obvious widgets: format applies a model preset - AnimateDiff, Mochi, LTXV, Hunyuan, Cosmos, Wan - which rounds the frame count onto that model's grid and snaps the dimensions to the model's required multiple. This is genuinely useful, and it's also trimming your clip: pick Wan and a 33-frame selection becomes 33 only if the maths works, otherwise it's capped down to the nearest valid count. If your clip got shorter and you didn't ask, this is the cause. vae is the switch that changes the IMAGE output into LATENT by encoding it on the way out, saving you a separate encode node.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git
Or "CustomNodePacks" in ComfyUI Manager. This node needs PyAV (av), which ships with modern ComfyUI; if the loader complains, pip install av in ComfyUI's own Python environment. There's no model to download for the loader itself, and the pack's heavy dependencies (SAM, ViTMatte, transformers) belong to other nodes - the loader works fine without them. Don't run the pack's requirements.txt on a working install; it wants to reinstall things ComfyUI already provides, and the README warns about exactly that.
The file list comes from ComfyUI/input/ - it's a widget, not a path field, so a video sitting on your D: drive needs copying there or the sibling Load Video Path (C2C) node.
Where people get burned
The frame grid is the big one. Hand a video model a count it doesn't accept and it doesn't error - it reinterprets the clip and your motion comes out at the wrong speed. The format preset is there to prevent that. If you'd rather keep your exact frame count and pad around it, the pack's AV Handles node does the pad-and-trim properly.
Second: the resize. custom_width and custom_height are the loader's resample, done before any model sees it, and a format preset may change the size again. Two nodes quietly disagreeing about dimensions is a classic source of "why is my output squashed".
Third, and it bites in VRAM terms rather than errors: a big selection of 1080p frames as an IMAGE batch lives in system RAM, not VRAM. The budget check is real, and on a 32 GB machine a long 4K selection will trip it. Lower the cap, raise nth, or resize on the way in.
Inputs (40)
| Name | Type | Default | Description |
|---|---|---|---|
| video | COMBO | A video, an image, an EXR or an image sequence (shot.####.exr) from the ComfyUI input folder - upload with the node's bar or drop files on it. Server path mode (location) reads any folder instead. | |
| force_rate | FLOAT | 00β240 | Output FPS; 0 keeps source. |
| custom_width | INT | 00β16384 | Output width; 0 keeps source or derives from height. |
| custom_height | INT | 00β16384 | Output height; 0 keeps source or derives from width. |
| frame_load_cap | INT | 00β1000000 | Max frames; 0 = no cap. |
| skip_first_frames | INT | 00β1000000 | Skip this many frames first. |
| select_every_nth | INT | 11β100000 | Keep every Nth frame. |
| vaeopt | VAE | Encode to LATENT instead of IMAGE. | |
| formatopt | COMBO | None | Model preset (frame grid / dim multiple). |
| crop_xopt | FLOAT | 0.0000β1 | Crop, as a fraction of the frame (x, y, width, height; 0, 0, 1, 1 = no crop). Set it with the Crop tool in the player; custom_width / custom_height then resize the cropped frame. |
| crop_yopt | FLOAT | 0.0000β1 | Crop, as a fraction of the frame (x, y, width, height; 0, 0, 1, 1 = no crop). Set it with the Crop tool in the player; custom_width / custom_height then resize the cropped frame. |
| crop_wopt | FLOAT | 1.0000β1 | Crop, as a fraction of the frame (x, y, width, height; 0, 0, 1, 1 = no crop). Set it with the Crop tool in the player; custom_width / custom_height then resize the cropped frame. |
| crop_hopt | FLOAT | 1.0000β1 | Crop, as a fraction of the frame (x, y, width, height; 0, 0, 1, 1 = no crop). Set it with the Crop tool in the player; custom_width / custom_height then resize the cropped frame. |
| decoderopt | COMBO | auto | auto: the fast path only where it is faster with the same colour - measured, that is the exact reader on the tested machine. fast: ffmpeg decodes 8-bit 4:2:0 video (the same frames; on an NVIDIA GPU the colour conversion runs there, mean 0.5/255 from the exact reader). exact: the frame-accurate PyAV reader (10-bit, HDR, alpha, ProRes and image sequences always use it). |
| seconds_capopt | FLOAT | 0.00β86400 | Load at most this many seconds after skip_first_frames (0 = no limit), at the force_rate rate when set. Works with frame_load_cap: the smaller one wins, and a format preset then snaps the count. |
| resolutionopt | COMBO | custom | Output size by its LONGEST side, keeping the aspect: 2160p is 3840, 1080p is 1920. custom uses custom_width / custom_height (0 = keep the source size or follow the aspect). source ignores them. |
| divisible_byopt | COMBO | 1 | Round both output dimensions to a multiple of this. A format preset or a VAE may raise it. |
| audio_when_missingopt | COMBO | silence | When the file has no audio: silence outputs a silent track as long as the loaded frames (what the loader always did, so downstream nodes keep working); none outputs nothing. |
| handlesopt | COMBO | off | Handles = extra frames for a video model to settle on, added here and trimmed off again by Save Video (C2C) (it reads them from video_info). fit: pad the clip UP to the model's frame grid (handle_target = frames you want out, 0 = this clip's length). add: put handle_frames on, rounded onto the grid. Repeated edge frames, never black; the audio moves with them. |
| handle_framesopt | INT | 80β400 | add: frames to put on (side both: on EACH end). With a grid, 0 = just enough to land on it. |
| handle_targetopt | INT | 00β1000000 | fit: how many frames you want out after the trim. 0 = this clip's own length. |
| handle_sideopt | COMBO | head | Which end gets the handles. head is where a video model settles; both splits them. |
| handle_gridopt | COMBO | from format | The model's frame grid: 'from format' uses the format preset above (MiniMax H3 17n+5, Wan 4n+1, LTXV 8n+1 ...), so there is one grid, not two; or pick one here. |
| handle_custom_stepopt | INT | 41β1000 | custom grid: step (frames = step * n + plus). |
| handle_custom_plusopt | INT | 10β1000 | custom grid: plus. |
| colorspace_inopt | COMBO | off (as before) | The colour space this file was rendered in. auto: read it from the file (a .colorspace / .c2c.json sidecar, the EXR colorInteropID or chromaticities, the DPX or movie colour tags). An EXR with none is the OCIO config's scene_linear role (Nuke's working space); an untagged movie or image is display. Pick a space to override. off: no colour management (what the loader always did). |
| working_spaceopt | COMBO | sRGB display (keep Rec.709 / sRGB) | What the frames are converted to for the models. sRGB display: a Rec.709 / sRGB source stays as it is; anything else goes through the config's view (tone-mapped: ACES 2.0 SDR in the built-in config, what Nuke's viewer shows). Save Video (C2C) reverses exactly this. preserve source: no conversion. |
| name_prefixopt | STRING | Save Video (C2C) on 'auto (from Load)' names its file name_prefix + this clip's name + name_suffix, e.g. proj_ + shot010 + _comp; with the version folder the name carries the folder's version. Empty = nothing added. Typing a name on Save wins. | |
| name_suffixopt | STRING | Save Video (C2C) on 'auto (from Load)' names its file name_prefix + this clip's name + name_suffix, e.g. proj_ + shot010 + _comp; with the version folder the name carries the folder's version. Empty = nothing added. Typing a name on Save wins. | |
| extra_handlesopt | INT | 00β100 | More handles on top of fit / add, in whole steps of the model's frame grid (MiniMax H3 17, Wan 4, LTX 8 ...), so the clip stays on the grid; on handle_side (both splits them). The details line shows k x step = frames and the total. Save Video (C2C) trims them with the rest. |
| locationopt | COMBO | input folder | Where the source is. input folder: pick or upload it in 'video'. server path: type any path in 'path' (a clip, an image, a folder or a pattern like shot.####.exr) - what Load Video Path (C2C) did. |
| pathopt | STRING | server path mode: a clip, an image, an EXR, a folder of images, or a sequence pattern (shot.####.exr, shot.%04d.exr, shot.$F4.exr, shot.[1001-1100].exr). One frame of a sequence finds the whole sequence. | |
| source_modeopt | COMBO | auto | auto: a movie is a movie; a numbered image finds its sequence; a lone image is one frame. Force it when that guess is wrong: single image / single EXR loads exactly one file even when it has siblings (frame_range picks which frame of a sequence). |
| sequence_fpsopt | FLOAT | 0.0000β240 | Rate of an image sequence or still. 0 = the file's own rate (EXR FramesPerSecond, DPX frame rate), else 24. A still is one frame at this rate - never a longer clip. |
| frame_rangeopt | STRING | Source frame NUMBERS (Nuke style): 1001-1100, 1001-1100x2 (every 2nd), or one frame like 1050. Empty = all. For a movie, frame numbers count from 0. | |
| reverseopt | BOOLEAN | false | Play the selected frames last to first (the audio too). |
| frame_offsetopt | INT | 0-10000000β10000000 | Shifts the frame numbers frame_map reports for the output (where frame 0 lands on your timeline). The pixels do not move. |
| missing_framesopt | COMBO | error | A frame inside the sequence's range with no file. error (default) stops and names them; black, hold previous and nearest fill the gap and say so in info; skip (as before) drops it - every later frame then plays early. |
| edge_policyopt | COMBO | hold | frame_range beyond the first / last frame: hold repeats the edge frame, black adds black frames, loop wraps, bounce plays back and forth, error stops. |
| exr_layeropt | STRING | auto | The EXR layer the IMAGE shows: auto (the beauty / rgba), or a layer name from info - diffuse, depth, N, P, crypto00 ... Data layers (depth, normals, position, motion) load as raw values, never colour-converted. exr_passes carries every layer. |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE,LATENT | The frames (a LATENT when a VAE is connected). |
| frame_count | INT | Frames loaded. |
| audio | AUDIO | The audio of the loaded frames. |
| video_info | VHS_VIDEOINFO | Source and loaded numbers (VHS-compatible). |
| video | C2C_VIDEO | The lazy media handle: nothing decoded until a node reads a window. |
| mask | MASK | 1 - alpha, when the source has alpha. |
| info | STRING | MEDIA_INFO: what the source is and exactly what loaded (JSON). |
| frame_map | STRING | Output frame -> source frame and its frame NUMBER (h3.frame_ledger v1.1 JSON; -1 = a black frame). |
| exr_passes | C2C_EXR_PASSES | Every EXR layer, lazily (empty for other sources). |
| metadata | STRING | The source's header / container metadata (JSON). |