Nodes/ComfyUI-Light-Tool/Light-Tool: Preview Video
ComfyUI Node

Light-Tool: Preview Video

Embed a video player in your graph and watch the clip without leaving it

By ihmily·Created 2 years ago·Updated 4 months ago· 20
Light-Tool: Preview Video
      video_url

      Video nodes have a UX problem ComfyUI hasn't fully solved: the output is a file, and you can't watch a file inside a node. Light-Tool: PreviewVideo is the pack's answer - paste a video URL and a player renders right in the node panel, looping and muted, so you can eyeball a clip without opening another window. It's the display node of the pack's video trio (with LoadVideo and SaveVideo), and the only one that shows you anything.

      One input: video_url, a multiline string. No outputs - it's an output node in the ComfyUI sense, meaning it displays UI and terminates the graph branch.

      How it works. The node hands the URL to a small custom JS extension that injects an HTML <video> element into the node's panel. The player is set to loop and muted, autoplays once the metadata loads, and keeps aspect ratio as it scales to fit the node. Under the hood it's borrowed from the animatediff video-preview approach - a proven pattern, and a light one: no transcoding, no server-side work, the browser just streams the URL.

      The natural pairing. The obvious source for the URL is this pack's LoadVideo, which returns a synthesized /api/view?... URL pointing at the file it just downloaded - wire that into PreviewVideo and you get an in-graph player for your freshly fetched video. You can also paste any direct video URL, including one served from ComfyUI's own output directory.

      The gotchas that actually bite. This is a remote player, and everything that can go wrong with a remote player can go wrong here. Hotlink protection or CORS restrictions on the source host will break playback even though the URL looks fine. It needs a network path from your browser to the host - if ComfyUI is running on a remote box and the video URL points at that box, your local browser still needs to reach it. And there's no seeking or progress persistence worth mentioning; it's a quick-look loop, not a video editor. If you see a blank panel, the first thing to check is whether the URL is playable in a normal browser tab - that separates "node problem" from "host problem" instantly.

      When you'd reach for it. Any workflow that produces or fetches video and needs a human to glance at it mid-graph. It won't replace proper frame extraction or a real preview node for serious inspection, but for "is this the right clip / did that come out right," it's instant feedback.

      Installing. With the pack:

      cd ComfyUI/custom_nodes
      git clone https://github.com/ihmily/ComfyUI-Light-Tool.git
      pip install -r requirements.txt
      # restart ComfyUI
      

      Or ComfyUI Manager → search ComfyUI-Light-Tool → Install. No models. The JS extension loads automatically from the pack's js/ directory once ComfyUI restarts.

      Honest take: for quick visual confirmation of a video it's the most pleasant node in the pack's video section - just don't expect it to handle hostile hosts, because the browser, not the node, is doing the streaming.

      CategoryComfyUI-Light-Tool/Video

      Inputs (1)

      NameTypeDefaultDescription
      video_urlSTRING

      Outputs (0)

      No outputs