Jump to content

Software to capture stills and videos using cheap USB Video Capture

Hi.

I have got a cheap USB Capture card that I am planning on capturing videos and stills from retro computers, ZX Spectrum, NES, SNES, SMD through OSSC (1080p).

What software can I use to capture the stills and videos on. I mean not streaming, just capturing them and saving on my computer? Hopefully free, nothing fancy.

Should I use different program for capturing stills and recording videos?

Thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

OBS will be fine.

Virtualdub should also work, especially if you use some lossless video codecs like MagicYUV. That would allow you to capture uncompressed RGB or YCbCr (4:4:4) while OBS by defaul will be optimized and configured to use h264 or hevc which and most likely use YV12 (YCbCr 4:2:0)

 

Do some research about the native resolutions of such consoles  for example NES and SNES have some very low resolutions like 256x160 or something like that, so hopefully your usb capture card can record low resolutions.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks!

 

I think I will Virtualdub a try first before OBS.

 

I am connecting consoles via OSSC (except ZX Spectrum that goes via ZX-HD), so OSSC it gives me 1080P through HDMI.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Get MagicYUV then, the v1.2 free version is fine : https://www.videohelp.com/software/MagicYUV

 

Virtualdub official development was stopped a long time ago, but other developers continued improving it (source code was open)

Here's the newest versions : https://sourceforge.net/projects/vdfiltermod/files/VirtualDub pack/version 20/

 

If the lossless codec is not to your liking, I'd suggest selecting x264 (virtualdub should have a plugin for that in the package you download, no need to install something else)

For very high quality almost lossless stuff - select Single Pass - Ratefactor based (CRF) and pick a low value, something like in the 3-8 range.  1-4 is practically lossless, or like 99% jpeg quality, bigger values means a bit of quality is lost to reduce bitrate (disk space used). Don't choose single pass  lossless because some video editors can't handle that special format and you may get surprises, and choosing less than 3 CFR is kinda pointless.

Once that's chosen, you can play with the Preset setting - in CRF mode, the preset setting is just  cpu usage vs disk space, the CRF value specifies the quality you want, so once the x264 codec reaches that quality it stops and outputs the data. So you could use preset ultrafast and get same quality as preset medium or very slow, but the ultrafast will cause x264 to use more disk space. With higher presets x264 will do more intensive analysis on the video and will be able to use less disk space to get same quality you specify.

With HDMI input, you can probably leave it on YUV 4:2:0  ... but you can try rgb or yuv 4:4:4 or 4:2:2 and see if you get better quality

 

Link to comment
Share on other sites

Link to post
Share on other sites

Wow, thanks, I will try different codecs out.

 

as the step 1,

I got the free MagicYUV, newest VirtualDub

Open VirtualDub, go to Capture Mode, Compression, and there are no choices of codecs.

I think when I used an earlier version, it had the list of codecs, or is it that "Show all formats" is somehow disabled.

What am I doing wrong?

 

image.png.53e0794f64f485b5d79f61ef9efad36b.png

Link to comment
Share on other sites

Link to post
Share on other sites

Did you unpack VirtualDub2 from the link I posted above?

I just downloaded the 35 MB archive and unpacked it, and launched VirtualDub64.exe and I got this (no capture card on this laptop so i just selected screen capture as source) :

MagicYUV was installed in the past on this laptop (won't show up if you don't install it separately), but the others are supplied by VirtualDub2 as plugins (should be in plugins64 folder)

 

vdub.thumb.png.56a59b6c80b291b5e336b2ba165b3925.png

 

check video > set custom format , set video > overlay as that should use least cpu,  don't forget to set the audio source to your hdmi input or audio input, select the video fps from the bottom right (where it says 30fps in my picture) and

don't forget to also deal with audio part ... select the audio input from same area (where it says 48k/16/s)

On some sound cards, you get better results if you record 48kHz , 16 bit stereo instead of 44.1kHz 16 bit stereo... if you record something and hear audio drifting or you see on the right side that frames are dropped or audio is stretched to keep sync with audio, then try different kHz value.

Set file name with File > set capture file,  check Capture > auto increment file name after capture so you never overwrite stuff by accident

From Capture  > set stop conditions you can configure to auto stop recording after some time if you want.. you can always press Esc to stop capture.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, mariushm said:

