Load Last Video (FFMPEGA)
Stop digging through output folders — just load the last video you made
- images
- audio
- mask
- images
- selected_frames
- audio
- video_path
- image_paths
- mask
Every ComfyUI user has a version of this workflow: run something, save, then spend twenty seconds in a file browser trying to remember which of the twelve FFMPEGA_00042.mp4 files you actually just made. Load Last Video (FFMPEGA) kills that whole ritual. It scans ComfyUI's output and temp directories, finds the newest video by modification time, decodes its frames, extracts the audio, and shows you an inline preview that loads immediately - no queueing, no file hunting.
It's the sibling of Load Last Image, and the two were merged into this pack from the author's separate ComfyUI-LoadLast project. The obvious use is iteration: edit → save → re-load the result → edit again, as a loop that never requires typing a filename. But it's not just a convenience node - it also does frame selection.
The inputs that matter
refresh_mode-auto(reload when the latest video changes - the one you want for iteration) ormanual(only reloads on input change).frame_select_mode- how to pick frames out of the video:manual(you click in the preview), or auto strategies likeuniform_5,uniform_10,first_last,every_2nd,every_5th, andtimestamps(driven byauto_timestamps, e.g.0.5,1.0,2.5). Handy for pulling representative stills without loading everything.pause_for_selection- inmanualselection mode, blocks execution until you actually select frames, then re-queue.max_frames- cap on frames decoded into the IMAGE tensor (default 128, 0 = all). Frames are evenly sampled to keep temporal coverage, so it's the memory guard for long videos.source_folder/filename_filter- point it at a custom folder or filter by prefix when "newest in output" isn't the right answer.images/audio/video_path- overrides: connect any of these and they beat auto-discovery, which is useful when you already have the file in hand but want this node's frame-selection outputs anyway.
Outputs: images (decoded frames), selected_frames (at the chosen timestamps), audio, video_path, image_paths (comma-separated PNG paths of the selected frames), frame_count, fps, duration.
Installing it
It ships in ComfyUI-FFMPEGA: ComfyUI Manager → search ComfyUI-FFMPEGA → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/AEmotionStudio/ComfyUI-FFMPEGA.git
cd ComfyUI-FFMPEGA
pip install -r requirements.txt
Restart ComfyUI; ffmpeg on PATH is the pack's hard dependency.
Where people get burned
The classic trap is relying on it in a workflow where "newest" is ambiguous - if another node (or another run) writes to the same output folder between your queue and this node's execution, you load the wrong video and silently process garbage. Use filename_filter to pin it to your own prefix, or set source_folder to somewhere only you write. Also note the default max_frames of 128 with even sampling: that's deliberate to protect memory, but it means images is not "all the frames" on a long clip - if you need the full frame sequence, raise the cap or 0 it and accept the VRAM cost.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| refresh_mode | COMBO | auto | auto: reload when latest video changes. manual: only on input change. |
| frame_select_mode | COMBO | manual | How to select frames. 'manual' = user clicks in preview. 'last' = the final frame only, for continuing a scene. Other modes auto-select frames based on the chosen strategy. Auto-selected frames are merged with any manual clicks. |
| auto_timestamps | STRING | Comma-separated timestamps for 'timestamps' mode (e.g., '0.5,1.0,2.5'). | |
| pause_for_selection | BOOLEAN | false | When ON and frame_select_mode is 'manual', blocks execution if no frames are selected. Select frames, then re-queue. |
| source_folderopt | STRING | Custom folder to scan. Empty = default output/temp directories. | |
| filename_filteropt | STRING | Only load files starting with this prefix. | |
| max_framesopt | INT | 1280–2147483647 | Max frames to decode into the IMAGE tensor (0 = all). Caps memory usage for long videos. Frames are evenly sampled to preserve temporal coverage. |
| imagesopt | IMAGE | Override: video frames as IMAGE tensor. Overrides auto-discovery. | |
| audioopt | AUDIO | Override: provide audio directly. Overrides audio extracted from video. | |
| video_pathopt | STRING | Override: path to a video file. Overrides auto-discovery. | |
| maskopt | MASK | Optional upstream MASK pass-through. Forwarded as-is to the mask output. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| selected_frames | IMAGE | — |
| audio | AUDIO | — |
| video_path | STRING | — |
| image_paths | STRING | — |
| mask | MASK | — |