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

ffmpeg extraction fails to start if missing extracted frames folder with custom paths #39

Closed
cr08 opened this issue Feb 26, 2019 · 7 comments
Assignees
Labels
type:Enhancement New feature or request

Comments

@cr08
Copy link

cr08 commented Feb 26, 2019

Found out with the custom extracted and upscaled frames folders if those are missing, at the very least the ffmpeg extraction step fails. Not sure if waifu2x-caffe will do the same as I did not get that far. Where this comes in is the end of the script when it wipes those folders, it'll do so whether using the temp directory or custom paths. In a batch this is a no-go.

I've done a potentially crude fix for this which I'll try and do a PR for. You may wish to do a cleaner version of course. :)

@k4yt3x
Copy link
Owner

k4yt3x commented Feb 26, 2019

Oh yeah I should add the function to create folders automatically if they're missing.
I'll add that into the next commit and push it with the fix for #28 .

@k4yt3x k4yt3x self-assigned this Feb 26, 2019
@k4yt3x k4yt3x added the type:Enhancement New feature or request label Feb 26, 2019
@k4yt3x
Copy link
Owner

k4yt3x commented Feb 26, 2019

I saw your code review, and I've already finished adding the features.
I came up with something more complicated and fault-tolerant.
I'll just make some more tests before releasing the new version.

@k4yt3x
Copy link
Owner

k4yt3x commented Feb 26, 2019

I have just released version 2.4.2.
Problem should be solved.

@k4yt3x k4yt3x closed this as completed Feb 26, 2019
@cr08
Copy link
Author

cr08 commented Feb 28, 2019

One minor addition to this to request: Adding either a command line or config option to skip the "Create folder/directory?" request. Currently this breaks batching the script when intending to use custom paths.

@k4yt3x
Copy link
Owner

k4yt3x commented Feb 28, 2019

By design, if you have the destination folder created, it shouldn't prompt you. Is it not working properly?

@cr08
Copy link
Author

cr08 commented Feb 28, 2019

Part of the original concern is there in which regardless of whether the temp folders are used or custom paths, they are deleted at the tail end of the script. Specifically this section of code:

https://github.com/K4YT3X/video2x/blob/ecb65aad35e51490e160af272084831368576891/bin/upscaler.py#L72-L80

So I can create the custom folders I wish to use for extracted and upscaled frames, but when the script finishes it will delete these outright and the next cycle it will ask to create those because they no longer exist.

@k4yt3x
Copy link
Owner

k4yt3x commented Feb 28, 2019

Maybe you can set "preserve_frames" to true in the config file?
That might be the cheapest solution to this problem for now.

I'll look into adding an option for it, or make changes that will make this problem go away.
Also, please open a new issue as this is a separate topic from the original one. Opening a new issue also helps organizing my work.

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

No branches or pull requests

2 participants