In this article, we will guide you through the process of performing free AI video upscaling on a Macintosh using waifu 2X and FFmpeg. This straightforward tutorial will provide you with detailed steps, tailored specifically for the MacOS platform, addressing its unique security features.
Start by creating a new folder to store all the required programs and your video files. You can create a new folder by pressing Shift + Control + N
or by navigating to File > New Folder
in Finder.
Rename the created folder to waifu 2X.
Now let's download the necessary programs:
Waifu 2X: Visit the waifu 2x Vulcan implementation page to download the Mac OS version. Ensure you allow the download from GitHub if prompted.
FFmpeg and FFprobe:
To run commands in the Terminal, adjust your Mac's security settings:
Open System Settings and navigate to Privacy & Security > Full Disk Access.
Click the plus sign (+) to add apps, and search for the Terminal application in /Applications/Utilities/Terminal
. Make sure it's granted full access.
Launch the Terminal application, which can be found in Finder > Applications > Utilities > Terminal.
Open the waifu 2X folder in Finder to keep everything organized during the command line process.
In the Terminal, navigate to your Downloads folder and copy the contents of the waifu 2X folder into your newly created folder on the Desktop.
Also, drag and drop the downloaded FFmpeg and FFprobe files into the waifu 2X folder.
To avoid being prompted for permission repeatedly, run the following command in Terminal:
sudo spctl --master-disable
Enter your password when prompted. This step allows you to issue commands without further interruptions.
Create three subdirectories within the waifu 2X folder for better organization:
mkdir video frames scaled
Move your video file (preferably in .mp4 format) into the video directory and rename it to video.mp4 to simplify the command lines.
Use FFprobe to gather the details about your input video:
cd video
ffprobe video.mp4
Note the Frames Per Second (FPS) value as you will need it for re-encoding.
Run the following FFmpeg command to convert your video into individual frames:
ffmpeg -i video/video.mp4 frames/frame%06d.png
To upscale the frames, execute the waifu 2X command:
./waifu2x -i frames/ -o scaled/ -n 2 -s 2
Next, extract the audio from the original video:
ffmpeg -i video/video.mp4 audio.mp3
Finally, reassemble the video using the following command while ensuring to replace the frame rate with the value you noted earlier:
ffmpeg -framerate 29.97 -i scaled/frame%06d.png -i audio.mp3 -c:v libx264 -crf 16 -pix_fmt yuv420p video/upscale.mp4
You now have your original video upscaled to a higher resolution utilizing free tools on your Mac! Enjoy the enhanced visuals that come with the power of AI.
Q: What does waifu2x do?
A: Waifu2x is an AI-based tool that enhances the resolution of images and videos.
Q: Do I need additional software besides waifu2x and FFmpeg?
A: No, those two are sufficient for the entire upscaling process.
Q: Can I use video formats other than MP4?
A: Yes, FFmpeg supports a wide variety of video formats. However, it is recommended to use MP4 for ease.
Q: How long does the upscaling process take?
A: The processing time depends on the video length and computer performance. It can take a few minutes to several hours for longer videos.
Q: Is the process the same for other operating systems?
A: The overall process is similar, but there may be variations in command syntax or needed adjustments based on the OS.
In addition to the incredible tools mentioned above, for those looking to elevate their video creation process even further, Topview.ai stands out as a revolutionary online AI video editor.
TopView.ai provides two powerful tools to help you make ads video in one click.
Materials to Video: you can upload your raw footage or pictures, TopView.ai will edit video based on media you uploaded for you.
Link to Video: you can paste an E-Commerce product link, TopView.ai will generate a video for you.