ComfyUI Node
AM Read Video
A ComfyUI node in AM VFX Tools with 18 inputs and 10 outputs.
AM Read Video
- image
- mask
- audio
- resolved_path
- info
- width
- height
- frame_rate
- frame_count
- video
◄file_path►
◄frame_modeall►
◄first_frame1►
◄last_frame-1►
◄beforehold►
◄afterhold►
◄input_colorspaceDisplay/Gamma 2.2 Rec.709 - Display►
◄raw_datafalse►
◄working_colorspaceDisplay/sRGB - Display►
◄reformat_modeoff►
◄scale1.00►
◄presetWidth/Height►
◄target_width1920►
◄target_height1080►
◄resize_typefit►
◄filtercubic►
◄output_dtypefp16►
◄show_previewtrue►
CategoryAM VFX Tools
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| file_path | STRING | Absolute path to the video container. Use the 📂 Browse button to populate from the native dialog. | |
| frame_mode | COMBO | all | Which frames to decode from the container. single = only `first_frame`. range = `first_frame`..`last_frame` inclusive (with `before`/`after` policy outside the container). all = every frame in the container. |
| first_frame | INT | 1-999999–999999 | Frame index in single mode; lower bound in range mode (1-based). Ignored in all mode. The 🔍 Detect Range button auto-fills this. |
| last_frame | INT | -1-1–999999 | Range upper bound (inclusive, 1-based). -1 = auto = container's frame count. The 🔍 Detect Range button reads it from the PyAV header. |
| before | COMBO | hold | Edge policy below the container's frames when `frame_mode=range` and the requested range starts before frame 1. hold = clamp to first; loop = wrap; bounce = ping-pong; black = synthesize black. |
| after | COMBO | hold | Edge policy above the container's frames when the requested range extends past the last frame. Mirrors `before`. |
| input_colorspace | COMBO | Display/Gamma 2.2 Rec.709 - Display | Source colorspace of the container (HD video typically Gamma 2.2 Rec.709 in studio dailies, Rec.1886 Rec.709 for broadcast). The OCIO transform converts from this to `working_colorspace`. Pick `raw` to skip — but most video containers don't carry a reliable colorspace tag, so an explicit value is usually correct. |
| raw_data | BOOLEAN | false | When On, skip the OCIO transform — pixels pass through unchanged. `input_colorspace` and `working_colorspace` are ignored. |
| working_colorspace | COMBO | Display/sRGB - Display | Target colorspace for the IMAGE output — the space downstream nodes will see. |
| reformat_mode | COMBO | off | Reformat mode. off = bypass, output matches input. scale = uniform scale by `scale` (other widgets ignored). to_box = resize/crop to a target W×H from `preset` or `target_width`/`target_height`. |
| scale | FLOAT | 1.000.01–16 | Uniform scale factor. Used when `reformat_mode=scale`; ignored otherwise. Output dimensions are round(input × scale). |
| preset | COMBO | Width/Height | Named output format. Used when `reformat_mode=to_box`. `Width/Height` = use the `target_width` / `target_height` widgets below. Any other entry overrides those widgets with the preset's resolution. |
| target_width | INT | 19201–16384 | Target output width in pixels. Used when `reformat_mode=to_box` AND `preset=Width/Height`; ignored when a named preset is selected. |
| target_height | INT | 10801–16384 | Target output height in pixels. Used when `reformat_mode=to_box` AND `preset=Width/Height`; ignored when a named preset is selected. |
| resize_type | COMBO | fit | How input maps into the target box. Used when `reformat_mode=to_box`. width/height = scale uniformly to match that edge. fit = scale to fit inside the box (letterbox; black where the box exceeds the scaled image). fill = scale to cover the box (crops the overflow). distort = scale W and H independently to exactly match the box (changes aspect). none = no scale; place input centered in the box (crop if larger, pad if smaller). Cropped-away/padded regions are TRANSPARENT — RGB sources are promoted to RGBA with alpha=0 in the padded area so downstream compositing is clean. |
| filter | COMBO | cubic | Pixel filter for resampling. impulse = nearest-neighbor (mask passes, exact pixel preservation). linear = bilinear (cheap, smooth). cubic = bicubic (default; the safe Nuke-equivalent). Lanczos4 = sharpest; for high-quality stills / final delivery. area = best for downscaling — anti-aliased mean pooling, softer but artifact-free. |
| output_dtype | COMBO | fp16 | Output tensor dtype. fp32 = ComfyUI default (4 bytes/sample). fp16 = half memory + half VRAM (2 bytes/sample). EXR-native precision; fits the [0,1] LDR + scene-linear range with headroom up to ~65504. Some downstream nodes assume fp32 — flip back to fp32 if you hit dtype errors. |
| show_preview | BOOLEAN | true | Show a thumbnail of the first decoded frame on the node. |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Decoded frames as IMAGE (N×H×W×3 float in [0,1]). RGB only — alpha is split out to the `mask` socket. |
| mask | MASK | Alpha channel as MASK (N×H×W float in [0,1]). MASK CONVENTION (stock ComfyUI): mask = 1 - alpha white (1.0) = 'area to inpaint' (source was transparent) black (0.0) = 'keep' (source was opaque) empty mask = all zeros (source has no alpha = fully visible) This is the SD-inpainting convention every stock ComfyUI mask-using node expects (LoadImage, MaskComposite, SetLatentNoiseMask, ImpactPack mask pipeline, etc.). Drop-in compatible with all of them. If you want NUKE-STYLE natural alpha (mask = alpha, where 1.0 = opaque), wire a MaskInvert node between this socket and your downstream consumer. Populated when the source carries alpha: * Image: EXR / PNG / TIFF with α channel * Video: ProRes 4444 / 4444 XQ, QuickTime RLE, FFV1 (yuva*) Otherwise emits the empty mask (zeros = fully opaque source). |
| audio | AUDIO | Audio track from the container, or a silent stub if absent. |
| resolved_path | STRING | Resolved on-disk container path. |
| info | STRING | Human-readable summary: dimensions, codec, pixel format, fps, frame count. |
| width | INT | Frame width in pixels. |
| height | INT | Frame height in pixels. |
| frame_rate | FLOAT | Container's native frame rate (read from the PyAV header). |
| frame_count | INT | Number of frames decoded into the IMAGE batch. |
| video | VIDEO | `VideoFromFile` referencing the source on disk. Wiring ONLY this (not `image`) skips the PyAV decode — peak RAM stays at file-handle level. ⚠️ Raw passthrough: source colorspace, source resolution, source codec. OCIO/Reformat apply to `image` only. Both sockets can be wired in the same graph for parallel branches. |