Did you unpack VirtualDub2 from the link I posted above?

yes,

MagicYUV_v1.2_win-rev2.exe

VirtualDub2_44282.zip

 

8 hours ago, mariushm said:

and I got this (no capture card on this laptop so i just selected screen capture as source)

that is an interesting thing. that without the capture card, it shows me the list

 

image.png.728d04900a58a33437d8dedc1330b260.png

 

however if I plug the card and open the settings, then the list is empty:

 

image.png.a8b7d9621f10535ff272ad9b10299eb0.png

 

VirtualDub does display the output of the capture card (color stripes) but I do not see it in the Video > Video source list.

 

image.png.26b9db7b0b760c7bc652cb0cbdb29558.png

 

Audio source seems to list it:

 

image.png.758b04d7f2615a32822f8d350acc29f5.png

 

here is how the capture card is recognized by the Device Manager:

 

image.png.8efc9ef377d9d145146a2a162b5c4bff.png

 

Link to comment
Share on other sites

Link to post
Share on other sites

You select the capture device from the Device menu. 

You may need to select an actual format, for VirtualDub to know what color format is (and what compatible color formats that could be converted into), to build a list of compression codecs based on that. 

I'm at work now, so I can't go into more detail, sorry.

Link to comment
Share on other sites

Link to post
Share on other sites

Aha, I see, the Device menu:

 

image.png.3bf87134b65904a6b9cba6380e38db31.png

 

if I select USB Video, then Video > Compression does not find any codecs

 

but if I switch to my Logitech webcam , then Video > Compression shows the list of codecs to select

 

---

 

To verify that it actually works, it worked for me to take screenshots and record video from "USB Video" with the Windows Camera app. It had no issues.

 

Any ideas on how do I make it work for VritualDub?

Link to comment
Share on other sites

Link to post
Share on other sites

Go in Device settings or the various settings you'll find in the video menu and try changing the capture format

F@H
Desktop: i9-13900K, ASUS Z790-E, 64GB DDR5-6000 CL36, RTX3080, 2TB MP600 Pro XT, 2TB SX8200Pro, 2x16TB Ironwolf RAID0, Corsair HX1200, Antec Vortex 360 AIO, Thermaltake Versa H25 TG, Samsung 4K curved 49" TV, 23" secondary, Mountain Everest Max

Mobile SFF rig: i9-9900K, Noctua NH-L9i, Asrock Z390 Phantom ITX-AC, 32GB, GTX1070, 2x1TB SX8200Pro RAID0, 2x5TB 2.5" HDD RAID0, Athena 500W Flex (Noctua fan), Custom 4.7l 3D printed case

 

Asus Zenbook UM325UA, Ryzen 7 5700u, 16GB, 1TB, OLED

 

GPD Win 2

Link to comment
Share on other sites

Link to post
Share on other sites

16 hours ago, Kilrah said:

Go in Device settings or the various settings you'll find in the video menu and try changing the capture format

Thanks, got it working. The only option there allowed was YUY2 - YUV 4:2:2 interleaved

 

image.png.af474de8b2636d0ca24f04d86b41ca32.png

 

=====================================================================

 

So, based on that,  what are the options that I should setup for MagicYUV then?

 

image.png.0176bc7f060cb3b24afdd19009422c6d.png

 

And in terms of Audio compression, can I use Lame MP3? Something like this? or do I have to use something else? I mean the sounds from the retro consoles are not of the highest quality, so maybe I could set a lower BR/Quality?

 

image.png.375a97cb889f8a25252dc63095f4aa1d.png

 

Thank you !!!

Link to comment
Share on other sites

Link to post
Share on other sites

For audio, if you have disk space, leave uncompressed ... it's not a lot of data, it's  2 channels x 16 bit x 44100 Hz = 1,411,200 bits per second or 176400 bytes or 172 KB/s  or 10 MB per minute , or 600 MB per hour.  48kHz is a few KB more per second, nothing special.

 

If you compress with MagicYUV, this will be an intermediate file anyway, because when you're done rendering your project and everything, you can take this big file and compress it to something more long storage, for when you want to reuse it at some point in the future. You'd use Handbrake or other conversion programs to compress to h264 or HEVC and for audio you'd use opus codec or flac , as those have the highest quality (flac is lossless but high bitrate, around 500-700kbps,  opus is better than mp3 or aac and you can get very good quality at 192-256 kbps) 

 

YUV 4:2:2 is good that it's offered, it's a bit better than 4:2:0

When you render or recompress the video with a lossy codec like h264 or hevc, such codecs will default to converting to YUV 4:2:0 because it's less information for them to compress, and it works for motion picture. But, in a video editor, having this extra information is good in case you manipulate the image in some way, like for example resizing the image to half, the editor can use that extra color information to produce a better image quality in theory.

If you don't think you're gonna do that, you can choose to have MagicYUV to convert to YUV 4:2:0  as that would give MagicYUV less bytes to compress.  If you leave it like that, there will be less CPU used now to capture, but when you render to h264 or HEVC or whatever codec you chose, it will be converted to 4:2:0 anyway (unless you explicitly forbit it) - but if you upload to Youtube or somewhere else, Youtube will recompress the content and make it 4:2:0 again.

 

Basically, what does this mean...

In RGB mode, you have each pixel using 3 bytes, one byte for each color : red , green and blue.

In YUV modes, some formulas are used to convert this RGB information into Y or Luma or Brightness (black and white image), and Chromas (U and V). Because humans are much more sensitive to variations in brightness, the Y or Luma is kept completely, but for colors, some tricks can be made to reduce the amount of data.

So for 4:2:2 and 4:2:0,  for each group of 4 pixels the individual Y is kept, but for chroma, an average of the color is made. In 4:2:2, there's a pair of average values for each 2 pixels, and for 4:2:0,  there's a pair of averages for all 4 pixels.

So 4:2:2 uses  4 bytes + 2 bytes + 2 bytes = 8 bytes ,  4:2:0  uses 4 bytes + 2 bytes = 6 bytes to transmit information about 4 pixels (which would use 12 bytes in RGB mode)

 

 

As for the other settings, it depends on you and on the scaler you use to convert the SD content to HD.

SD content used bt.601 color primaries and HD content moved on to bt. 709  / Rec. 709

Most movie players and TVs, unless told otherwise through special flags inside the video, will assume that anything higher resolution than around 1024x768 will be HD content and use bt.709 while anything lower than that resolution will be SD, using Rec. 601

 

Your scaler should capture the video from consoles and correctly determine it's Rec601 due to the low resolution, and when it converts from RGB to YUV, it should use the proper formulas to convert from Rec. 601 to Rec.709 because it outputs 1920x1080 and a TV or monitor will naturally assume the input is Rec.709

But if your scaler is dumb and doesn't do this conversion, you can tell MagicYUV to treat the incoming video as using Rec. 601 and further down the line you would have to be aware and tell the renderer  or encoder that your content uses Rec.601

You can capture a minute or so of video with the option on Rec709  and play the video and see if it looks right, if it's similar to how you view on TV, if it looks like you remember the game looking. If it doesn't look right, try with Rec.601

 

The other option you should pay attention to is  Full Range YUV  ... basically check it if your scaler sends you full range YUV, uncheck it if doesn't.

If the option is not in the right position, you will basically see a shift in colors, the blacks will be more washed out, the recording will have less contrast, something like that.

Easiest would be to make two recordings, one with and one without and see which one is better.

 

There's an option in virtualdub , I think it's Video > Histogram which will tell you if the source gives you full range or limited (if it's full you'll see the histogram from all the way left, if it's limited there's some gap at the start) . But the histogram and some features like this don't work when video is in "Overlay" mode, probably have to put it on "Preview" or "Display with filters"  or some other mode,  Overlay is when you want easiest preview mode, when you're capturing.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Alright. I am figuring it out step by step.

 

the histogram:

 

image.thumb.png.6e4a423d54fa2b8589716473d6c5eac6.png

 

so far, I am only able to operate on 5 fps, if I change it to anything else, it has no effect and goes back to 5 fps:

 

image.png.2a1a0d09142d3f3dc9ba05850c6f7a53.png

 

i tried to make a recording and the file properties show:

 

===================== General =====================
Complete name               : C:\Temp\output_.avi
Format                      : AVI
Format info                 : Audio Video Interleave
File size                   : 60.4 MB
Duration (ms)               : 14s 500ms
Overall bit rate            : 34.9 Mbps

