ComfyUI  >  Nodes  >  ComfyUI Video Player >  LoadFrame

ComfyUI Node: LoadFrame

Class Name

LoadFrame

Category
VideoPlayer
Author
BetaDoggo (Account age: 827 days)
Extension
ComfyUI Video Player
Latest Updated
7/23/2024
Github Stars
0.0K

How to Install ComfyUI Video Player

Install this extension via the ComfyUI Manager by searching for  ComfyUI Video Player
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Video Player 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

LoadFrame Description

Reads and loads specific frames from text files for AI artists, simplifying frame-based text data processing.

LoadFrame:

The LoadFrame node is designed to read and load specific frames from a sequence of text files. This node is particularly useful for AI artists who need to process or analyze text data frame by frame, such as in video subtitles or frame-specific metadata. By specifying the frame number and optional frame rate, you can control the exact frame to be loaded and the speed at which frames are processed. This node simplifies the task of accessing and utilizing frame-based text data, making it easier to integrate into your creative workflows.

LoadFrame Input Parameters:

frame

The frame parameter specifies the exact frame number you want to load from the sequence of text files. It is an integer value with a default of 1, a minimum of 1, and a maximum of 100000. This parameter is crucial as it determines which specific frame's text content will be read and returned by the node. For example, setting frame to 5 will load the text content from the file named 5.txt.

frameRate

The frameRate parameter controls the rate at which frames are processed. It is an integer value with a default of 0, a minimum of 0, and a maximum of 144. When set to a non-zero value, this parameter introduces a delay between frame loads, simulating the effect of frame rate in video playback. For instance, setting frameRate to 24 will introduce a delay of approximately 1/24th of a second between each frame load, making it useful for synchronizing with video playback speeds.

path

The path parameter specifies the directory path where the text files are located. It is a string value and can be set to the desired directory containing your frame-specific text files. This parameter is optional and does not have a default value. If not provided, the node will look for the text files in the current working directory. This parameter allows you to organize and access your text files from different locations easily.

LoadFrame Output Parameters:

STRING

The output of the LoadFrame node is a string containing the text content of the specified frame. This output is essential as it provides the actual data read from the text file, which can then be used for further processing, analysis, or integration into other parts of your project. For example, if the text file 5.txt contains the string "Hello, World!", the output will be "Hello, World!".

LoadFrame Usage Tips:

  • Ensure that the path parameter is correctly set to the directory containing your text files to avoid file not found errors.
  • Use the frameRate parameter to control the speed of frame processing, especially if you need to synchronize with video playback or other time-sensitive tasks.
  • Verify that the frame numbers in your text files are sequential and correctly named to match the frame parameter values you intend to use.

LoadFrame Common Errors and Solutions:

Error reading file: [error_message]

  • Explanation: This error occurs when the node is unable to read the specified text file. The [error_message] will provide additional details about the issue, such as file not found or permission denied.
  • Solution: Ensure that the path parameter is correctly set and that the specified frame file exists in the directory. Check the file permissions to make sure the node has read access to the file.

Error reading file: invalid frame number

  • Explanation: This error occurs when the specified frame parameter is out of the valid range or does not correspond to an existing file.
  • Solution: Verify that the frame parameter is within the valid range (1 to 100000) and that the corresponding text file exists in the specified directory. Ensure that the frame numbers are correctly named and sequential.

LoadFrame Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Video Player
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.