Showing posts with label Video Capture. Show all posts
Showing posts with label Video Capture. Show all posts

Friday, July 16, 2021

Keeping the Upscale and Capture Pure - The RGB2HDMI and Digital PC Video Standards

When IBM was designing video display adapters for its IBM PC, it treated video quality as important.  While the world of displays was in 1980 essentially analog, IBM chose to use digital outputs for its IBM Monochrome Display and Printer Adapter and Color Graphics Adapter.  Later it continued to use a digital TTL interface for the IBM PCjr.'s built in video and its Enhanced Graphics Adapters.  Competitors and copycats, like the Hercules Graphics Card and the Tandy 1000's built-in video, also copied IBM's usage of the DE-9 port carrying digital color signals.  While some of the color cards had composite color video support, serious business usage demanded the use of a monitor which could accept those digital signals for the highest possible picture quality possible.  

By 1987, the limitations of the digital interface, with each color primary requiring a separate collection of wires, was too limiting for IBM's Video Graphics Array.  The connector was changed and the colors were output over an analog interface, which only required one pin per color primary.  The VGA analog video standard remained the principal way by which PCs connected their displays for over fifteen years.  By the time the digital DVI connector became popular enough to replace VGA, the older pre-VGA standards had been long consigned to the realm of retro-computing.  

Today the modern display device tends to eschew any display standard older than DVI, with most only having HDMI and DisplayPort inputs.  The digital standards of old used special CRTs, which have become expensive and often require repair or restoration due to age.  Those of us who enjoy working on retro computers are faced with having to "settle" for composite video, having to fork out large amounts of money and space for the special digital CRTs displays or use rather particular capture cards to see what was intended.  The RGB2HDMI is one really good solution for these issues, let's take a look at it.

Sunday, June 13, 2021

Making Your Famicom into the Best Famicom it can be : A/V Mods Done Right

Modifying the RF-Only Famicom to output separate video and audio is nothing new, people have been doing it since the 1980s.  But many mods I have seen involved video circuits of dubious quality, drilling and cutting into aged plastic and difficult to reverse without replacement parts.  In this blog post I will go over what I believe are the best ways to modify your Famicom for AV output.

Wednesday, February 6, 2019

Proper Analog Retro Video Capture with the Datapath E1/E1s

Capturing analog video can be a difficult task.  Analog video follows rather imprecise standards and is increasingly being discarded in today's world where 100% digital video solutions like HDMI and DisplayPort rule.  Capturing a digital signal is often simply a matter of buying a capture card/box and plugging everything in.  But capturing audio signals, at least those signals that do not conform to the "broadcast standards of 525/625i", is not quite so easy.  But while there exist inexpensive devices that can handle low quality composite and medium quality s-video sources, what about high-end analog sources like component video, 15KHz RGB and 31KHz VGA signals?  Moreover, are any of them compatible with 240p signals put out by retro consoles and home computers?  While there are affordable devices that can sort of handle these signals like the Startech USB3HDCAP, the results are often second rate.  But what if there was a device that you can acquire for similar cost and provide truly first-rate capture?  Interested?  Well if you are, read on to discover the power and the caveats of the Datapath VisionRGB E1 and E1s.

Saturday, April 7, 2018

Expanding Vintage IBM PC & Compatible Display Options - the GGLabs CGA2RGB Converter

GGLabs' CGA2RGB (courtesy of GGLabs)

Getting a high quality and proper video signal from an IBM CGA or EGA card or an IBM PCjr or Tandy 1000 without their specialized monitors can be difficult.  These computers used specialized RGB monitors to give a high quality solution using digital signals to tell the monitor which color to display.  Unfortunately this standard was not really adopted outside of the expensive PC compatibles and most RGB monitors only accept an analog signal.  When VGA and its analog RGB signal format became standard, support for the older digital RGB format went away.  In this blog entry I am going to examine an inexpensive converter that can help you adapt your vintage PC compatible's digital RGB video output to the more accessible analog RGB video output.


Sunday, February 25, 2018

Super Nt - Testing and Capturing

I had not planned on publishing a second blog entry on the Super Nt, but there were one or two issues I wished to address and the first blog entry was becoming very long.  So here is another blog entry discussing testing and capturing games on this increasingly wonderful device.


Sunday, February 4, 2018

StarTech USB3HDCAP Review - A Jack of All Trades?

The StarTech USB3HDCAP (courtesy of Amazon.com)
Capturing real hardware has always been something of a challenge, especially when it comes to retro video game consoles and computers.  I have been seeking an affordable "all-in-one" capturing solution for some time.  Recently I read about the StarTech USB3HDCAP and remarked that it could handle odd inputs like 15KHz RGB, 240p Component video and even 320x200 70Hz VGA.  I also read that the StarTech uses the same hardware as the more expensive Micomsoft X-CAPTURE 1 and the less-featured Elgato HD60 S.  I purchased a card recently and found that getting the best out of it is not quite as straightforward as I expected.  Here let me discuss what I have tried and how well it works.


