From 4db20c37d2ada67e2ae192ff003c6a354fb5fdac Mon Sep 17 00:00:00 2001 From: cavinHuang Date: Tue, 11 Jun 2024 18:11:40 +0800 Subject: [PATCH] feat: add video helper docs --- docs/VHS_LoadAudioUpload.md | 77 ++++++++++++ docs/VHS_LoadImagesPath.md | 90 ++++++++++++++ docs/VHS_LoadVideoPath.md | 115 ++++++++++++++++++ needAddFile.json | 5 - .../VHS_LoadAudioUpload.md | 77 ++++++++++++ .../VHS_LoadImagesPath.md | 90 ++++++++++++++ .../VHS_LoadVideoPath.md | 115 ++++++++++++++++++ 7 files changed, 564 insertions(+), 5 deletions(-) create mode 100644 docs/VHS_LoadAudioUpload.md create mode 100644 docs/VHS_LoadImagesPath.md create mode 100644 docs/VHS_LoadVideoPath.md create mode 100644 nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadAudioUpload.md create mode 100644 nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadImagesPath.md create mode 100644 nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadVideoPath.md diff --git a/docs/VHS_LoadAudioUpload.md b/docs/VHS_LoadAudioUpload.md new file mode 100644 index 0000000..08ed9be --- /dev/null +++ b/docs/VHS_LoadAudioUpload.md @@ -0,0 +1,77 @@ +# Load Audio (Upload)🎥🅥🅗🅢 +## Documentation +- Class name: VHS_LoadAudioUpload +- Category: Video Helper Suite 🎥🅥🅗🅢 +- Output node: False +- Repo Ref: https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git + +VHS_LoadAudioUpload节点用于在视频助手套件中上传和处理音频文件。它允许用户上传音频文件,并指定音频处理的开始时间和持续时间。此节点对于需要音频操作或分析的应用至关重要,为套件中的进一步音频相关操作提供基础。 + +## Input types +### Required +- audio + - 指定要上传和处理的音频文件。此参数对于确定将进行处理的音频内容至关重要。 + - Comfy dtype: COMBO[STRING] + - Python dtype: str +- start_time + - 定义应处理音频文件的起始点(以秒为单位)。此参数允许选择性地处理音频内容,增强灵活性。 + - Comfy dtype: FLOAT + - Python dtype: float +- duration + - 指定应从开始时间处理音频的持续时间(以秒为单位)。这允许精确控制要分析或操作的音频文件片段。 + - Comfy dtype: FLOAT + - Python dtype: float + +## Output types +- audio + - Comfy dtype: VHS_AUDIO + - 表示处理后的音频数据,准备在套件中的后续操作中使用。 + - Python dtype: torch.Tensor + +## Usage tips +- Infra type: CPU +- Common nodes: unknown + +## Source code +```python +class LoadAudioUpload: + @classmethod + def INPUT_TYPES(s): + input_dir = folder_paths.get_input_directory() + files = [] + for f in os.listdir(input_dir): + if os.path.isfile(os.path.join(input_dir, f)): + file_parts = f.split('.') + if len(file_parts) > 1 and (file_parts[-1] in audio_extensions): + files.append(f) + return {"required": { + "audio": (sorted(files),), + "start_time": ("FLOAT" , {"default": 0, "min": 0, "max": 10000000, "step": 0.01}), + "duration": ("FLOAT" , {"default": 0, "min": 0, "max": 10000000, "step": 0.01}), + }, + } + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + RETURN_TYPES = ("VHS_AUDIO", ) + RETURN_NAMES = ("audio",) + FUNCTION = "load_audio" + + def load_audio(self, start_time, duration, **kwargs): + audio_file = folder_paths.get_annotated_filepath(kwargs['audio'].strip("\"")) + if audio_file is None or validate_path(audio_file) != True: + raise Exception("audio_file is not a valid path: " + audio_file) + + audio = get_audio(audio_file, start_time, duration) + + return (lambda : audio,) + + @classmethod + def IS_CHANGED(s, audio, start_time, duration): + audio_file = folder_paths.get_annotated_filepath(audio.strip("\"")) + return hash_path(audio_file) + + @classmethod + def VALIDATE_INPUTS(s, audio, **kwargs): + audio_file = folder_paths.get_annotated_filepath(audio.strip("\"")) + return validate_path(audio_file, allow_none=True) \ No newline at end of file diff --git a/docs/VHS_LoadImagesPath.md b/docs/VHS_LoadImagesPath.md new file mode 100644 index 0000000..dc1945b --- /dev/null +++ b/docs/VHS_LoadImagesPath.md @@ -0,0 +1,90 @@ +# Load Images (Path) 🎥🅥🅗🅢 +## Documentation +- Class name: VHS_LoadImagesPath +- Category: Video Helper Suite 🎥🅥🅗🅢 +- Output node: False +- Repo Ref: https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git + +VHS_LoadImagesPath节点用于将图像从指定目录路径加载到视频编辑或处理工作流程中。它支持过滤和选择选项,以自定义加载的图像集,从而在视频助手套件中高效管理和处理图像批次。 + +## Input types +### Required +- directory + - 指定要从中加载图像的目录。此参数对于确定要处理的图像来源至关重要。 + - Comfy dtype: STRING + - Python dtype: str + +### Optional +- image_load_cap + - 限制从目录加载的图像数量,允许控制处理批次的大小。 + - Comfy dtype: INT + - Python dtype: int +- skip_first_images + - 跳过目录开头指定数量的图像,允许根据顺序选择性加载图像。 + - Comfy dtype: INT + - Python dtype: int +- select_every_nth + - 加载目录中的每第n张图像,提供了一种稀释要处理的图像集的方法。 + - Comfy dtype: INT + - Python dtype: int + +## Output types +- image + - Comfy dtype: IMAGE + - 加载的图像,准备在工作流程中进一步处理或操作。 + - Python dtype: torch.Tensor +- mask + - Comfy dtype: MASK + - 为加载的图像生成的蒙版,对于需要分割或选择性编辑的图像编辑任务很有用。 + - Python dtype: torch.Tensor +- int + - Comfy dtype: INT + - 加载的图像总数,在应用加载参数后提供批次大小的见解。 + - Python dtype: int + +## Usage tips +- Infra type: CPU +- Common nodes: + - [ImpactImageBatchToImageList](../../ComfyUI-Impact-Pack/Nodes/ImpactImageBatchToImageList.md) + - [PreviewImage](../../Comfy/Nodes/PreviewImage.md) + - [IPAdapterEncoder](../../ComfyUI_IPAdapter_plus/Nodes/IPAdapterEncoder.md) + - LinearBatchCreativeInterpolation + +## Source code +```python +class LoadImagesFromDirectoryPath: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "directory": ("STRING", {"default": "X://path/to/images", "vhs_path_extensions": []}), + }, + "optional": { + "image_load_cap": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}), + "skip_first_images": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}), + "select_every_nth": ("INT", {"default": 1, "min": 1, "max": BIGMAX, "step": 1}), + } + } + + RETURN_TYPES = ("IMAGE", "MASK", "INT") + FUNCTION = "load_images" + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + def load_images(self, directory: str, **kwargs): + if directory is None or validate_load_images(directory) != True: + raise Exception("directory is not valid: " + directory) + + return load_images(directory, **kwargs) + + @classmethod + def IS_CHANGED(s, directory: str, **kwargs): + if directory is None: + return "input" + return is_changed_load_images(directory, **kwargs) + + @classmethod + def VALIDATE_INPUTS(s, directory: str, **kwargs): + if directory is None: + return True + return validate_load_images(directory) \ No newline at end of file diff --git a/docs/VHS_LoadVideoPath.md b/docs/VHS_LoadVideoPath.md new file mode 100644 index 0000000..e498d4e --- /dev/null +++ b/docs/VHS_LoadVideoPath.md @@ -0,0 +1,115 @@ +# Load Video (Path) 🎥🅥🅗🅢 +## Documentation +- Class name: VHS_LoadVideoPath +- Category: Video Helper Suite 🎥🅥🅗🅢 +- Output node: False +- Repo Ref: https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git + +VHS_LoadVideoPath节点用于从指定路径加载视频文件,以便整合到视频处理工作流程中。它确保视频文件可访问,验证路径,并为视频的后续处理或分析任务做好准备。 + +## Input types +### Required +- video + - 指定要加载的视频文件的路径,使节点能够访问和处理视频。 + - Comfy dtype: STRING + - Python dtype: str +- force_rate + - 决定对加载的视频强制执行的帧率,允许在不同视频之间进行一致的帧率处理。 + - Comfy dtype: INT + - Python dtype: int +- force_size + - 允许指定视频的所需分辨率,便于视频尺寸标准化处理。 + - Comfy dtype: COMBO[STRING] + - Python dtype: str +- custom_width + - 设置视频的自定义宽度,使对视频尺寸进行精确控制。 + - Comfy dtype: INT + - Python dtype: int +- custom_height + - 设置视频的自定义高度,使对视频尺寸进行精确控制。 + - Comfy dtype: INT + - Python dtype: int +- frame_load_cap + - 限制从视频中加载的帧数,有助于在内存约束内处理视频。 + - Comfy dtype: INT + - Python dtype: int +- skip_first_frames + - 跳过视频中的指定数量的初始帧,有助于在视频的后续部分开始处理。 + - Comfy dtype: INT + - Python dtype: int +- select_every_nth + - 选择每第n帧进行加载,允许对视频帧进行稀疏采样。 + - Comfy dtype: INT + - Python dtype: int + +### Optional +- meta_batch + - 将加载的视频与特定批次关联,便于在视频助手套件中进行批处理操作。 + - Comfy dtype: VHS_BatchManager + - Python dtype: VHS_BatchManager + +## Output types +- IMAGE + - Comfy dtype: IMAGE + - 加载的视频帧作为图像,准备进一步处理。 + - Python dtype: List[Image] +- frame_count + - Comfy dtype: INT + - 从视频中加载的帧总数。 + - Python dtype: int +- audio + - Comfy dtype: VHS_AUDIO + - 从视频中提取的音轨(如果有)。 + - Python dtype: VHS_AUDIO +- video_info + - Comfy dtype: VHS_VIDEOINFO + - 有关加载视频的元数据和信息。 + - Python dtype: VHS_VIDEOINFO + +## Usage tips +- Infra type: CPU +- Common nodes: unknown + +## Source code +```python +class LoadVideoPath: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "video": ("STRING", {"default": "X://insert/path/here.mp4", "vhs_path_extensions": video_extensions}), + "force_rate": ("INT", {"default": 0, "min": 0, "max": 60, "step": 1}), + "force_size": (["Disabled", "Custom Height", "Custom Width", "Custom", "256x?", "?x256", "256x256", "512x?", "?x512", "512x512"],), + "custom_width": ("INT", {"default": 512, "min": 0, "max": DIMMAX, "step": 8}), + "custom_height": ("INT", {"default": 512, "min": 0, "max": DIMMAX, "step": 8}), + "frame_load_cap": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}), + "skip_first_frames": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}), + "select_every_nth": ("INT", {"default": 1, "min": 1, "max": BIGMAX, "step": 1}), + }, + "optional": { + "meta_batch": ("VHS_BatchManager",) + }, + "hidden": { + "unique_id": "UNIQUE_ID" + }, + } + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + RETURN_TYPES = ("IMAGE", "INT", "VHS_AUDIO", "VHS_VIDEOINFO",) + RETURN_NAMES = ("IMAGE", "frame_count", "audio", "video_info",) + + FUNCTION = "load_video" + + def load_video(self, **kwargs): + if kwargs['video'] is None or validate_path(kwargs['video']) != True: + raise Exception("video is not a valid path: " + kwargs['video']) + return load_video_cv(**kwargs) + + @classmethod + def IS_CHANGED(s, video, **kwargs): + return hash_path(video) + + @classmethod + def VALIDATE_INPUTS(s, video, **kwargs): + return validate_path(video, allow_none=True) \ No newline at end of file diff --git a/needAddFile.json b/needAddFile.json index a8c4043..dac24d9 100644 --- a/needAddFile.json +++ b/needAddFile.json @@ -534,11 +534,6 @@ "BRIAAI Matting", "Robust Video Matting" ], - "ComfyUI-VideoHelperSuite": [ - "VHS_LoadAudioUpload", - "VHS_LoadImagesPath", - "VHS_LoadVideoPath" - ], "ComfyUI_Custom_Nodes_AlekPet": [ "ArgosTranslateCLIPTextEncodeNode", "ArgosTranslateTextNode", diff --git a/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadAudioUpload.md b/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadAudioUpload.md new file mode 100644 index 0000000..08ed9be --- /dev/null +++ b/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadAudioUpload.md @@ -0,0 +1,77 @@ +# Load Audio (Upload)🎥🅥🅗🅢 +## Documentation +- Class name: VHS_LoadAudioUpload +- Category: Video Helper Suite 🎥🅥🅗🅢 +- Output node: False +- Repo Ref: https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git + +VHS_LoadAudioUpload节点用于在视频助手套件中上传和处理音频文件。它允许用户上传音频文件,并指定音频处理的开始时间和持续时间。此节点对于需要音频操作或分析的应用至关重要,为套件中的进一步音频相关操作提供基础。 + +## Input types +### Required +- audio + - 指定要上传和处理的音频文件。此参数对于确定将进行处理的音频内容至关重要。 + - Comfy dtype: COMBO[STRING] + - Python dtype: str +- start_time + - 定义应处理音频文件的起始点(以秒为单位)。此参数允许选择性地处理音频内容,增强灵活性。 + - Comfy dtype: FLOAT + - Python dtype: float +- duration + - 指定应从开始时间处理音频的持续时间(以秒为单位)。这允许精确控制要分析或操作的音频文件片段。 + - Comfy dtype: FLOAT + - Python dtype: float + +## Output types +- audio + - Comfy dtype: VHS_AUDIO + - 表示处理后的音频数据,准备在套件中的后续操作中使用。 + - Python dtype: torch.Tensor + +## Usage tips +- Infra type: CPU +- Common nodes: unknown + +## Source code +```python +class LoadAudioUpload: + @classmethod + def INPUT_TYPES(s): + input_dir = folder_paths.get_input_directory() + files = [] + for f in os.listdir(input_dir): + if os.path.isfile(os.path.join(input_dir, f)): + file_parts = f.split('.') + if len(file_parts) > 1 and (file_parts[-1] in audio_extensions): + files.append(f) + return {"required": { + "audio": (sorted(files),), + "start_time": ("FLOAT" , {"default": 0, "min": 0, "max": 10000000, "step": 0.01}), + "duration": ("FLOAT" , {"default": 0, "min": 0, "max": 10000000, "step": 0.01}), + }, + } + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + RETURN_TYPES = ("VHS_AUDIO", ) + RETURN_NAMES = ("audio",) + FUNCTION = "load_audio" + + def load_audio(self, start_time, duration, **kwargs): + audio_file = folder_paths.get_annotated_filepath(kwargs['audio'].strip("\"")) + if audio_file is None or validate_path(audio_file) != True: + raise Exception("audio_file is not a valid path: " + audio_file) + + audio = get_audio(audio_file, start_time, duration) + + return (lambda : audio,) + + @classmethod + def IS_CHANGED(s, audio, start_time, duration): + audio_file = folder_paths.get_annotated_filepath(audio.strip("\"")) + return hash_path(audio_file) + + @classmethod + def VALIDATE_INPUTS(s, audio, **kwargs): + audio_file = folder_paths.get_annotated_filepath(audio.strip("\"")) + return validate_path(audio_file, allow_none=True) \ No newline at end of file diff --git a/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadImagesPath.md b/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadImagesPath.md new file mode 100644 index 0000000..dc1945b --- /dev/null +++ b/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadImagesPath.md @@ -0,0 +1,90 @@ +# Load Images (Path) 🎥🅥🅗🅢 +## Documentation +- Class name: VHS_LoadImagesPath +- Category: Video Helper Suite 🎥🅥🅗🅢 +- Output node: False +- Repo Ref: https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git + +VHS_LoadImagesPath节点用于将图像从指定目录路径加载到视频编辑或处理工作流程中。它支持过滤和选择选项,以自定义加载的图像集,从而在视频助手套件中高效管理和处理图像批次。 + +## Input types +### Required +- directory + - 指定要从中加载图像的目录。此参数对于确定要处理的图像来源至关重要。 + - Comfy dtype: STRING + - Python dtype: str + +### Optional +- image_load_cap + - 限制从目录加载的图像数量,允许控制处理批次的大小。 + - Comfy dtype: INT + - Python dtype: int +- skip_first_images + - 跳过目录开头指定数量的图像,允许根据顺序选择性加载图像。 + - Comfy dtype: INT + - Python dtype: int +- select_every_nth + - 加载目录中的每第n张图像,提供了一种稀释要处理的图像集的方法。 + - Comfy dtype: INT + - Python dtype: int + +## Output types +- image + - Comfy dtype: IMAGE + - 加载的图像,准备在工作流程中进一步处理或操作。 + - Python dtype: torch.Tensor +- mask + - Comfy dtype: MASK + - 为加载的图像生成的蒙版,对于需要分割或选择性编辑的图像编辑任务很有用。 + - Python dtype: torch.Tensor +- int + - Comfy dtype: INT + - 加载的图像总数,在应用加载参数后提供批次大小的见解。 + - Python dtype: int + +## Usage tips +- Infra type: CPU +- Common nodes: + - [ImpactImageBatchToImageList](../../ComfyUI-Impact-Pack/Nodes/ImpactImageBatchToImageList.md) + - [PreviewImage](../../Comfy/Nodes/PreviewImage.md) + - [IPAdapterEncoder](../../ComfyUI_IPAdapter_plus/Nodes/IPAdapterEncoder.md) + - LinearBatchCreativeInterpolation + +## Source code +```python +class LoadImagesFromDirectoryPath: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "directory": ("STRING", {"default": "X://path/to/images", "vhs_path_extensions": []}), + }, + "optional": { + "image_load_cap": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}), + "skip_first_images": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}), + "select_every_nth": ("INT", {"default": 1, "min": 1, "max": BIGMAX, "step": 1}), + } + } + + RETURN_TYPES = ("IMAGE", "MASK", "INT") + FUNCTION = "load_images" + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + def load_images(self, directory: str, **kwargs): + if directory is None or validate_load_images(directory) != True: + raise Exception("directory is not valid: " + directory) + + return load_images(directory, **kwargs) + + @classmethod + def IS_CHANGED(s, directory: str, **kwargs): + if directory is None: + return "input" + return is_changed_load_images(directory, **kwargs) + + @classmethod + def VALIDATE_INPUTS(s, directory: str, **kwargs): + if directory is None: + return True + return validate_load_images(directory) \ No newline at end of file diff --git a/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadVideoPath.md b/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadVideoPath.md new file mode 100644 index 0000000..e498d4e --- /dev/null +++ b/nodes-docs/zh-CN/ComfyUI-VideoHelperSuite/VHS_LoadVideoPath.md @@ -0,0 +1,115 @@ +# Load Video (Path) 🎥🅥🅗🅢 +## Documentation +- Class name: VHS_LoadVideoPath +- Category: Video Helper Suite 🎥🅥🅗🅢 +- Output node: False +- Repo Ref: https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git + +VHS_LoadVideoPath节点用于从指定路径加载视频文件,以便整合到视频处理工作流程中。它确保视频文件可访问,验证路径,并为视频的后续处理或分析任务做好准备。 + +## Input types +### Required +- video + - 指定要加载的视频文件的路径,使节点能够访问和处理视频。 + - Comfy dtype: STRING + - Python dtype: str +- force_rate + - 决定对加载的视频强制执行的帧率,允许在不同视频之间进行一致的帧率处理。 + - Comfy dtype: INT + - Python dtype: int +- force_size + - 允许指定视频的所需分辨率,便于视频尺寸标准化处理。 + - Comfy dtype: COMBO[STRING] + - Python dtype: str +- custom_width + - 设置视频的自定义宽度,使对视频尺寸进行精确控制。 + - Comfy dtype: INT + - Python dtype: int +- custom_height + - 设置视频的自定义高度,使对视频尺寸进行精确控制。 + - Comfy dtype: INT + - Python dtype: int +- frame_load_cap + - 限制从视频中加载的帧数,有助于在内存约束内处理视频。 + - Comfy dtype: INT + - Python dtype: int +- skip_first_frames + - 跳过视频中的指定数量的初始帧,有助于在视频的后续部分开始处理。 + - Comfy dtype: INT + - Python dtype: int +- select_every_nth + - 选择每第n帧进行加载,允许对视频帧进行稀疏采样。 + - Comfy dtype: INT + - Python dtype: int + +### Optional +- meta_batch + - 将加载的视频与特定批次关联,便于在视频助手套件中进行批处理操作。 + - Comfy dtype: VHS_BatchManager + - Python dtype: VHS_BatchManager + +## Output types +- IMAGE + - Comfy dtype: IMAGE + - 加载的视频帧作为图像,准备进一步处理。 + - Python dtype: List[Image] +- frame_count + - Comfy dtype: INT + - 从视频中加载的帧总数。 + - Python dtype: int +- audio + - Comfy dtype: VHS_AUDIO + - 从视频中提取的音轨(如果有)。 + - Python dtype: VHS_AUDIO +- video_info + - Comfy dtype: VHS_VIDEOINFO + - 有关加载视频的元数据和信息。 + - Python dtype: VHS_VIDEOINFO + +## Usage tips +- Infra type: CPU +- Common nodes: unknown + +## Source code +```python +class LoadVideoPath: + @classmethod + def INPUT_TYPES(s): + return { + "required": { + "video": ("STRING", {"default": "X://insert/path/here.mp4", "vhs_path_extensions": video_extensions}), + "force_rate": ("INT", {"default": 0, "min": 0, "max": 60, "step": 1}), + "force_size": (["Disabled", "Custom Height", "Custom Width", "Custom", "256x?", "?x256", "256x256", "512x?", "?x512", "512x512"],), + "custom_width": ("INT", {"default": 512, "min": 0, "max": DIMMAX, "step": 8}), + "custom_height": ("INT", {"default": 512, "min": 0, "max": DIMMAX, "step": 8}), + "frame_load_cap": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}), + "skip_first_frames": ("INT", {"default": 0, "min": 0, "max": BIGMAX, "step": 1}), + "select_every_nth": ("INT", {"default": 1, "min": 1, "max": BIGMAX, "step": 1}), + }, + "optional": { + "meta_batch": ("VHS_BatchManager",) + }, + "hidden": { + "unique_id": "UNIQUE_ID" + }, + } + + CATEGORY = "Video Helper Suite 🎥🅥🅗🅢" + + RETURN_TYPES = ("IMAGE", "INT", "VHS_AUDIO", "VHS_VIDEOINFO",) + RETURN_NAMES = ("IMAGE", "frame_count", "audio", "video_info",) + + FUNCTION = "load_video" + + def load_video(self, **kwargs): + if kwargs['video'] is None or validate_path(kwargs['video']) != True: + raise Exception("video is not a valid path: " + kwargs['video']) + return load_video_cv(**kwargs) + + @classmethod + def IS_CHANGED(s, video, **kwargs): + return hash_path(video) + + @classmethod + def VALIDATE_INPUTS(s, video, **kwargs): + return validate_path(video, allow_none=True) \ No newline at end of file