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 AI Upscaling #4

Open
GrahamboJangles opened this issue Jul 9, 2022 · 1 comment
Open

Video AI Upscaling #4

GrahamboJangles opened this issue Jul 9, 2022 · 1 comment

Comments

@GrahamboJangles
Copy link
Contributor

GrahamboJangles commented Jul 9, 2022

@KnightDanila You're smarter than me, maybe you can figure it out.

Step 1: Output frames from video:

REM https://forum.videohelp.com/threads/344457-can-t-get-ffmpeg-to-convert-video-to-image-sequence#post2177407

ffmpeg -i %%x -r 0.10 -f image2 -s 1280x720 %%4d.jpg

Increase the -r value to get more frames.

Step 3: output photos to a folder

can't figure out

Step 4: take the folder of photos and upscale them

Can't really figure out. Only figured out how to do one image at a time:

AI Upscale single image:

Using https://github.com/nihui/realsr-ncnn-vulkan

I've found this has more realistic results than waifu2x.

realsr-ncnn-vulkan.exe -i input.jpg -o output.png -s 4

Using https://github.com/nihui/waifu2x-ncnn-vulkan

REM https://github.com/nihui/waifu2x-ncnn-vulkan#usages

REM -i is input, -o is output file, -n is noise level, -s is scale factor
REM -v is verbose output, -h is help, -x is tta mode (reduce artifacts, longer processing time)
waifu2x-ncnn-vulkan.exe -i %%x -o "%%~nx_output_ai_upscaled%%~xx" -n 1 -s 4 -v

Step 4: Convert images to video

ffmpeg -r 1/5 -i %%4d.jpg -c:v libx264 -vf fps=25 -pix_fmt yuv420p out.mp4
pause

To do:

  • output photos to a folder
  • automatically take the folder of photos and upscale them

Alternative software for AI upscaling video that I have tested:

https://github.com/AaronFeng753/Waifu2x-Extension-GUI

@KnightDanila
Copy link
Owner

I also work on this :D
I think soon I will figure out how to make it :)
I am testing waifu and will test it too, thanks

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