Kosinkadink / ComfyUI-VideoHelperSuite

Nodes related to video workflows
GNU General Public License v3.0
524 stars 92 forks source link

[Feature Request] Support load audio from path/url/string ; support audios composite #100

Open GentlemanHu opened 8 months ago

GentlemanHu commented 8 months ago

Like this... 😄

image
Kosinkadink commented 8 months ago

Hmm, I guess our path inputs are a custom directory type so we can support the autofill functionality in the UI. @AustinMroz would it be possible to allow directory/video/audio_file inputs to be toggleable to inputs, and for them to receive string inputs? Potentially might require some javascript trickery to maintain the autofill stuff, but I was not aware that the Path nodes stopped being able to have the path widgets toggleable to inputs. image

AustinMroz commented 8 months ago

Was just noting the same. I consider that a rather important loss of functionality for the other nodes, so I'll put some work into it tomorrow. It shouldn't be difficult to allow for path widgets to convert to string inputs. Allowing for both strings and audio to be input to Video Combine is likely not feasible, but string -> Load Audio -> Video Combine will work once the input conversion is fixed..

AustinMroz commented 8 months ago

After a good bit of digging, I've got a solution. Initial results are quite promising and Load Video (Path) is even updating its preview as soon as attatched primitive nodes are changed. I'll push the change now since i'm not seeing any issues with the following considerations

GentlemanHu commented 8 months ago

After a good bit of digging, I've got a solution. Initial results are quite promising and Load Video (Path) is even updating its preview as soon as attatched primitive nodes are changed. I'll push the change now since i'm not seeing any issues with the following considerations

  • This solution gives me the feeling that it'll break something else somewhere I'm failing to consider. I'll be watching very closely as a result
  • The results remind me of a prior request for itterative workflows where one output of a Video Combine is piped into a Load Video. This now seems very possible, but out of scope for this issue and of lower priority than current bugfixing.
  • Does this actually meet your request @GentlemanHu? The image shows other nodes I'm unfamiliar with taking the audio output of our nodes, but the audio output our nodes produce was not made with consideration for other node sets
image

That is pseudo-node, just for expressing ideas. Like audio manipulation, merge many audios to one audio stream...