ComfyUI > Nodes > ZZX Nodes > VideoFormatConverter

ComfyUI Node: VideoFormatConverter

Class Name

VideoFormatConverter

Category
ZZX/Video
Author
ZZXYWQ (Account age: 1303days)
Extension
ZZX Nodes
Latest Updated
2024-07-19
Github Stars
0.01K

How to Install ZZX Nodes

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

VideoFormatConverter Description

Facilitates video format conversion with codec compatibility, quality adjustments, OpenCL acceleration, and audio codec options.

VideoFormatConverter:

The VideoFormatConverter node is designed to facilitate the conversion of video files from one format to another, ensuring compatibility with various codecs and output specifications. This node is particularly useful for AI artists who need to process and convert video files for different platforms or purposes without delving into the technical complexities of video encoding. By leveraging this node, you can easily adjust video quality, frame rate, resolution, and other parameters to meet your specific needs. The node also supports OpenCL acceleration for faster processing and provides options for audio codec selection and bitrate adjustment, making it a versatile tool for video format conversion.

VideoFormatConverter Input Parameters:

video_path

This parameter specifies the path to the input video file that you want to convert. It is a string value and should be a valid file path. If not provided, a file dialog will prompt you to select the input file.

output_enabled

This parameter determines whether the output file should be generated. It accepts two values: "true" or "false". If set to "false", the node will not produce an output file. The default value is "true".

output_filename

This parameter specifies the name of the output video file. It is a string value and should include the desired file name without the extension, as the correct extension will be appended based on the selected video format.

video_format

This parameter defines the format of the output video file. It accepts the following options: "avi", "mov", "mkv", "mp4". The default value is "mp4".

codec

This parameter specifies the codec to be used for encoding the output video. It accepts the following options: "av1", "h264", "h264(NVENC)", "hevc", "hevc(NVENC)". The default value is "h264".

video_quality

This parameter controls the quality of the output video. It is an integer value ranging from 5 to 40, with 5 being the highest quality and 40 being the lowest. The default value is 10.

frame_rate

This parameter sets the frame rate of the output video. It accepts the following options: "8", "15", "24", "25", "30", "50", "59", "60", "120". The default value is "25".

opencl_acceleration

This parameter enables or disables OpenCL acceleration for faster video processing. It accepts two values: "enable" or "disable". The default value is "disable".

video_width

This parameter specifies the width of the output video in pixels. It accepts a range of values from "272" to "2560". The default value is "1280".

video_height

This parameter specifies the height of the output video in pixels. It accepts a range of values from "272" to "2560". The default value is "720".

scaling_filter

This parameter determines the scaling filter to be used when resizing the video. It accepts the following options: "bilinear", "bicubic", "neighbor", "area", "bicublin", "lanczos". The default value is "bicubic".

processing_method

This parameter specifies the method to be used for processing the video. It accepts two values: "fill" or "crop". The default value is "fill".

audio_codec

This parameter defines the codec to be used for encoding the audio in the output video. It accepts the following options: "copy", "mp3", "aac". The default value is "aac".

bit_rate

This parameter sets the bitrate for the audio in the output video. It accepts the following options: "96", "128", "192". The default value is "192".

audio_channels

This parameter specifies the number of audio channels in the output video. It accepts the following options: "original", "mono", "stereo". The default value is "stereo".

sample_rate

This parameter sets the sample rate for the audio in the output video. It is an integer value representing the sample rate in Hz.

output_path

This parameter specifies the path where the output video file will be saved. It is a string value and should be a valid directory path. If not provided, a file dialog will prompt you to select the output directory.

VideoFormatConverter Output Parameters:

output_filename

This parameter returns the name of the output video file, including the correct file extension based on the selected video format. It is a string value.

video_info

This parameter provides information about the processed video, such as resolution, frame rate, and bitrate. It is a structured value containing various details about the output video.

VideoFormatConverter Usage Tips:

  • Ensure that the input video file path is correct and accessible to avoid errors during processing.
  • Use the "output_enabled" parameter to disable output generation if you only need to check the input video properties.
  • Adjust the "video_quality" parameter to balance between video quality and file size. Lower values result in higher quality but larger file sizes.
  • Enable "opencl_acceleration" for faster processing if your system supports OpenCL.
  • Choose the appropriate "scaling_filter" based on your quality requirements. "lanczos" provides high-quality scaling but may be slower.

VideoFormatConverter Common Errors and Solutions:

"选择的格式不正确Incorrect format selected"

  • Explanation: The selected video format and codec combination is not supported.
  • Solution: Refer to the supported format and codec combinations and select a valid pair.

"Output disabled"

  • Explanation: The "output_enabled" parameter is set to "false", so no output file is generated.
  • Solution: Set the "output_enabled" parameter to "true" to enable output file generation.

"video_path could not be loaded with cv."

  • Explanation: The input video file could not be opened or read.
  • Solution: Ensure that the video file path is correct and the file is accessible.

"Stream URL is required"

  • Explanation: The stream URL is missing when attempting to process a streaming video.
  • Solution: Provide a valid stream URL to proceed with the video processing.

"File dialog prompts not appearing"

  • Explanation: The file dialog windows for selecting input or output files are not appearing.
  • Solution: Ensure that your environment supports GUI operations and that the necessary libraries (e.g., Tkinter) are installed.

VideoFormatConverter Related Nodes

Go back to the extension to check out more related nodes.
ZZX Nodes
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.