Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video generator requests #18

Open
XeonG opened this issue Jan 20, 2023 · 21 comments
Open

Video generator requests #18

XeonG opened this issue Jan 20, 2023 · 21 comments
Labels
enhancement New feature or request

Comments

@XeonG
Copy link

XeonG commented Jan 20, 2023

Glad you added that in was just gonna write a tool to automate making them into videos after doing them manually with ffmpeg..

if you could add an option to have the last remaining image or finaly image hold for x seconds.. that would be good.. actually even an option to have the final image at the start hold before showing the step progress.. just some added options like that thanks

@AlUlkesh AlUlkesh added the enhancement New feature or request label Jan 20, 2023
@XeonG
Copy link
Author

XeonG commented Jan 21, 2023

Could I make another suggestion aswel..

If you add the HiRes option.. the video generated only uses the intermediate imagers from the hires... would be nice if the original resoltuion generation of intermediate steps would be included from the first image, and then after the final image that the hires step images afterwards.. that way you get the whole process from start to finish... obviously the it would be better if the video resolution is at the hires size.. so the original 512x generated ones would be resized ?

AlUlkesh added a commit that referenced this issue Jan 24, 2023
@AlUlkesh
Copy link
Owner

@XeonG This commit contains your first feature request. Please let me know, if it works as expected.

About HiRes: Yes, I'm also not happy with the current solution. I'll try to see, what can be done.

@XeonG
Copy link
Author

XeonG commented Jan 24, 2023

yes thanks that works great...

"About HiRes: Yes, I'm also not happy with the current solution. I'll try to see, what can be done."

The other option I'd be happy with is splitting the first 512x (or whatever res) generation and the video from that into one file, and then if hires is on another video file? with option to join or split?

@XeonG
Copy link
Author

XeonG commented Jan 26, 2023

Could you adjust it something like that...

Display last final image at the start for additional frames [checkbox to enable]
10
Display last final image for additional frames [checkbox to enable]
50

Would be better like that imo.. mainly because I'd like to not have the start frame hold for as long as the ending frame...

@AlUlkesh AlUlkesh changed the title Like the video generator just one req Video generator requests Jan 26, 2023
AlUlkesh added a commit that referenced this issue Jan 26, 2023
@AlUlkesh
Copy link
Owner

AlUlkesh commented Jan 26, 2023

Yes, it's more flexible like that. The checkbox is not necessary IMO, setting the value to 0 does the same.

Should work in the latest commit.

AlUlkesh added a commit that referenced this issue Jan 26, 2023
@AlUlkesh
Copy link
Owner

I decided to completely remove the lores/hires distinction. This make things much easier and smoother I think.

@XeonG
Copy link
Author

XeonG commented Jan 29, 2023

well.. I think I like having the options.. just because I often play with having hires on and off.. and a bigger reason is that having the hires option on.. can often be completely different from the original low res one.. to the point rather just skip showing the lowres one or the hires one depending..... but sometimes only lowres one is interesting as an animation.... but if I have it on its nice to get the results from the usual 512image generation one and then the hires one to see both in animation.... ideally I'd like to be able to split the video and have a merged one of them both like it does currently now so 3 different videos, lowres, hires (if on), and combined lowres+hires (if on).. basically the option to have it generate a low res video option, hires video only option and combined low & hires one?... failing that just a .bat file dumped in the image folder with the ffmpeg args for lowres,hires and both?... on windows it would be useful as its harder to use like '*' file name.. and there is no option in ffmpeg to set the filename to be part of the original filename.. ie is no default ffmpeg arg to output that.. without some external script supplying the output filename...

well anyway if you're bored and want to add some more options to it..

@AlUlkesh
Copy link
Owner

XeonG: And just another request.. could you support saving the last known settings chosen for everything in the script.. find myself often having to reclick and enter the same things for all the settings.. hopefully it can be supported.

AlUlkesh added a commit that referenced this issue Feb 2, 2023
@AlUlkesh
Copy link
Owner

AlUlkesh commented Feb 2, 2023

And just another request.. could you support saving the last known settings chosen for everything in the script.. find myself often having to reclick and enter the same things for all the settings.. hopefully it can be supported.

Well, I think I got it to work. Oddly enough, while webui does save the components' values, it only does it the very first time it is created and then always only loads that.

So I worked around that... There's a save button now and to restore to your last saved settings you have to "Reload UI".

@XeonG
Copy link
Author

