ComfyUI > Nodes > ComfyUI_Lam > 视频加载

ComfyUI Node: 视频加载

Class Name

LamLoadVideo

Category
lam
Author
Lam Yan (Account age: 3065days)
Extension
ComfyUI_Lam
Latest Updated
2025-03-06
Github Stars
0.02K

How to Install ComfyUI_Lam

Install this extension via the ComfyUI Manager by searching for ComfyUI_Lam
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_Lam 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

视频加载 Description

Facilitates video loading, frame extraction, and audio extraction in ComfyUI for AI artists.

视频加载:

The LamLoadVideo node is designed to facilitate the loading and processing of video files within the ComfyUI environment. This node allows you to extract specific frames from a video, starting from a designated index, and optionally extract audio from the video file. It is particularly useful for AI artists who need to work with video data, as it simplifies the process of accessing and manipulating video content. By leveraging this node, you can efficiently handle video files, extract frames for further processing, and save audio content separately, all within a streamlined workflow. The node's capabilities make it an essential tool for projects that involve video analysis, editing, or transformation, providing a user-friendly interface to manage video data without requiring extensive technical knowledge.

视频加载 Input Parameters:

videoPath

The videoPath parameter specifies the file path to the video you wish to load. It is a required string input, and you must ensure that the path is correct and the file exists. This parameter is crucial as it determines which video file will be processed by the node.

sample_start_idx

The sample_start_idx parameter indicates the starting index of the frame from which you want to begin sampling. It is an integer value with a default of 1, and it must be between 1 and 10,000. This parameter allows you to skip a certain number of initial frames, which can be useful if you are only interested in a specific portion of the video.

n_sample_frames

The n_sample_frames parameter defines the number of frames to sample from the video, starting from the sample_start_idx. It is an integer with a default value of 0, which means all frames from the start index will be sampled. The range is from 0 to 100,000. This parameter helps control the amount of data processed, which can be important for performance and resource management.

extract_audio

The extract_audio parameter is a boolean option that determines whether the audio from the video should be extracted. It can be set to either True or False. When set to True, the node will extract and save the audio track from the video file, which can be useful for projects that require both visual and auditory data.

filename_prefix

The filename_prefix parameter is a string that specifies the prefix for the output files, including the extracted audio file. The default value is "comfyUI". This parameter allows you to organize and identify output files easily, especially when processing multiple videos or generating multiple outputs.

视频加载 Output Parameters:

图片

The 图片 output provides the sampled frames from the video as a tensor. This output is essential for any further image processing tasks you may want to perform on the video frames, such as applying filters, transformations, or feeding them into a machine learning model.

帧率

The 帧率 output returns the frames per second (FPS) of the video. This integer value is important for understanding the temporal resolution of the video and can be used to synchronize video and audio or to adjust playback speed in subsequent processing.

总帧数

The 总帧数 output gives the total number of frames in the video. This information is useful for planning how many frames to sample and for understanding the overall length of the video in terms of frames.

音频文件名

The 音频文件名 output provides the file name of the extracted audio, if extract_audio is set to True. This string output is important for locating and using the audio file in further audio processing or synchronization tasks.

视频加载 Usage Tips:

  • Ensure the videoPath is correct and the file exists to avoid errors during processing.
  • Use sample_start_idx and n_sample_frames to control the portion of the video you want to process, which can help manage resources and focus on relevant content.
  • Set extract_audio to True if you need the audio track for your project, and use filename_prefix to organize output files effectively.
  • Check the 帧率 and 总帧数 outputs to understand the video's temporal characteristics and plan your processing accordingly.

视频加载 Common Errors and Solutions:

视频文件不存在

  • Explanation: This error occurs when the specified video file does not exist at the given videoPath.
  • Solution: Verify that the videoPath is correct and that the file exists in the specified location.

open<videoPath>error!

  • Explanation: This error indicates that the video file could not be opened, possibly due to an incorrect path or unsupported file format.
  • Solution: Ensure the file path is correct and the video format is supported by the node. Check for any file access permissions that might be preventing the file from being opened.

视频加载 Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_Lam
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 Playground, enabling artists to harness the latest AI tools to create incredible art.