Sunday, June 19, 2016

Recovering 240p from Video Capture Devices and Putting it Online

Video capture devices are often used to backup NTSC video sources like VHS cassettes and DVDs.  Many consumer level devices on the market have this purpose in mind.  You can use these devices to backup old video recordings, unprotected commercial video tapes and DVDs.  Your retro consoles and some computers also output an NTSC signal, but there is a substantial difference between the two.

Your standard NTSC-M video source uses a 480i resolution.  The picture is constructed from two fields, each containing half the data of a frame.  These fields are interlaced so that the odd lines of the frame are displayed first, then the even lines of the frame.  The eye usually cannot notice the interlacing effect when viewing a CRT TV screen at a reasonable distance.   In NTSC, there are 59.94 fields displayed in each second, half odd, half even.  This gives an actual frame rate of 29.97 frames per second.

All consoles from the Atari 2600 to the Nintendo 64 typically output 240p video.  Many computers, including virtually all the 8-bit home computers from Apple, Commodore, Atari, Texas Instruments, Timex Sinclair, Mattel and Coleco output 240p.  Some more advanced home computers, like the IBM PC with CGA, the IBM PCjr and Tandy 1000, the Atari ST, Apple //gs and Commodore Amiga also can output a 240p signal.  All these hardware devices output 240p do this by tricking the screen.  Instead of sending the proper signal for an odd and an even field, they send the signal for two odd fields.  The resolution is reduced to no more than 240 lines, and often there are fewer visible lines drawn and the rest of the lines are filled with a background color, often black.  On the positive side, the images are drawn twice as frequently, 60 times per second.  Because the screen is not evenly covered, scanlines are more visible in 240p than 480i.  This was not part of the NSTC-M standard, but works on every NTSC CRT TV and monitor ever made and most LCD monitors and TVs that could accept a composite input until recently.


Saturday, November 15, 2014

Youtube No Longer Sucks for Retrogaming Videos

Last year, I made this blog post, http://nerdlypleasures.blogspot.com/2013/10/youtube-sucks-for-retrogaming-videos.html, 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 :

https://www.youtube.com/watch?v=I16xSHMKaLc&feature=youtu.be

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 :

https://www.youtube.com/watch?v=jE_IZNHUu08&feature=youtu.be

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 :

https://www.youtube.com/watch?v=uH8RPoEo_Mc&feature=youtu.be

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.

Wednesday, October 30, 2013

Youtube Sucks for Retrogaming Videos

When it comes to videos showing footage of real retro PC and console games, Youtube and the other major video sharing sites suck.  Here is why :

1.  Standard Definition Frame Rate and Aspect Ratio

Normal TVs output a standard resolution : a 525/480 (output/visible) line resolution interlaced at 29.97Hz for NTSC and a 625/576 line resolution at 25Hz for PAL.  The video is interlaced, with odd lines of a frame being displayed first, then the even lines.  Although the TV may be drawing lines 50-60 times per second, the actual number of frames in video is 25-30 per second.  The horizontal resolution with analog broadcast or recording equipment (tape) could be anywhere from 300-600 color dots per line.  Eventually, by the time of DVD, NTSC and PAL video would be able to display 720/704 horizontal dots, and the 4:3 aspect ratio would constrain the visible pixels to fit within the frame.

When Youtube and other video sharing sites were first being implemented, this was the maximum resolution they supported.  In the beginning, with many amateur filmmakers using whatever kind of video equipment they could find, this was not really a big deal.  Youtube also supported 320x240 and 480x360 resolution modes in addition to a 640x480 resolution mode.

Eventually Youtube added support for 720 and 1080 line modes and 16:9 widescreen modes.  In fact, all videos are shown in the 16:9 video window, and 4:3 content is pillarboxed.  All videos can use be seen in any of the following formats :

192x144*
256x144
320x240*
428x240
480x360*
640x360
640x480*
854x480
960x720*
1280x720
1440x1080*
1920x1080

* - Pillarboxed resolutions

While Youtube describes its resolutions as 720p and 1080p, the maximum frame rate is 30 non-interlaced frames per second.

2.  Home Computer and Console Frame Rate

Every computer and classic console prior to the Sega Genesis and Super Nintendo almost exclusively output a video signal at either 60 frame per second for NTSC systems or 50 frames per second for PAL systems.  Thus the Atari 2600 usually supported a 160x192 resolution, the Apple II, 280x192, the Atari 8-bit,  320x192, the Commodore 64, 320x200, the IBM PC with CGA 640x200, the Colecovision and Sega Master System, 256x192 and the NES, 256x240.   The Sega Genesis and Super Nintendo did support high resolution interlaced graphics, but games stuck with the low resolution modes 99.9% of the time.  Some home computers like the Amiga and add-on cards like the IBM 8514/A did support an interlaced signal, but this was rarely used due to the flicker perceived by the short distance between the user's screen and eyes.  These early consoles and computers traded graphic resolution for frame rate, primarily to reduce distracting flicker.  Handheld consoles like the Gameboy, Sega Game Gear, Nomad, Gameboy Advance all support 60 frames per second.

