Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > comfy_scenes_json_node > Video Last Frame

ComfyUI Node: Video Last Frame

Class Name

VideoLastFrame

Category
image
Author
stepan-bogatorjov (Account age: 0days)
Extension
comfy_scenes_json_node
Latest Updated
2026-10-10
Github Stars
0.0K

How to Install comfy_scenes_json_node

Install this extension via the ComfyUI Manager by searching for comfy_scenes_json_node
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfy_scenes_json_node in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Video Last Frame Description

Extracts the final decoded frame from the highest-numbered video matching a scene index.

Video Last Frame:

VideoLastFrame finds a scene video and extracts its final decoded frame for use as an image in your ComfyUI workflow. It selects the matching video with the highest numbered counter, so you can work with the latest numbered version of a scene without choosing a file manually. It uses FFmpeg to decode through the end of the video, leaving the last frame rather than the first frame near the end.

Video Last Frame Input Parameters:

index

The scene number to look for in video filenames. For example, an index of 2 matches files named 2_<counter>.mp4; if several match, the node chooses the one with the highest numeric counter. This is a required integer with a default of 1, a minimum of 0, and a maximum of 999999. Choose the number used at the start of your scene video’s filename.

scenes_folder

The folder containing your scene videos, specified relative to the ComfyUI output directory. Leave it empty to search the output directory itself, or enter a subfolder such as scenes to search there. This optional string defaults to "" (empty); the source specifies no minimum or maximum length. If it points to the wrong folder, the node will not find a matching video.

Video Last Frame Output Parameters:

image

The final decoded frame of the selected video as a standard ComfyUI IMAGE. It is returned as a single RGB image, ready to connect to downstream image-processing nodes. Its dimensions come from the decoded video frame.

video_path

The filesystem path to the video selected for extraction, returned as a STRING. Use it to identify which file supplied the frame, especially when several numbered versions of a scene exist.

Video Last Frame Usage Tips:

  • Name scene videos in the form <index>_<counter>.mp4 and place them in the folder you select. For example, with index set to 2, 2_3.mp4 is chosen over 2_1.mp4.
  • Leave scenes_folder empty when videos are directly in the ComfyUI output directory. If they are in a subfolder, enter its path relative to that directory.
  • Check video_path when the extracted image is not from the version you expected; the highest numeric counter wins, regardless of which file was created most recently.
  • Make sure FFmpeg is available before running the node. It checks for a system FFmpeg installation first, then tries imageio-ffmpeg.

Video Last Frame Common Errors and Solutions:

[ Video Last Frame] No video matching '<index>_<n>.mp4' in <scenes_dir>

  • Explanation: The selected folder contains no video matching the requested scene number and filename pattern.
  • Solution: Check index and scenes_folder, then confirm that a matching .mp4 file is in that folder and has a numeric counter, such as 2_1.mp4.

ffmpeg not found. Install it system-wide or run: pip install imageio-ffmpeg

  • Explanation: The node could not find an FFmpeg executable, which it needs to extract the frame.
  • Solution: Install FFmpeg system-wide or install imageio-ffmpeg in the Python environment running ComfyUI, then retry.

[ Video Last Frame] ffmpeg failed extracting last frame of <video_path> (exit <code>):

  • Explanation: FFmpeg reported an error, or the expected extracted frame file was not created. The message includes the end of FFmpeg’s diagnostic output.
  • Solution: Read that diagnostic text for the specific cause. Confirm that the selected video opens and plays, and that ComfyUI can write to its output directory; then retry or replace the video if it is damaged.

Video Last Frame Related Nodes

Go back to the extension to check out more related nodes.
comfy_scenes_json_node
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Video Last Frame