Рет қаралды 9,036
For detailed Windows and Linux instructions see this video:
• FREE AI Video Upscalin...
Websites used:
github.com/nih...
ffmpeg.org/dow...
NOTE: Lines that start with // are comments and NOT commands. Don't paste these in!
// First Create a waifu2X directory on the desktop
// Change System Settings, Privacy & Security, Full Disk Access and add the terminal program
// Now open the terminal and change Terminal directory to Desktop/waifu2x
// Turn off command security
sudo spctl --master-disable
// Create the needed subdirectories
mkdir video
mkdir frames
mkdir scaled
// Copy your MP4 video into waifu2x/video directory and rename it video.mp4
/ Get info about video: i.e. frame rate and dimensions
./ffprobe video/video.mp4
// Extract images to our frames folder
./ffmpeg -i video/video.mp4 frames/frame%06d.png
// Extract audio to our video folder
./ffmpeg -i video/video.mp4 video/audio.mp3
// Scale images: -s valid options are 1 2 4 8 16 or 32
./waifu2x-ncnn-vulkan -i frames/ -o scaled/ -n 2 -s 2
// Put video back together lower -crf means better quality but larger file sizes
// MAKE SURE YOU CHANGE THE FRAME RATES FROM 24 TO THE ACTUAL VIDEO
FRAME RATE!
./ffmpeg -f image2 -framerate 24 -i scaled/frame%06d.png -i video/audio.mp3 -r
24 -vcodec libx264 -crf 16 video/upscaled.mp4
// Turn security back on
sudo spctl --master-enable