ComfyUI Node
🎬AGSoft VideoFrameExtractor
Extracts frames from a video file with flexible selection options. Supports various modes including extracting the first/last frame, specific frames, frame ranges, or all frames with customizable step and maximum frame limits. Returns the extracted frames as images along with video metadata. Извлекает кадры из видеофайла с гибкими опциями выбора. Поддерживает различные режимы, включая извлечение первого/последнего кадра, конкретных кадров, диапазонов кадров или всех кадров с настраиваемым шагом и ограничением максимального количества кадров. Возвращает извлеченные кадры как изображения вместе с метаданными видео.
🎬AGSoft VideoFrameExtractor
- video
- video_frames
- frame
- width
- height
- total_frames
- video_metadata_json
◄custom_path►
◄frame_selection_modefirst►
◄exact_frame1►
◄start_frame1►
◄end_frame100►
◄num_frames10►
◄step10►
CategoryAGSoft/Video
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| custom_path | STRING | Absolute or relative path to the video file. Has the lowest priority when video or video_frames are connected. Абсолютный или относительный путь к видеофайлу. Имеет наименьший приоритет, если подключены video или video_frames. | |
| frame_selection_mode | COMBO | first | first: Extracts the very first frame. last: Extracts the very last frame (robust method). exact_frame: Extracts a single frame by its number. range: Extracts frames from 'start_frame' to 'end_frame' with 'step'. sample: Extracts 'num_frames' evenly spaced frames. all: Extracts all frames with the given 'step'. first: Извлекает самый первый кадр. last: Извлекает самый последний кадр (надежным методом). exact_frame: Извлекает один кадр по его номеру. range: Извлекает кадры от 'start_frame' до 'end_frame' с шагом 'step'. sample: Извлекает 'num_frames' равномерно распределенных кадров. all: Извлекает все кадры с заданным шагом 'step'. |
| videoopt | VIDEO | Video object from Video Helper Suite (VHS) Load Video node or standard ComfyUI Load Video. Has the highest priority. If connected, video_frames and custom_path are ignored. Видеообъект от ноды Load Video из Video Helper Suite (VHS) или стандартного ComfyUI. Имеет наивысший приоритет. При подключении video_frames и custom_path игнорируются. | |
| video_framesopt | IMAGE | Pre-loaded video frames as tensor (e.g., from VHS or LoadVideo node). Has medium priority. Used only if 'video' is not connected. Предварительно загруженные кадры видео в виде тензора (например, из VHS или LoadVideo). Имеет средний приоритет. Используется только если 'video' не подключен. | |
| exact_frameopt | INT | 11–10000000 | Frame number to extract (1-based index). Used only in 'exact_frame' mode. Номер кадра для извлечения (нумерация с 1). Используется только в режиме 'exact_frame'. |
| start_frameopt | INT | 11–10000000 | Starting frame number for 'range' mode (1-based index). Used only in 'range' mode. Начальный номер кадра для режима 'range' (нумерация с 1). Используется только в режиме 'range'. |
| end_frameopt | INT | 1001–10000000 | Ending frame number for 'range' mode (1-based index). Used only in 'range' mode. Конечный номер кадра для режима 'range' (нумерация с 1). Используется только в режиме 'range'. |
| num_framesopt | INT | 101–10000000 | Number of frames to extract in 'sample' mode. Used only in 'sample' mode to determine how many frames to evenly distribute across the video. Количество кадров для извлечения в режиме 'sample'. Используется только в режиме 'sample' для определения количества кадров, равномерно распределенных по видео. |
| stepopt | INT | 101–1000000 | Extract every Nth frame. For example, step=2 will extract every second frame, reducing the total number of frames by half. Used only in 'range' and 'all' modes. Извлекать каждый N-й кадр. Например, step=2 будет извлекать каждый второй кадр, уменьшая общее количество кадров вдвое. Используется только в режимах 'range' и 'all'. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| frame | IMAGE | — |
| width | INT | — |
| height | INT | — |
| total_frames | INT | — |
| video_metadata_json | STRING | — |