Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > OpenKatana > OpenKatana · Preview segment

ComfyUI Node: OpenKatana · Preview segment

Class Name

OpenKatana_preview_segment

Category
OpenKatana/Tools
Author
rk0neki (Account age: 235days)
Extension
OpenKatana
Latest Updated
2026-11-05
Github Stars
0.05K

How to Install OpenKatana

Install this extension via the ComfyUI Manager by searching for OpenKatana
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter OpenKatana 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

OpenKatana · Preview segment Description

Creates playable H.264 video segment previews with optional AAC audio and a mono WAV copy.

OpenKatana · Preview segment:

OpenKatana_preview_segment creates a short, playable preview of a video section so you can review motion, timing, and available sound without processing the entire recording. It uses FFmpeg to extract the selected section and encode it as an H.264 MP4, limiting the picture width while preserving its proportions. This makes it useful for checking a moment before committing to a longer edit or render. When the source contains audio, the preview includes AAC audio and a separate mono WAV copy is also created for compatible review tools. The node prepares media for inspection; creating the preview does not mean that an AI model has watched it or listened to it, and playback depends on the capabilities of your client.

OpenKatana · Preview segment Input Parameters:

project_id

A required STRING that provides the project context for the tool call. Enter the identifier for the OpenKatana project you intend to work with, keeping it consistent with the other project-related nodes in your workflow. The wrapper passes this value into its argument-building step before invoking the preview tool; the supplied code does not show the details of project lookup or validation. No default value, allowed-value list, length limit, or numeric minimum or maximum is specified in the provided node interface.

arguments

A required STRING used to supply the preview tool’s arguments through the wrapper’s argument-processing system. This is where the tool-specific request belongs, rather than in additional node inputs. The underlying preview implementation accepts a source, an output directory, a start time, a duration, and a maximum width, but the supplied context does not expose the public tool’s complete argument schema or how it resolves source and output locations, so these should not be assumed to be literal JSON keys accepted by this node. The confirmed implementation limits are a start time of at least 0 seconds, a duration from 0.05 to 15 seconds, and an integer maximum width from 160 to 1920 pixels. Those limits govern preview creation, not the length of this STRING. No default argument text or preview-setting defaults are shown; use the tool signature or schema available in your OpenKatana installation to construct the request.

after

An optional STRING that can be connected to an earlier node’s result to establish an execution dependency. This is useful when the preview must wait for another operation, such as preparing the project’s media, before running. In the displayed implementation, the value is accepted by the execution method but is not read or added to the preview tool’s arguments, so it does not itself select media or change preview settings. No default text, allowed-value list, or minimum or maximum length is specified.

OpenKatana · Preview segment Output Parameters:

result_json

A STRING containing the tool response serialized through the OpenKatana response wrapper. The underlying preview function returns a video file path pointing to preview.mp4, a preview_audio list containing the path to preview.wav when the source has audio or an empty list otherwise, the requested start and duration values, and a note explaining playback and audio-review limitations. The separate WAV is mono at 16,000 Hz, while the MP4 uses H.264 video and AAC audio when audio is available. These paths identify generated files; they are not direct ComfyUI VIDEO or AUDIO output sockets. The returned timing values describe the request rather than a separately measured output duration, so a request near the source’s end may produce less footage than requested. The exact outer response structure is not shown because the response-wrapper implementation is not included.

OpenKatana · Preview segment Usage Tips:

  • Start with a short section, such as 2–5 seconds, to check framing, movement, or edit timing before requesting a longer preview. Set these values using the argument names supported by your installed tool schema.
  • Use a maximum width such as 640 pixels for quick visual checks, or 1280 pixels when you need to inspect more detail. The allowed range is 160–1920 pixels, and the implementation does not enlarge footage beyond its original width.
  • Choose a start time within the source’s playable duration and keep the requested duration within the remaining footage. The implementation validates numeric ranges, but the shown code does not explicitly check that the entire requested section fits inside the source.
  • Remember that the width setting is a cap, not a fixed output size. FFmpeg preserves the picture’s proportions and calculates an even output height for encoding compatibility.
  • Play the MP4 in a compatible client when evaluating motion and synchronized sound. File creation alone does not demonstrate that the clip has been viewed or heard.
  • Use the separate WAV for compatible audio-review tools, but use the MP4 when judging the combined picture-and-sound experience. The WAV is converted to a single audio channel at 16 kHz.
  • Connect an earlier operation’s result to after when the preview must wait for that operation. Continue to specify the intended project and preview request explicitly; after does not provide preview settings.
  • If your tool schema exposes output-directory selection, choose a new directory for each run. The underlying implementation creates that directory with existing-directory reuse disabled.

OpenKatana · Preview segment Common Errors and Solutions:

Invalid start, duration, or maximum-width value

  • Explanation: The implementation validates these settings before creating the preview. Start must be at least 0, duration must be between 0.05 and 15 seconds, and maximum width must be an integer between 160 and 1920 pixels. The exact validation-error wording is not included in the supplied code.
  • Solution: Check the values in your tool arguments. Use seconds for timing and a whole number for width, such as a start of 0, a duration of 3, and a maximum width of 640.

Invalid or unsupported tool arguments

  • Explanation: The wrapper processes the arguments text before calling the tool. Incorrect formatting or fields that do not match the installed tool schema may prevent execution, although the supplied code does not show the parser’s exact error messages.
  • Solution: Check the tool signature or schema in your installation and follow its expected argument format. Do not assume that internal function parameter names are automatically accepted as public argument keys.

unexpected inputs: ...

  • Explanation: The node explicitly raises this TypeError if extra execution fields are supplied outside its declared typed inputs. This can occur when a workflow or programmatic call attempts to add unsupported node-level parameters.
  • Solution: Use only project_id, arguments, and the optional after input shown in the interface. Put tool-specific settings inside the supported argument structure rather than adding new node inputs.

File exists

  • Explanation: The preview function creates its output directory with exist_ok=False. If that directory already exists, directory creation fails rather than reusing or overwriting it; this message may appear within a Python FileExistsError.
  • Solution: If output-directory selection is available, choose a fresh directory. Otherwise, inspect the tool-managed output location and resolve the conflict through the supported workflow, preserving any files you still need.

No such file or directory

  • Explanation: This possible operating-system or FFmpeg message can indicate that the source file cannot be found. Paths are resolved on the machine running OpenKatana, so a file available only on your own computer may not be accessible to the server.
  • Solution: Confirm that the source has been uploaded or imported as required by your installation and that the resolved file exists on the OpenKatana host. Check for moved files, spelling mistakes, or inaccessible mounted storage.

FFmpeg executable not found

  • Explanation: Preview generation requires FFmpeg, and the code calls the ffmpeg executable directly. If it is missing or unavailable in the process environment, the preview cannot be encoded.
  • Solution: Install FFmpeg in the environment running OpenKatana, confirm that ffmpeg is available on its executable search path, and restart the application if necessary.

Stream map '0:v:0' matches no streams

  • Explanation: This possible FFmpeg message means the source has no video stream matching the required first video stream. Audio is optional in this operation, but video is mandatory.
  • Solution: Select a playable video file rather than an audio-only file. If the source should contain video, test it in a media player and check whether it is incomplete or damaged.

Unknown encoder 'libx264' or Unknown encoder 'aac'

  • Explanation: These possible FFmpeg messages indicate that the installed FFmpeg build lacks an encoder explicitly required by the preview command. The shown implementation does not provide an alternative encoder setting.
  • Solution: Install an FFmpeg build with H.264 encoding through libx264 and AAC encoding support, then retry the preview.

Permission denied

  • Explanation: This possible system or FFmpeg message indicates that OpenKatana cannot read the source, create the output directory, or write one of the preview files.
  • Solution: Check access permissions for the account running OpenKatana. Use a readable source location and a writable output location, and check mounted-folder permissions if the application runs in a container.

Output file is empty or a preview with no usable frames

  • Explanation: A start time beyond the available footage, an extremely short section, or a damaged source can leave FFmpeg without usable video frames. Exact messages vary by FFmpeg version and source format.
  • Solution: Try a section near the beginning of the source with a duration of a few seconds. Verify that the source plays correctly and that the requested interval overlaps actual video.

Preview created, but audio is missing or cannot be played

  • Explanation: A source without audio legitimately produces an empty preview_audio list. When audio is present, playback or presentation as an MCP audio block still depends on client support; this is a review limitation rather than necessarily a generation failure.
  • Solution: Check whether the source contains an audio stream, then open the generated MP4 or WAV in a compatible player. Do not treat a returned file path as confirmation that an AI model has listened to the sound.

OpenKatana · Preview segment Related Nodes

Go back to the extension to check out more related nodes.
OpenKatana
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

OpenKatana · Preview segment