The IBM PC and compatibles did not vary refresh rate by country but instead by display adapter.  The monochrome and Hercules cards used 50Hz, the CGA, PCjr., Tandy 1000 and EGA adapters 60Hz and the VGA, SVGA and later adapters 60Hz, 70Hz, 72Hz, 75Hz, 85Hz.  When LCDs overtook CRTs in computer display technology, 60Hz to 75Hz was generally deemed sufficient for fluid gameplay, as flicker was no longer an issue.  3D screens in 3D mode use 120Hz because twice as many images are being displayed.

For gaming consoles, only with the Playstation, Nintendo 64 and Sega Saturn did interlaced modes show some significant use, but they did not truly become popular until the Playstation 2.  Most Dreamcast and Gamecube and Xbox games could be played in 480p progressive scan (60 frames per second) through the use of special VGA or component video cables.  A much smaller proportion of games for the Playstation 2 support progressive scan.  The Nintendo Wii supports 480p over component video cables and the Playstation 3 and Xbox 360 generally use 720p for HD games.

3.  The Problems

If you post game footage to Youtube, either taken by a video capture device or an emulator, Youtube is going to convert your video.  Since it will not display native 60 frames per second video, it will convert it to 30 frames per second.  This can be done by dropping every other frame, or by interpolating two or more adjacent frames to make one frame.  However, as either method would cut the running time in half, each frame may be repeated.  This plays havoc with the motion within the game footage.  It looks jumpy as though it was being played on a poor emulator.

The other issue is the scaling algorithms used.  Say I take some emulator footage of a NES game.  The emulator has no filters, no scalers, just pure 256x240 graphics at 60 frames per second.  The pixels are crisp, sharp, clear.  Each pixel is the same size and each color is clearly distinct.  This is the purest form of capture you can get, provided of course you use an accurate emulator like Nintendulator or Nestopia.  The resulting video may be losslessly compressed, but Youtube does not display losslessly compressed video, no matter how small it may be.  DOSBox 0.74 and Yhkwong's SVN has a lossless video codec which it uses to record, and since DOSBox is highly accurate, it is by far easier to capture video from DOS games using it, especially pre-VGA, than from real hardware.

I posted a test video here : http://www.youtube.com/watch?v=zOffjiGXhBQ  This video was originally recorded using Nestopia - Undead Edition 1.45, a very accurate emulator.  I decided to use the 2C03 RGB PPU palette (without the extra grays Nestopia inserts) to simulate as accurately as possible the ideal capture from the real machine using the highest quality output that would be readily available.  The 2C02 PPU, found in every consumer-based NES or Famicom except the Famicom Titler, can only output composite video.

While most of my run through the stage is not too bad, things really start to look wrong when Mega Man fights the boss.  There is a fair amount of flicker on real hardware or the emulator as this part of the game really goes beyond the 64 sprite limit of the NES.  However, the result is nowhere near as bad as the the video makes it out to be, and just ends up distracting.

In addition, my video was pixel perfect, no interpolation shown when viewing it at its native resolution.  Youtube does not offer an "exact size" setting for the video window.  To be fair, 256x240 is really too small to watch unless you have a low resolution monitor.  However, there is no x2 or x3 scaling available.  The smallest window size is 384x360, the larger window size is 512x480 (an ideal 2x) and the full-screen mode is whatever the native resolution of your monitor is with pillarboxing.  All scaling uses typical bilinear or bicubic sampling, so what were sharp pixels appear fuzzy.  Nearest neighbor interpolation is easier computationally, but not available.

If you download an MP4 of the video, and there are many utilities you can use to do this, you can see the video in its native size without interpolation.  It will appear sharp.  However, Youtube's conversion process has done its damage to the frame rate, which as you will now see is 30 fps.  Here you can compare for yourself :

[links removed]

Unfortunately, if you wanted to see my playthrough video at it was meant to be seen, you cannot view it in a browser, you must go to the trouble of downloading it.  And this is with a perfect video capture.  Captures from real hardware frequently look like crap between the capturing device (most not designed for vintage consoles and computers and not designed for pixel-perfect accuracy, if that can be done for analog video) and Youtube's conversion.  I used to host videos of my classic computers on Youtube, but since I only had a cell phone camera (which will take video only at 30fps), the video always looked bad and flickery, something Youtube can do nothing to improve.  To be fair, it was not Youtube's fault, so I took them down.

Nestopia and DOSBox use the ZMBV capture codec to capture video with lossless compression and the accompanying audio.  It is an excellent way to capture 8-bit video, and for NES video, the resulting file size is an average of 7MB per minute.  If you did a two-hour playthrough of a game, the resulting file size would only be 840MB at the native resolution and frame rate.  This is a very reasonable file size, and while Youtube does recognize ZMBV encoded AVI files, it will compress them and the first casualty will be the frame rate.