The Late Night Labs (LNL) Frame Selector node for ComfyUI is aimed at enhancing video interaction within the ComfyUI framework. It enables users to upload, playback, and perform basic In/Out on video files directly within the ComfyUI environment.
- Video Upload and Playback: Users can upload video files and utilize standard playback controls including Play, Pause, Scrub, and Rewind.
- Editing Tools: The node offers simple editing capabilities such as setting In/Out points for selecting specific video sections, frame selection for detailed editing, and outputting frames with handles for further processing. Audio can be included.
The project is structured into two main components: the web directory, containing front-end JavaScript and CSS files, and the modules directory, containing back-end Python scripts.
- eventHandlers.js: Manages event handling for video playback and editing features.
- nodes.js: Defines the Load Video Node structure and integration within ComfyUI.
- utils.js: Contains utility functions for video processing and manipulation.
- widgets.js: Implements UI components for video editing.
- styles.js: Handles dynamic styling of the video node elements.
- css/lnlNodes.css: Provides styling for the Load Video Node components.
- images/: Contains icons used for playback and editing controls.
- server.py: Back-end server implementation for handling video upload and processing.
- utils.py: Back-end utility functions supporting video editing features.
- nodes.py: Defines the server-side representation of the Load Video Node.
- Ensure you have ComfyUI and its dependencies installed.
- Clone this repo into custom_nodes:
$ cd ComfyUI/custom_nodes
$ git clone https://github.com/latenightlabs/ComfyUI-LNL.git
Install dependencies if not downloaded from the Comfy Manager:
$ cd ComfyUI-LNL
$ pip install -r requirements.txt
Make sure you that you have ffmpeg defined in your path.
- Choose Video to Upload: Select a video file for processing (in this case, 'input/logo.mp4').
Options include:
- Current image: Current frame being viewed.
- Image Batch (in/out): Select a range of frames to process based on in and out points.
- Frame count (rel): Display the count of frames relative to in and out points.
- Frame count (abs): Absolute count of frames in the uploaded video.
- Current frame (rel): The current frame number relative to in and out points.
- Current frame (abs): The absolute frame number within the entire video.
- Framerate: FPS in the uploaded video.
- Audio: Pass audio track if desired.
- Shows the current frame number out of the total number of frames (in this instance, frame 66 of 149).
- In Point is green
- Out Point is red Note: In and Out point is set with the playback controls or in the input fields.
- Takes the user to the very first frame of the video.
- Set 'in_point'.
- Takes the user to the 'in_point', which is the frame set as the starting point for a selected range.
- Steps backward by one frame, moving the current frame to the previous frame in the video.
- Plays the video from the current frame forward.
- Not visible while Play button is displayed: Pause the playback at the current frame.
- Steps forward by one frame at a time.
- Takes the user to the 'out_point', the frame set as the ending point for a selected range.
- Sets the 'out_point'.
- Jumps to the very last frame of the video.
- current_frame: Displays the current frame number and allows you to jump to a specific frame.
- in_point and out_point: Fields for setting the start and end points for a range of frames for focused editing of a frame range.
- select_every_nth_frame: Specify a pattern for selecting frames (e.g., every 2nd frame, every 3rd frame, etc.).
This project uses parts of code and some ideas from the following repositories: ComfyUI-Custom-Scripts ComfyUI-VideoHelperSuite Make sure to check them out, they both offer awesome tool suites!
We also use icons for player controls supplied by Icons8.
Contributions to the Load Video Node project are welcome. Please
This project is licensed under the GNU General Public License.