===================== Video =====================
Id                          : 0
Format                      : MAGY
Codec Id                    : MAGY
Duration (ms)               : 14s 400ms
Bit rate                    : 32.1 Mbps
Width                       : 1 920 pixels
Height                      : 1 080 pixels
Display aspect ratio        : 16:9
Frame rate                  : 5.000 fps
Bits/(Pixel*Frame)          : 3.095
Stream size                 : 55.1 MB (91%)

===================== Audio =====================
Id                          : 1
Format                      : PCM
Formatsettings, Endianness  : Little
Formatsettings, Sign        : Signed
Codec Id                    : 1
Duration (ms)               : 14s 500ms
Bit rate mode               : Constant
Bit rate                    : 3 072 Kbps
Channel(s)                  : 2 channels
Sampling rate               : 96.0 KHz
Bit depth                   : 16 bits
Stream size                 : 5.31 MB (9%)
Alignement                  : Aligned on interleaves
Interleave, duration        : 41 ms (0.21 video frame)
Interleave, preload duratio : 499 ms

 

Just for the sake of testing, I tried to capture using ClipChamp default settings, and it was able to do AVC 30 FPS, so the card is able to deliver at least 30fps.

 

How do I fix the 5 FPS problem?

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 month later...

Hi there @tridy did you ever find a solution to this?  I'm interested in doing exactly what you're doing and I would love to know your set-up.

 

Thanks

Link to comment
Share on other sites

Link to post
Share on other sites

The 5 fps problem can be solved by simply selecting another framerate from the popup window ... click on the status bar, select the desired fps. 

If you can't from there, you can from somewhere else, from  capture device settings, or from video > custom format or somewhere else.  Someone just has to do some searching not just wait to be given everything and just "copy paste". Virtualdub is very configurable.

 

Or maybe look up some more tutorials, whatever... people don't have patience and ability to research.

Link to comment
Share on other sites

Link to post
Share on other sites

Sorry for the late reply. I need to fix my email notifications.

 

On 5/2/2023 at 4:05 PM, iamkl00t said:

Hi there @tridy did you ever find a solution to this?  I'm interested in doing exactly what you're doing and I would love to know your set-up.

 

Thanks

 

So far what I have figured out is that the YUY2 - YUV 4:2:2 will give only 5 FPS. I believe this is what the hardware possibly can produce. Since I was capturing video from NES and super color accuracy was not the priority, I found that Clipchamp on Win11 does a good enough job for my scenario. I trusted the settings that it has selected automatically, and here are the properties of the video it has captured:

 

codec.png.27096d06e2fff85ae7edb4815a4e9939.png

 

 

On 5/2/2023 at 4:11 PM, mariushm said:

The 5 fps problem can be solved by simply selecting another framerate from the popup window ... click on the status bar, select the desired fps. 

If you can't from there, you can from somewhere else, from  capture device settings, or from video > custom format or somewhere else.  Someone just has to do some searching not just wait to be given everything and just "copy paste". Virtualdub is very configurable.

 

Or maybe look up some more tutorials, whatever... people don't have patience and ability to research.

 

Yes, I tried the option from the status bar and selected a different framerate. It would jump back to 5 FPS regardless of what I select.

I tried Gucview on Linux to test if the limitation of 5 FPS is still there. From what I see, this is the limitation of the hardware. Well, that is sort of expected from a 30$ capture card.

 

Here are the results of different options that I could get out from Gucview for this card:

 

YUYV 4:2:2 5/1 fps @ 1920x1080
YUYV 4:2:2 10/1 fps @ 1280x720
YUYV 4:2:2 30/1 fps @ 640x480


YU12 10/1 fps @ 1920x1080
YV12 10/1 fps @ 1920x1080

MJPG-Motion-JPEG 60/1 fps @ 1920x1080
RGB 3 60/1 fps @ 1920x1080
BGR 3 60/1 fps @ 1920x1080

 

Here is the (VLC Codec) info of the capture file when I select YUYV 4:2:2 30/1 fps @ 640x480:

 

420.png.283a0962dc2d1a7255ee9463d779f60c.png

 

It says it can do 4K, but I think 1080 is already pushing it to its limits.

 

card.thumb.jpeg.c64986e6fa09f2af8daf5d86e71d8ead.jpeg

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×