chaiNNer icon indicating copy to clipboard operation
chaiNNer copied to clipboard

Load Video and Save Video connections trouble

Open bradleysepos opened this issue 1 year ago • 5 comments

Information:

  • Chainner version: 0.22.0
  • OS: Windows 10

Description

#2494 solved some lineage issues with connections I was having with numbers/math/iterators, so thank you for that. I have another case that seems like it should work, but does not.

Load Image and Load Images can be connected to a Switch. So can Load Image and Load Video. However, Load Images and Load Video cannot be connected. Naturally, this makes it impossible to have a Switch that handles all three input possibilities.

chainner-check-assigned-lineage-0

bradleysepos avatar Feb 21 '24 14:02 bradleysepos

Found a similar issue with Save Video and appending image dimensions to the name. I'm doing something similar with Save Image without any issue.

chainner-check-assigned-lineage-1

I also notice Save Video does not have a Subdirectory field, which would be useful.

Anyway, it seems Load Video / Save Video might need a little help when someone has the time. Cheers.

bradleysepos avatar Feb 21 '24 15:02 bradleysepos

However, Load Images and Load Video cannot be connected.

Not a lineage bug. This perfectly follows the rules of lineage. The issue is that switch is a special node where the normal rules of lineage don't make much sense.

Found a similar issue with Save Video and appending image dimensions to the name.

Not a lineage bug. While we (smart humans) know that all frames of a video have the same size, the lineage system cannot make this assumption. So it has to assume each frame may have a different size.

I think what we need here is a "First" node that returns the first element of a sequence. Then you could get the first frame and get its size.

RunDevelopment avatar Feb 21 '24 15:02 RunDevelopment

Technically if we separated the loading of the video and the iterating of the frames into separate nodes, we could then have a node that gets the dimensions and other metadata of the video that would be able to run before iteration starts

joeyballentine avatar Feb 21 '24 15:02 joeyballentine

No need for a separate node. We already do this metadata stuff for FPS.

RunDevelopment avatar Feb 21 '24 15:02 RunDevelopment

Thanks for the comments. Some video formats can actually vary frame size throughout a stream, for what it's worth. It's actually very common to vary frame rate but that's a whole other can of worms.

bradleysepos avatar Feb 21 '24 16:02 bradleysepos

I made an issue to track progress on a First node (#2761) and an issue to track the issue with Switch (#2762).

Since this issue isn't a problem with Load/Save Video, I'm going to close this issue now.

RunDevelopment avatar Apr 08 '24 12:04 RunDevelopment