ComfyUI/comfy_extras
Jacob Segal 46fb2153e1 Add basic support for videos as types
This PR adds support for VIDEO as first-class types. In order to avoid
unnecessary costs, VIDEO outputs must implement the `VideoInput` ABC,
but their implementation details can vary. Included are two
implementations of this type which can be returned by other nodes:

* `VideoFromFile` - Created with either a path on disk (as a string) or
  a `io.BytesIO` containing the contents of a file in a supported format
  (like .mp4). This implementation won't actually load the video unless
  necessary. It will also avoid re-encoding when saving if possible.
* `VideoFromComponents` - Created from an image tensor and an optional
  audio tensor.

Currently, only h264 encoded videos in .mp4 containers are supported for
saving, but the plan is to add additional encodings/containers in the
near future (particularly .webm).
2025-04-27 20:56:55 -07:00
..
2024-05-27 19:08:27 -04:00
2025-03-26 05:09:52 -04:00
2025-04-12 20:33:36 -04:00
2024-11-10 00:10:45 -05:00
2024-05-27 19:08:27 -04:00
2024-03-18 16:54:13 -04:00