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

Resume interpolation job based on existing frames generated #36

Open
sanchezelton opened this issue Nov 26, 2021 · 1 comment
Open

Resume interpolation job based on existing frames generated #36

sanchezelton opened this issue Nov 26, 2021 · 1 comment

Comments

@sanchezelton
Copy link

sanchezelton commented Nov 26, 2021

Some of the video files that may be worked with may be incredibly large, gigs of data. As a user, in order to deal with situations where time might be otherwise wasted by a system crash or the system must go offline, I want rife-nccc-vulkan to resume the job from the last fully generated interpolated frame when running:

mkdir input_frames
mkdir output_frames

# find the source fps and format with ffprobe, for example 24fps, AAC
ffprobe input.mp4

# extract audio
ffmpeg -i input.mp4 -vn -acodec copy audio.m4a

# decode all frames
ffmpeg -i input.mp4 input_frames/frame_%08d.png

# interpolate 2x frame count
./rife-ncnn-vulkan -i input_frames -o output_frames

If the above command for rife-ncnn-vulkan is run in verbose mode and terminated early (with Ctrl-C), then run again, at current ALL frames are regenerated a second time although the existing frames (except for the last one, which should be regenerated).

@sanchezelton sanchezelton changed the title Pause and resume job Resume interpolation job based on existing frames generated Nov 26, 2021
@KeygenLLC
Copy link

Yes, this would be very useful for those of us who work with a lot of data and large videos.

I use uncompressed image sequences and it would be nice to have some kind of --keep flag, or --ignore (existing).

Could also allow setting which frame to specifically resume on with an int:
./rife-ncnn-vulkan -i input_frames -o output_frames --keep --resume 01257

Actually, you could simplify it by the use of one --resume flag that will automatically ignore the last frame, or only overwrite the last frame generated to make sure it wasn't corrupted. I would opt for the overwrite of the last frame, standard or as an option, in case someone needs to start overwriting earlier in the sequence for some reason. It would save time not having to manually trash files.
./rife-ncnn-vulkan -i input_frames -o output_frames --resume
./rife-ncnn-vulkan -i input_frames -o output_frames --resume 01257
./rife-ncnn-vulkan -i input_frames -o output_frames --resume 01257 --overwrite

Not sure if this could work in arguments...
./rife-ncnn-vulkan -i input_frames -o output_frames --resume 01257,overwrite
or
./rife-ncnn-vulkan -i input_frames -o output_frames --resume "01257 overwrite"

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

No branches or pull requests

2 participants