Author Topic: How to resize pixel art/game footage and keep the sharp pixel edges in a video  (Read 16499 times)

0 Members and 1 Guest are viewing this topic.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3695
Since I work with video a lot (as you may have guessed from my "JonLeung1" YouTube channel), and talk about games often, I've wondered about the best way to resize pixel art and game footage in a video, without distorting the pixels' edges.  You know, without blurring or smoothing.  Adobe Premiere Pro is made with working with typical video in mind, so the smoothing effect is typically nicer than pixel-resizing, but when dealing with pixels specifically as pixels, as in perfect squares with nice, sharp edges, you actually don't want them smoothed at all.  There doesn't seem to be a visible option to toggle this, however.

I was asking @NESAtlas/Atlas Videos about it, since his channel obviously has game footage.  I'd actually asked about it earlier, and he did offer an ffmpeg solution, but before he could remind me of the details, I stumbled upon Vizual PixelPerfect by Autokroma.  It's a plugin for Adobe Premiere Pro, and it seems to do what I need.

Once installed, when in Adobe Premiere Pro (I'm using Adobe Premiere Pro 2022), and editing a video, go into "Effects -> Video Effects", and now there's "-> Autokroma -> Vizual PixelPerfect". Apply it to the original pixelly clip, then in the Effect Controls, choose "Scale" and set it to whatever size (so, 9.00 was used in the example below), and you can also change "Interpolation algo", but I've left it at "Nearest".

The result can be seen in this screenshot (taken in VLC Player) of the outputted 4K clip.  The original footage was an uncompressed 256 x 224 .AVI from EmuHawk, but now it has been scaled up by 9 by Vizual PixelPerfect to be 2304 x 2016 pixels.  If you zoom right in with an image editor, you can see it's not actually PERFECT; there's a pixel-width of distortion at most, maybe I missed a setting, or maybe that's a VLC thing?  Anyway, it's certainly the simplest solution that is good enough for my purposes.

You can click on this example image to enlarge it and see how well it turned out:



(This particular clip I'm using is from Mario's Time Machine (Super NES), and just from the dialogue alone, you can probably guess why it will show up in an upcoming YouTube video...)

Also, if you're curious, the original video, being an uncompressed .AVI, is 123 MB for only 12 seconds at 256 x 224.  After running it through Adobe Premiere Pro with no editing, just resizing by how I described it above, to the largest integer to fit within 4K (3840 x 2160), the output is an H.264 .MP4 which is only 19.3 MB.  That's over 6.37 times smaller for an image now nine times larger (in both dimensions, so actually 81 times larger), which is really an improvement by a factor of 516 in terms of pixels-per-byte (and that's not even counting all the pixels used for the empty space).

I'm posting this here as a reminder if I ever need to reinstall Adobe Premiere Pro, and from what I've seen on the Internet, might answer an often-asked question that is not answered enough.  There are a lot of people now that do YouTube videos with game footage, but not everyone does it this cleanly, so I'm spreading the word.  Hooray for pixel-perfect upscaling/resizing!
« Last Edit: March 27, 2023, 11:50:44 am by JonLeung »