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

Allow Sequential Images as Input and as Output #8

Open
Cygon opened this issue Dec 2, 2020 · 1 comment
Open

Allow Sequential Images as Input and as Output #8

Cygon opened this issue Dec 2, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@Cygon
Copy link

Cygon commented Dec 2, 2020

Currently, DAIN-Vulkan-CLI insists on taking a video file as input, so I end up doing

ffmpeg -framerate 25 -i "frames-720p-25fps/%08d.png" -vcodec v210 color-graded-720p-25fps-10bit.avi

and DAIN-Vulkan-CLI will unpack it back into images (using 8 bit PNGs instead of 16 bit PNGs...). It would be nice if I could provide a directory as input, similar to dain-ncnn-vulkan.

Same on the output side. It produces neatly interpolated images in a directory (8 bit PNGs though, would prefer 16 bit PNGs) that could then be fed to a super resolution AI. Instead, it insists not only on encoding a low-quality MP4, but also wipes the interpolated images out.

For reference, my command line was this, specifying an --output-folder, not an --output-file:

/opt/dain-vulkan-cli-0.0.5/DAINVulkanCLI \
        --input-file color-graded-720p-25fps-10bit.avi \
        --output-folder frames-rife-720p-100fps \
        --frame-multiplier 4 \
        --interpolator-engine rife-ncnn \
        --tile-size 736 \
        --input-fps 25

Thanks, by the way, for writing DAIN-Vulkan-GUI! It's very nice to have 3 AI interpolators in an easy, portable package and it's very fast, too.

@Mar2ck
Copy link
Owner

Mar2ck commented Dec 2, 2020

I can add an option to specify an input folder instead of an input file. That should be easy to add.

  • For the PNG handling, i could add support for extracting video to 16-bit PNGs but the problem is that the interpolators themselves will always output as 8-bit so there is a loss in quality i don't have control over. You would have to ask for 16-bit output support on one of the ncnn interpolator githubs.
  • If by "wipes out" you mean the interpolated images folder gets deleted, that is unintended behaviour and would be a bug. The program should leave the final interpolated images in "interpolated_frames" undeleted. If you want to just interpolate and don't want to create a video afterwards use --steps 1,2 since step 3 is video encoding
  • Right now the mp4 video quality is hardcoded as -crf 18 in ffmpeg but i plan to add an option for changing that

@Mar2ck Mar2ck added the enhancement New feature or request label Dec 2, 2020
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