ComfyUI Node: VideoFrameSelector

Class Name

VideoFrameSelector

Category
Eden 🌱
Author
aiXander (Account age: 302days)
Extension
Various custom nodes by Eden.art
Latest Updated
2024-07-23
Github Stars
0.04K

How to Install Various custom nodes by Eden.art

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

VideoFrameSelector Description

Efficiently select frames for time-lapse or speed-up videos with minimal distortion and smooth playback.

VideoFrameSelector:

The VideoFrameSelector node is designed to help you efficiently select a subset of frames from a source video to achieve a desired playback speed and frame rate. This node is particularly useful for creating time-lapse videos or speeding up video playback while maintaining visual continuity. By intelligently sampling frames based on specified parameters, it ensures that the output video has minimal temporal distortion, providing a smooth and visually appealing result. The node calculates the optimal frame indices to sample, adjusts the frame rate, and applies a frame multiplier to achieve the target video speedup factor, making it a powerful tool for video editing and manipulation.

VideoFrameSelector Input Parameters:

input_frames

This parameter represents the collection of frames from the source video that you want to process. It is essential as it provides the raw data from which the node will select the optimal frames.

video_info

This parameter is a dictionary containing metadata about the source video, such as the source frame rate (source_fps) and the total number of frames (loaded_frame_count). This information is crucial for the node to compute the appropriate frame indices and sampling rates.

output_fps

This parameter specifies the desired frame rate for the output video. It determines how many frames per second the final video will play. The default value is 24.0, with a minimum of 1.0 and a maximum of 60.0. Adjusting this value affects the smoothness and speed of the output video.

target_video_speedup_factor

This parameter defines how much faster the output video should play compared to the source video. A value of 1.0 means no speedup, while values greater than 1.0 will speed up the video. The default value is 1.0, with a minimum of 0.1 and a maximum of 10.0. This parameter is key to achieving the desired visual speedup effect.

min_source_sampling_fps

This parameter sets the minimum frame rate at which the source video can be sampled. It ensures that the node does not sample frames too sparsely, which could lead to visual artifacts. The default value is 8, with a minimum of 1 and a maximum of 24.

max_source_sampling_fps

This parameter sets the maximum frame rate at which the source video can be sampled. It prevents the node from sampling frames too densely, which could be unnecessary and computationally expensive. The default value is 12, with a minimum of 1 and a maximum of 24.

frame_load_cap

This parameter limits the number of frames that can be loaded and processed. If set to a value greater than 0, it caps the number of selected frames to this limit. This is useful for managing memory usage and processing time. The default value is 0, with a minimum of 1 and a maximum of 1000.

VideoFrameSelector Output Parameters:

Selected_frames

This output parameter contains the subset of frames selected from the input frames based on the specified parameters. These frames are optimized for the desired playback speed and frame rate, ensuring minimal visual distortion.

multiplier

This output parameter indicates the frame multiplier used to achieve the target video speedup factor. It shows how many times each selected frame is duplicated to reach the required number of output frames.

frame_rate

This output parameter provides the actual frame rate of the output video. It reflects any adjustments made to match the desired playback speed and ensure smooth visual continuity.

VideoFrameSelector Usage Tips:

  • To create a smooth time-lapse video, set the target_video_speedup_factor to a high value and adjust the output_fps to maintain visual fluidity.
  • Use the frame_load_cap parameter to manage memory usage when working with very large videos, ensuring that the node does not overload your system.
  • Experiment with different values for min_source_sampling_fps and max_source_sampling_fps to find the optimal balance between visual quality and processing efficiency.

VideoFrameSelector Common Errors and Solutions:

"Invalid frame rate specified"

  • Explanation: This error occurs when the output_fps parameter is set to a value outside the allowed range (1.0 to 60.0).
  • Solution: Ensure that the output_fps value is within the specified range and try again.

"Frame load cap exceeded"

  • Explanation: This error occurs when the number of selected frames exceeds the frame_load_cap parameter.
  • Solution: Increase the frame_load_cap value or reduce the number of input frames to match the cap.

"Invalid video speedup factor"

  • Explanation: This error occurs when the target_video_speedup_factor is set to a value outside the allowed range (0.1 to 10.0).
  • Solution: Ensure that the target_video_speedup_factor is within the specified range and try again.

VideoFrameSelector Related Nodes

Go back to the extension to check out more related nodes.
Various custom nodes by Eden.art
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.