Visit ComfyUI Online for ready-to-use ComfyUI environment
Capture real-time webcam video frames for AI art projects, with customizable settings for frame rate and image processing.
The WebcamNode is designed to capture real-time video frames from your webcam, providing a seamless way to integrate live video feeds into your AI art projects. This node allows you to select a specific webcam, set the desired frame rate, and control the duration of the capture session. It processes the captured frames by resizing them to specified dimensions, converting them to RGB format, and normalizing the pixel values. The primary benefit of this node is its ability to provide a continuous stream of images that can be used for various creative and analytical purposes, such as generating dynamic art pieces or feeding live data into machine learning models.
This parameter allows you to choose which webcam to use for capturing video frames. The value is an integer representing the webcam ID, with a minimum value of 0 and a maximum value of 10. The default value is 0. This parameter is crucial for systems with multiple webcams, enabling you to specify the exact device you want to use.
This parameter sets the frame rate for capturing video frames, measured in frames per second (FPS). The value is an integer with a minimum of 1 and a maximum of 60, and the default value is 12. Adjusting the frame rate impacts the smoothness of the video capture; higher values result in smoother video but require more processing power.
This parameter allows you to control the state of the video stream. It accepts two options: "start" and "stop". This parameter is essential for managing the capture session, enabling you to start or stop the video feed as needed.
This parameter specifies the duration of the video capture session in seconds. The value is an integer with a minimum of 1 and a maximum of 120, and the default value is 10. This parameter determines how long the webcam will capture video frames, allowing you to control the length of your video feed.
This parameter sets the height of the captured video frames in pixels. The value is an integer with a minimum of 0 and a maximum defined by MAX_RESOLUTION
, and the default value is 0. This parameter is used to resize the captured frames to the desired height, ensuring they fit your project's requirements.
This parameter sets the width of the captured video frames in pixels. The value is an integer with a minimum of 0 and a maximum defined by MAX_RESOLUTION
, and the default value is 0. This parameter is used to resize the captured frames to the desired width, ensuring they fit your project's requirements.
The output parameter is a tensor containing the captured video frames. The frames are resized, converted to RGB format, and normalized. The tensor is shaped as (N, H, W, C), where N is the number of frames, H is the height, W is the width, and C is the number of color channels (3 for RGB). This output is essential for further processing or analysis in your AI art projects, providing a structured and normalized set of image data.
framerate
parameter to balance between video smoothness and processing power, especially if you are working on a resource-constrained system.duration
parameter to control the length of your capture session, making sure it aligns with your project's requirements.height
and width
parameters to match the resolution needed for your specific use case, ensuring the captured frames are appropriately sized.<error_message>
<frame_count>
/<total_frames>
select_webcam
parameter is set to the correct device ID. Ensure the duration
and framerate
parameters are set appropriately to allow enough time for frame capture.© Copyright 2024 RunComfy. All Rights Reserved.