When a Load Video node is added, the default video selection is now
properly displayed with a preview.
Context menu options now consistently use preview instead of video as
the actions apply to animated images as well.
With the preview element no longer named as inputEl, the pertinent code
that would hide the element when off screen no longer applied.
This is fixed and has the added benefit of preventing dangling
video elements even when a multiline widget has not yet injected it's
own fix.
While the new KV state storage should prevent the need for this in the
future and there's a degree of error checking, it would be particularly
poor optics for the system to break all existing workflows on release.
This adds a couple of migratory functions that carefully check and
manage the transitions for the two nodes that break.
The onRemoved code for the preview widget wasn't actually firing, so the
callback has been moved to the node.onRemoved.
The file-input's created for nodes that support uploading were never
removed and have been corrected by the same method.
When a video is generated that can not be displayed in browser
(those using the h265 codec), the preview is now hidden
The 'video' field of Load Video (Upload) is now properly initialized
Context menu options for video previews have been moved to the top of
the list.
When a node fails to load the nicer comfy error dialog is used.
Errors on file upload still use alert, but this is equivalent to the
native comfy code.
Video previews are muted.
The image preview element is hidden by default.
Open and Save Video buttons have been added to the context menu.
This brings parity with the functionality of the Save Image node,
and restores functionality that was removed with passing through clicks
on the video preview element.
When a resize is done on a node, it is marked dirty.
This fixes a minor delay between preview content displaying
and the underlying node performing it's resize
The reimplementation for video previews is functional and adds base
support for previews in load video (upload)
State serialization for nodes (what's used when a workflow is loaded or
the webpage is refreshed) now uses a map with widget names as keys for
all VHS nodes.
Includes code for uploads, customsize, dateformatting,
forcing timestamps, and hiding the useless GIF output of the combine
video node, but lacks the video preview code and testing.
-Restore original name of 'VHS_LoadVideo' to 'VHS_LoadVideoPath'
-Restore LoadVideoUpload and bring its features up to parity with LoadVideoPath and UploadVideo
-Rename 'input' and 'effective' variables to 'original' and 'actual'
-Add guard clause for undefined video widget value
-Add PIL fallback to LoadVideo to support video types not supported by opencv2, such as webp, apng, and mjpeg. Changing frame rate is not supported in this mode. The output log will inform you of this when the fallback is used.
-Removed VHS_LoadVideoUpload node
-Renamed VHS_LoadVideoPath to just VHS_LoadVideo
-Added a video_info output to LoadVideo which includes more information, such as the frame count, fps, duration and frame time for the input video and the output frames
-Added a new node UploadVideo which includes the functionality of LoadVideoUpload insofar as copying a video to the input folder but also allows the user to upload to temp instead for testing so as not to clutter the input folder. Uploaded videos now go to a subfolder, 'VHS_upload'.
-Added gif preview to UploadVideo so uploaded videos can be viewed on the node when selected.
-Fixed autoplay for gif preview on VideoCombine, still not working for videos on UploadVideo node.
-Added drag and drop for videos on UploadVideo node.
-Changed 'force_frame_rate' to 'desired_frame_rate' because it cannot be forced in PIL fallback, this is an effort to communicate this to the user