Saturday, November 15, 2014

Youtube No Longer Sucks for Retrogaming Videos

Last year, I made this blog post,, when I complained that Youtube will cut the frame rate of your video in half.  Anything recorded in 60 frames per second will be converted and shown at 30 frames per second.  This can have an awful effect on the resulting video.  Flicker, a frequent issue in retro consoles, will make sprites disappear when, with the full frame rate and proper persistence of vision, they would not completely disappear.

As of October 29, 2014 (a year and a day from my original post, now coincidence there), Youtube now supports 60fps with 720p and 1080p resolution video.  Strangely, it does not support it in lower resolutions, 144p, 240p, 360p and 480p.  However, by upconverting lower resolution videos into higher resolution, we can preserve the resolution of the video and the frame rate.  Take, for example, this sample video I created :

The maximum resolution is 720p60(fps).  For once Youtube is not hiding the frame rate anymore.  So how did I get this?

First, I recorded gameplay footage using an emulator that can record to AVI and that supports DOSBox's ZMBV Codec.  This Codec is very friendly to 8-bit graphics, and can provide lossless video compression.  For NES emulators, Nestopia Undead Edition, when the Movie Capture function works, it works perfectly.  Record the movie, export it to AVI and select the DOSBox ZMBV Codec.

Now you should have an AVI video, but the resolution is 250x240@60fps.  We need to convert it to something that Youtube will allow to be viewed at 60fps.  Fortunately, 240 x 3 = 720, which is the vertical resolution of 720p.  256 x 3 = 768, so we will need to add borders to our video to get to the full 1280x720 resolution Youtube demands of the video.  VirtuaDub is a good program to accomplish all this.  The last version of VirtuaDub is 1.10.4, and it only works with AVI files.  Load your AVI file, go to the Video drop down menu, then Filters, and select resize.  On the options dialogue for filters, use New size Relative 300%, Aspect ratio Same as source and under Framing options, Letterbox/crop to size 1280x720.  (If you want 1080p, use Relative 400% and Letterbox to 1920x1080.  I am not sure whether 1200p is supported in Youtube at 60fps)  I would suggest using nearest neighbor as the Filter mode, you should keep your video sharp, Youtube will compress it losslessly.

Next, under the Video drop down menu, there is an option for Color Depth.  You should select 16 bit RGB (5,5,5) or 32 bit RGB (8,8,8 dummy alpha channel), depending on the amount of color your video has.  For NES and SNES games and systems of similar vintage, 16-bit RGB is fine.  Then,  under the Video drop down menu, click on the Compression option.  Select Zipped Motion Block Video 0.1 (that is what ZMBV stands for).  This is the DOSBox compression codec, and it will produce great results.

Finally, go to the File drop down menu, click on Save to AVI.  Type in the name of the resulting AVI file and watch VirtuaDub do its thing.  When the Progress bar is totally green, you will have your HD file.  All you need to do is to upload it to Youtube and tell people to watch it in HD.  Of course, if you want to edit it, add audio commentary or whatever, feel free to do so, but this method will allow you to display 60fps video of retro consoles without difficulty.  It also works with most computer emulators such as DOSBox.  The CGA, EGA, Tandy and PCjr. machine types output 60fps using DOSBox's movie capture function.  The vgaonly and SVGA, on the other hand, outputs to 70fps in most modes, which Youtube does not support.  You should use one of the earlier machine types for any non-VGA mode so you only really need to worry about games using the 320x200x256, 640x480x2 and Mode X modes.  VGA 640x480 runs at 60fps as may SVGA modes unless they allow you to set the refresh rate.

Those videos with output by DOSBox in 70fps will have to be converted to 60fps, which will not affect most games because they only put out as many frames of animation as they need.  For games using any 320x200 modes, you should resize it to 1600x1200 to obtain the correct 4:3 aspect ratio.  Even though a VGA upload will not be perfect, the results are still very good, as you can see here :

Additionally, the Hercules machine type and all PAL console emulators output 50fps.  Fortunately, Youtube supports 50fps as well as 60fps, as you can see here :

While Youtube may not be the perfect video uploading service for retrogaming videos, with support for 50fps and 60fps, although requiring HD, it has come a long way to remedy one of the worst video quality problems for retrogame footage.  While I believe Dailymotion may also support high frame rate videos, few other video sharing sites do, and Youtube is the one that earns the most traffic.  I would hope that the site would eventually add support for low resolution videos (which would allow for smaller files and save bandwidth), but today with simple conversion tools, viewers need no longer suffer from jerky motion, unnatural movement and disappearing sprites.

1 comment:

  1. Excellent advice, but don't ever use 16-bit. No matter the number of individual colors used in the video, 16-bit will quantize them. Always use 24-bit or higher.