DAIN-Vulkan-GUI icon indicating copy to clipboard operation
DAIN-Vulkan-GUI copied to clipboard

Allow Sequential Images as Input and as Output

Open Cygon opened this issue 5 years ago • 1 comments

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.

Cygon avatar Dec 02 '20 15:12 Cygon

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 avatar Dec 02 '20 22:12 Mar2ck