XeonG commented Feb 4, 2023

nice thanks!

@AlUlkesh
Copy link
Owner

ideally I'd like to be able to split the video and have a merged one of them both like it does currently now so 3 different videos, lowres, hires (if on), and combined lowres+hires (if on)

I just implemented part of that. For video you can now set lores-only, hires-only or lores+hires. If you want lores-only and hires-only in separate files, you'll have to run it twice.

@XeonG
Copy link
Author

XeonG commented Feb 20, 2023

" If you want lores-only and hires-only in separate files, you'll have to run it twice." yeah damn that is annoying.. only reason is batching it would be nice if it could do 3video encodes ie low only, high only and both.... would still be quicker than going through redoing the seed again with saving out the steps again ... or just a .bat/.sh file with the ffmpeg commands for low, high and both.. which would almost be better as I often go through them later and the video encoding done manually running a bat file would be in a way quicker and less time spending encoding batches that wouldnt' have been kept anyway.. but I dunno how the script works.. just my thinking is that if the steps are done for lo/hi then must be possible?

@AlUlkesh
Copy link
Owner

The challenge with this was, that ffmpeg only accepts a numbered series of images, if the number is increased by exactly one. Combined with the requirement for an option to repeat the first and last images, I came up with the idea of renaming (and in case of the repeats to copy) the files just before the ffmpeg and restore the previous state after.

However, if you don't care that you can't see the step number in the filename anymore, I could put in an option to skip the restoring part and write some batch files instead. Let me know...

@XeonG
Copy link
Author

XeonG commented Feb 22, 2023

Well the only thing I can say is that I do like the step number in the file name.. but so long as the final end result for low res and high res image is still there in the folder I could find them without the step number in the file name. Will the encoding videos still be a built in option to have on? but with the option for batch files scripts to be written aswel?

@AlUlkesh
Copy link
Owner

Yes, that would be in addition. Step number is also stored in the pnginfo btw.

AlUlkesh added a commit that referenced this issue Feb 26, 2023
@AlUlkesh
Copy link
Owner

AlUlkesh commented Feb 26, 2023

Here's the bat-files option:
image

@XeonG
Copy link
Author

XeonG commented Feb 26, 2023

Thanks will give it a go now 👍

@XeonG
Copy link
Author

XeonG commented Feb 26, 2023

ok.. checked it out.. so the plus side is that I can now run the 'lo' .bat and just get the video fo the lo res version while still having the option of the 'lohi' version and a bat file to just get the 'hi' res version

downsides seem to be .. if 'lo' or 'hi' aren't ticked then or make video.. then the .bat file isn't genereted.. meaning doesn't appear to be a way to get the lo, hi .bat files without it also encoding a video aswel?.. and probably the worst thing is that it generates duplicated frames for the options "Display last image for additional frames at the beginning" etc... which I guess is how you did it original and deleted them?

I was sure there was some options in ffmpeg to have it duplicate a frame for x time.. but having also looked at it once, the way of setting options in ffmpeg seems a like a complete mess and what I saw on stackoverflowing for acheiving it didn't look pretty.. so I dunno it kinda defeats the option of not having the encoded video files if the duplicated .png images are taking up more space than the encoded videos..

I guess the option to just have it encode a lo res, hi res, and lo+hi res video would be better as an option and not have all the extra step files that are duplicated?

AlUlkesh added a commit that referenced this issue Feb 26, 2023
@AlUlkesh
Copy link
Owner

I put in an option to not encode the video, if you're doing bat-files:

image

The file copies take up zero disk space. Because they are not copies, they're links:

image

@XeonG
Copy link
Author

XeonG commented Mar 2, 2023

cool what is that link properties tool called?

also is there no way to get the 3rd bat option that encodes both lo and hi res.. much like the built in one does if lo and hi are ticked?

@AlUlkesh
Copy link
Owner

AlUlkesh commented Mar 5, 2023

@XeonG

also is there no way to get the 3rd bat option that encodes both lo and hi res.. much like the built in one does if lo and hi are ticked?

I can't think of an easy way to do all versions at the same time. To have lo and hires separated you need a numbering scheme that sets these two apart. To do both you'd need one with an uninterrupted numbering scheme.

cool what is that link properties tool called?

Well, in python I use os.link. On windows you can use the mlink command with the /H parameter.

You can also install the Link Shell Extension, that one puts useful things into the context menu:
https://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants