VOGONS


First post, by clb

User metadata
Rank Member
Rank
Member

Hey all,

it has been a recurring topic here at Vogons to ponder how to capture non-60Hz DOS VGA content and how to do pixel perfect captures of DOS games. On this front, I would like to showcase a recording that I made from a real 486 PC playing the fantastic Foray in the Forest Commander Keen fanmod.

The attachment fitf_1920x1200_70.362.png is no longer available

- Direct video download: foray_in_the_forest_1600x1200_70.362hz.mp4 (109MB, H.265 video, 1600x1200 70.362Hz). Right-click and Save As... to download, and use VLC Player to view it.
- YouTube: https://www.youtube.com/watch?v=cynlFTtbI20 (YouTube re-encodes as VP9 1600x1200 60Hz)

This data is not from DOSBox or from any other emulator, but captured directly from my 486 PC, 80 MHz Cyrix, Hercules Stingray Pro ARK1000PV graphics card:

The attachment crt_terminator_showcase.jpg is no longer available

Effectively the recording is a lossless (modulo capture software frame drops) pixel perfect video footage that has the correct 4:3 aspect ratio, correct refresh rate (up to 1/1000th of a Hz), and correct resolution.

This is something that has not been possible to do before. But now with CRT Terminator Digital VGA Feature Card ISA DV1000, that has changed, as the original pixel data from XT, 286, 386 etc. DOS PCs can be retrieved and archived.

The method is not just limited to 320x200. As a second example, here is a "notoriously" hard to capture game, Pinball Fantasies, which utilizes a custom nonstandard VGA resolution:

The attachment pinball_fantasies_800x700_71.2hz.png is no longer available

You can download the captured footage at pinball_fantasies_800x700_71.200hz.mp4. Right-click and Save As... to download, and use VLC Player to view it.

To view these video files without stuttering locally, one will need a high refresh rate display, like 120 Hz, 144 Hz. The higher the better, although e.g. ASUS PA248QV display that is 1920x1200 @ 75 Hz already works well and stutters less than a 60Hz max display.

I wanted to make this post already a long ago, but what irked me that my StarTech USB3HDCAP device would just not do lossless video capture, but seemingly insisted on doing some odd lossy video processing on the content. Well, turns out it was not the USB3HDCAP's fault, but a problem with the popular OBS software all along.

Realizing that, I got an idea to use good old VirtualDub to record these videos with CRT Terminator + StarTech USB3HDCAP combo. Although the fact that VirtualDub is no longer maintained is a bit depressing. So my question is, does anyone know of good alternatives to OBS or VirtualDub, that could do "raw" video capture from any Windows driver compatible device? VirtualDub does also have a limitation that it doesn't seem to "lock" on to the source video capture frame rate, so some individual frames may still get lost, even if one manually sets up a matching capture frame rate with the source.

You can read details on how these video files were generated at https://oummg.com/manual/#virtualdub_video_capture

Reply 1 of 13, by wbahnassi

User metadata
Rank Oldbie
Rank
Oldbie

Are you sure it's OBS? You can configure it to capture totally lossless without compression and see the result. It will be chop-fest but you can judge the quality on any single frame. If it's still showing some compression artifacts, then the issue is from the source. If the artifacts are gone, then tje source signal is good, and you just need to adjust the codec settings in OBS to get better quality.

Turbo XT 12MHz, 8-bit VGA, Dual 360K drives
Intel 386 DX-33, TSeng ET3000, SB 2.0, 1x CD
Intel 486 DX2-66, CL5428 VLB, SBPro 2, 2x CD
Intel Pentium 90, Matrox Millenium 2, SB16, 4x CD
HP Z400, Xeon 3.46GHz, YMF-744, Voodoo3, RTX2080Ti

Reply 2 of 13, by clb

User metadata
Rank Member
Rank
Member
wbahnassi wrote on 2024-11-26, 16:21:

Are you sure it's OBS? You can configure it to capture totally lossless without compression and see the result. It will be chop-fest but you can judge the quality on any single frame. If it's still showing some compression artifacts, then the issue is from the source. If the artifacts are gone, then tje source signal is good, and you just need to adjust the codec settings in OBS to get better quality.

I am pretty sure, because
- I see the degradation in OBS captured quality already in the live Preview window. The Preview window should not contain compression, but shows the raw video input.
- The artifacts (which is this general blurriness) are also visible in "Screenshot (Source)", which should not undergo video compression.
- and doing the uncompressed video capture in OBS, the artifacts are still there.

If you want to pixel peep, here is a comparison.

OBS right-click on video capture -> "Screenshot (Source)":

The attachment obs_video_capture.png is no longer available

VirtualDub capture:

The attachment vdub_video_capture.png is no longer available

Reply 3 of 13, by vvbee

User metadata
Rank Oldbie
Rank
Oldbie
clb wrote on 2024-11-26, 16:07:

This is something that has not been possible to do before.

I was under the impression you could do it in the 2010s with the VisionRGB-PRO ($20) + VCS (free) combo.

Reply 4 of 13, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie

*rant ahead*

OBS' support for analog/directshow based capture cards is terrible. They should throw all that code out and start again; not only is it far more complicated than it needs to be (just use the built-in sample grabber instead of writing your own, that's literally what it's for!), it's also missing basic features like working framerate selection and saving crossbar settings. Yeah, the stuff that virtualdub had nailed down well over 10 years ago.
The way that OBS does filter/pin negotiation means you can't rely at all on getting what you specify in the source properties. It will be treated as the "preferred" format but you can still end up with something different if the capture device doesn't want to co-operate fully. They also have practically no delay between buidling the filtergraph and starting it running (let alone a proper transition to paused state) to allow for cards that support auto-format detection to do their thing. So you end up getting incorrectly interlaced frames when you're trying to capture from a console that is outputting a progressive signal because the card didn't have time to switch to progressive sampling before it had to start outputting frames...

(It's almost like they let certain hardware vendors (e.g. blackmagic design) write and tweak the directshow code and then only bothered to test it on their devices without regard for how it works with anything else)

Reply 5 of 13, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
vvbee wrote on 2024-11-26, 17:27:

I was under the impression you could do it in the 2010s with the VisionRGB-PRO ($20) + VCS (free) combo.

Not really.
Those cards cost a lot more back then (and I'd be surprised if they're available today for $20). They're very picky about what framerates/resolution they support. But most significantly, they capture the video data after it's gone through the video card's DAC. Even if you post-process the captured video down to 18bpp color (to try to reduce any introduced analog noise) there's still a big possibility that you won't end up with the same color palette as what was originally used.

Reply 6 of 13, by clb

User metadata
Rank Member
Rank
Member
vvbee wrote on 2024-11-26, 17:27:
clb wrote on 2024-11-26, 16:07:

This is something that has not been possible to do before.

I was under the impression you could do it in the 2010s with the VisionRGB-PRO ($20) + VCS (free) combo.

Reading VCS - A capture utility for certain Datapath capture cards suggests you are the author of that project. It is absolutely fantastic that you found a solution before, it is just that I had not seen an example posted of lossless video capture of e.g. Keen or Pinball Fantasies before anywhere, which led me to post the above examples thinking as "the first". Nice work on VCS!

Last edited by clb on 2024-11-26, 18:33. Edited 1 time in total.

Reply 7 of 13, by clb

User metadata
Rank Member
Rank
Member
jmarsh wrote on 2024-11-26, 18:12:

you end up getting incorrectly interlaced frames when you're trying to capture from a console that is outputting a progressive signal because the card didn't have time to switch to progressive sampling before it had to start outputting frames...

Yeah, the plot thickens, as I am seeing what seems like some kind of weird interaction between VirtualDub configuring the StarTech USB3HDCAP, and then OBS configuring the card. It looks like if I first configure USB3HDCAP in VirtualDub, then that config, or part of that config, persists to OBS, and I can get pixel perfect capture in OBS after that, as long as I don't go in the Settings window in OBS for the card 😁 I'll definitely need to play around with these software more to learn their respective quirks. Probably doesn't make it easier that these USB3HDCAP drivers seem to be out of maintenance already..

Reply 8 of 13, by vvbee

User metadata
Rank Oldbie
Rank
Oldbie
jmarsh wrote on 2024-11-26, 18:23:
vvbee wrote on 2024-11-26, 17:27:

I was under the impression you could do it in the 2010s with the VisionRGB-PRO ($20) + VCS (free) combo.

Not really.
Those cards cost a lot more back then (and I'd be surprised if they're available today for $20). They're very picky about what framerates/resolution they support. But most significantly, they capture the video data after it's gone through the video card's DAC. Even if you post-process the captured video down to 18bpp color (to try to reduce any introduced analog noise) there's still a big possibility that you won't end up with the same color palette as what was originally used.

You may be thinking of something else. They were in that price range and supported custom resolutions and refresh rates. But they are an analog capture card so you won't get the frame buffer directly. Still, you could capture in true color and adjust to your liking.

Reply 9 of 13, by jmarsh

User metadata
Rank Oldbie
Rank
Oldbie
vvbee wrote on 2024-11-26, 19:22:

You may be thinking of something else. They were in that price range and supported custom resolutions and refresh rates.

Can you show me one today available for $20?

Reply 10 of 13, by vvbee

User metadata
Rank Oldbie
Rank
Oldbie

That's the point, you didn't have to buy them today back then for $20.

Reply 11 of 13, by clb

User metadata
Rank Member
Rank
Member
vvbee wrote on 2024-11-26, 19:22:

But they are an analog capture card so you won't get the frame buffer directly. Still, you could capture in true color and adjust to your liking.

Oh I see. To clarify, what we are doing here is something completely different. In this case, the original lossless source material is preserved fully digitally, with no lossy digital -> analog -> digital conversions taking place. While an analog capture can possibly be resampled to capture a faithful and - if the DAC and ADC converters are of high quality - a "practically visually lossless" reproduction, it will no longer be guaranteed to contain the original bits of data. For example, VGA never was true color (24-bit), so that already would be oversampling the signal, and no longer would represent the original data.

What CRT Terminator can provide are the original data bits of the video content, for a truly bit-for-bit lossless recording of the original data. I believe that is something that has not been achieved before.

Nevertheless, I don't doubt that the VisionRGB-PRO + VCS capture workflow is of visually imperceptible quality, and indeed came before, so tip of the hat for running that project as well. 👍

Reply 12 of 13, by vvbee

User metadata
Rank Oldbie
Rank
Oldbie

To be clear, I no longer run the project, it's more of a 2010s thing. I'd like to hear use cases for the original bits vs. the analog output. Museum-grade archival is one, but from this perspective I'd imagine analog is no less faithful. Bypassing a low-quality analog path could be another, but as I understand the digital path would have limited bandwidth anyway and analog quality at low resolutions isn't as big of a problem.

Reply 13 of 13, by clb

User metadata
Rank Member
Rank
Member
clb wrote on 2024-11-26, 18:33:
jmarsh wrote on 2024-11-26, 18:12:

you end up getting incorrectly interlaced frames when you're trying to capture from a console that is outputting a progressive signal because the card didn't have time to switch to progressive sampling before it had to start outputting frames...

Yeah, the plot thickens, as I am seeing what seems like some kind of weird interaction between VirtualDub configuring the StarTech USB3HDCAP, and then OBS configuring the card. It looks like if I first configure USB3HDCAP in VirtualDub, then that config, or part of that config, persists to OBS, and I can get pixel perfect capture in OBS after that, as long as I don't go in the Settings window in OBS for the card 😁 I'll definitely need to play around with these software more to learn their respective quirks. Probably doesn't make it easier that these USB3HDCAP drivers seem to be out of maintenance already..

Ok, looks like I figured it out. It seems there is a UI bug in OBS, or in StarTech USB3HDCAP config menu, or the interaction between the two.

When OBS shows USB3HDCAP pixel format to be XRGB, e.g.

The attachment usb3hdcap_pixelformat.png is no longer available

that might not actually be "in effect". I need to change it to any other setting, then Deactivate the video source, then Activate the video source, and then go and change it back to XRGB. Then it looks like it will reliably activate XRGB.

After that, the recording will be in Chroma 4:2:2 (or 4:2:0, I don't quite know which one USB3HDCAP does), which can be successfully mitigated by setting CRT Terminator to double up the width and height - which is what CRT Terminator's Passthrough mode already does e.g. for 320x200. Passthrough mode will output that mode as 640x400, and it will come out pixel perfect, as long as OBS is correctly set to XRGB.

There is still this odd OBS bug that sometimes it frameskips the video to half the rate, and I can't quite figure out what setting to flip to fix that back up, but the nuclear option of restarting the PC will generally do the trick. (or capturing in VirtualDub)

In any case, with the settings quirks managed, OBS will also capture proper lossless 70 Hz pixel perfect videos of CRT Terminator, so as long as one gets past the odd UI fluke of configuring USB3HDCAP, things will look proper. Not sure how other capture devices will fare with OBS.