AV:VirtualDub2 Lossless Captures: Difference between revisions

From ConsoleMods Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:RetroRGB Migration Hold]]
This page shows you how to use the VirtualDub2 software to get excellent quality, uncompressed game captures. While most content creators can simply use OBS to get footage of their games, anyone doing video analysis like comparison shots, or dev work needs a way to capture the exact video their console outputs. Unfortunately, capturing with little to no compression and full accuracy can be a bit confusing, so this page will walk you through it.
This page shows you how to use the VirtualDub2 software to get excellent quality, uncompressed game captures.  While most content creators can simply use OBS to get footage of their games, anyone doing video analysis like comparison shots, or dev work needs a way to capture the _exact_ video their console outputs.  Unfortunately, capturing with little to no compression and full accuracy can be a bit confusing, so I'll try to walk you through it here (and a big thanks to Extrems for helping me get this set up!).


=== What's needed: ===
See [https://www.retrorgb.com/videocapture.html RetroRGB's write-up] comparing this video capture method to others.


Any capture card, but one that supports 4:4:4 color space will get you accurate results.  I use a [http://admin.retrorgb.com/datapathcapture.html Datapath Vision].
== What's needed ==


[http://virtualdub2.com/ VirtualDub2]:  [https://sourceforge.net/projects/vdfiltermod/files/VirtualDub%20pack/ https://sourceforge.net/projects/vdfiltermod/files/VirtualDub%20pack/]
* Any capture card, but one that supports 4:4:4 color space will get you the most accurate results. One such device is a Datapath Vision.
* [http://virtualdub2.com/ VirtualDub2]
* [https://sourceforge.net/projects/vdfiltermod/files/VirtualDub%20pack/ VirtualDub Pack]
* Codecs: The FFV1 uncompressed codec is already included with VDub2. If you'd like to use a compressed format, [https://sourceforge.net/projects/x264vfw/ x264] is good. An alternative would be [https://lags.leetcode.net/codec.html lagorith].


Codecs:  The FFV1 uncompressed that I recommend is already included with VDub2.  If you'd like to use a compressed format, [https://sourceforge.net/projects/x264vfw/ x264] is good.  An alternative would be [https://lags.leetcode.net/codec.html lagorith], but I've been having great luck with FFV1.
== Setup ==


=== Setup: ===
# Make sure your capture card is set up and working by opening a preview window, just to confirm operation.
# Download and extract VDub2 to a directory on your PC. Then launch whichever version matches your machine. 'VirtualDub64.exe' will be what most people use.


Make sure your capture card is set up and working. I recommend opening a preview window, just to confirm.
== Capture ==


Download and extract VDub2 to a directory on your PC.  Then launch whichever version matches your machine;  I assume 'VirtualDub64.exe' will be what most people use.
You'll have to set most of the following settings each time you capture. Some things are retained, but most things aren't. Don't worry, after doing it a few times, you'll familiarize yourself with the clunky interface and captures will be reasonably easy.


**Capture:**
# To enable capture mode, go to Capture \\ Capture avi <br> [[File:VDub2Guide2.jpg|400px]]
# Select your capture card in the "Device" menu: <br> [[File:VDub2Guide3.jpg|400px]]
# Configure your settings by going to Video \\ Capture Pin: <br> [[File:VDub2Guide4-1024x634.jpg|400px]]
# Here's where you'll need to set color space and the capture resolution. In this example, a OSSC with an RGB source is used, so the color space is RGB. If needed, you can reference your capture card's preview window and confirm that the video signal is 640x480. You might need to flip the image. <br> [[File:VDub2Guide5-217x300.jpg|400px]]
# After hitting "OK", it's possible you won't see an image. That's fine, just go to "Video" and select "Preview (system)". As a note, if your video is flipped upside down in the preview window, try switching the "Bottom Up" or "Top Down" bitmap location, as showed in the picture above. <br> [[File:VDub2Guide6.jpg|400px]]
# Select the compression you'd like to use by going to "Video \\ compression": <br> [[File:VDub2Guide9-1024x819.jpg|400px]]
# You can choose anything you'd like here. If you'd just like a quality, yet compressed file (and your PC can handle it), x264 is great. The purpose of this guide is to show you how to get uncompressed captures though, so we'll be selecting the "FFMPEG FFV1 lossless codec". Make sure to hit "configure" and confirm the settings are how you want them. These are some example settings: <br> [[File:VDub2Guide10-300x183.jpg|400px]]
# Set the directory you want to save your video, by going to "File \\ Set capture file". Make sure to rename the target file between recordings, otherwise it will overwrite each time: <br> [[File:VDub2Guide7.jpg|400px]]
# Go to "Capture \\ Capture Video" to start recording. To stop capturing, either hit escape, or go back to the same drop-down and hit "Stop capture": <br> [[File:VDub2Guide8.jpg|400px]]


You'll have to set most of the following settings each time you capture.  Some things are retained, but most things aren't.  Don't worry, after doing it a few times, you'll familiarize yourself with the (terribly labeled/organized) interface and captures will be reasonably easy.
== Verifying Captures ==
 
To enable capture mode, go to Capture \\ Capture avi [[[File:VDub2Guide2.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide2.jpg]]
 
Select your capture card in the "Device" menu: [[[File:VDub2Guide3.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide3.jpg]]
 
Now configure your settings, by going to Video \\ Capture Pin: [[[File:VDub2Guide4-1024x634.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide4.jpg]]
 
Here's where you'll need to set color space and the capture resolution.  I'm using the OSSC with an RGB source, so I know my color space is RGB.  Also, I referenced my capture card's preview window and confirmed that the video signal I'm capturing is 640x480.  You might need to flip the image with top-down - More on this in a moment: [[[File:VDub2Guide5-217x300.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide5.jpg]]
 
After hitting "OK", it's possible you won't see an image.  That's fine, just go to "Video" and select "Preview (system)".  As a note, if your video is flipped upside down in the preview window, try switching the "Bottom Up" or "Top Down" bitmap location, as showed in the picture above;  I needed Top-Down for it to work properly on my setup: [[[File:VDub2Guide6.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide6.jpg]]
 
Now select the compression you'd like to use, by going to "Video \\ compression": [[[File:VDub2Guide9-1024x819.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide9.jpg]]
 
You can choose anything you'd like here - If you'd just like a quality, yet compressed file (and your PC can handle it), x264 is great.  The purpose of this guide is to show you how to get uncompressed captures though, so I'll be selecting the "FFMPEG FFV1 lossless codec".  Make sure to hit "configure" and confirm the settings are how you want them.  I used these: [[[File:VDub2Guide10-300x183.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide10.jpg]]
 
Now set the directory you want to save your video, by going to "File \\ Set capture file".  Make sure to rename the target file between recordings, otherwise it will overwrite each time: [[[File:VDub2Guide7.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide7.jpg]]
 
Now just go to "Capture \\ Capture Video" to start recording.  To stop capturing, either hit escape, or go back to the same drop-down and hit "Stop capture": [[[File:VDub2Guide8.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide8.jpg]]
 
=== Verifying Captures: ===


If your capture card's software allows for uncompressed screenshots (the Datapath's and Epiphan's do), you can verify your video capture settings with a still shot.
If your capture card's software allows for uncompressed screenshots (the Datapath's and Epiphan's do), you can verify your video capture settings with a still shot.


First, save a sill picture to a .bmp or .png using your capture software.  You'll want a still scene, with something like text, or color bars to do a comparison.  Title screen's, or test patterns are really helpful for this.
# Save a sill picture to a .bmp or .png using your capture software. You'll want a still scene, with something like text, or color bars to do a comparison. Title screen's, or test patterns are really helpful for this.
# Take a short (few-seconds) video of the exact same screen, using VDub2.
# Use software like [https://portableapps.com/apps/music_video/mpc-hc-portable MPC], or [https://download.videolan.org/pub/videolan/vlc/last/win64/ VLC Player] (portable versions are available of both) to save a still .bmp or .png image of the video you just took.
# Use photo editing software to scale the image 1000% (10x); I used nearest-neighbor, since these are retro game captures. If the still shot from your capture card's software matches the sill pulled from the VDub2 video, then you've successfully set up uncompressed capture!


Next, take a short (few-seconds) video of the exact same screen, using VDub2.
As you can see here, the direct capture and VDub2 with proper settings look identical, but when VDub is set to the wrong color space, you can see a difference inside the numbers. Alternatively, using the wrong compression settings can cause things like this as well. If you can't see a difference here, you'll likely need to find a test you're used to, such as Link's face in ''A Link to the Past''. <br> [[File:VDub2Guide11-1024x206.png|400px]]


Now use software like [https://portableapps.com/apps/music_video/mpc-hc-portable MPC], or [https://download.videolan.org/pub/videolan/vlc/last/win64/ VLC Player] (portable versions are available of both) to save a still .bmp or .png image of the video you just took.
== Direct Capture ==
 
Then, use photo editing software to scale the image 1000% (10x); I used nearest-neighbor, since these are retro game captures. If the still shot from your capture card's software matches the sill pulled from the VDub2 video, then you've successfully set up uncompressed capture!
 
As you can see here, the direct capture and VDub2 with proper settings look identical, but when I set VDub to the wrong color space, you can see a difference inside the numbers (click for a full-sized png).  Alternatively, using the wrong compression settings can cause things like this as well. If you can't see a difference here, you'll likely need to find a test you're used to;  I use Link's face from ALttP as my go-to, but this worked well for me too: [[[File:VDub2Guide11-1024x206.png)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide11.png]]
 
=== Direct Capture ===


This method seems to work with direct analog captures as well, provided your capture card supports it.
This method seems to work with direct analog captures as well, provided your capture card supports it.


For Datapath Vision users:  Using the same setup & phase techniques described in [http://admin.retrorgb.com/datapathcapture.html the Vision page], I was able to get an uncompressed "240p" capture.  Also, since I already configured the capture size and phase in the Vision window (and left it open), VDub2 automatically detected the proper resolution. You might need to restart VDub2, then manually enter the resolution to match what your capture card detects though: [[[File:VDub2Guide12-1024x714.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide12.jpg]]
For Datapath Vision users: Using the same setup & phase techniques described in [[AV:Datapath Vision Lossless Captures|the Vision page]], you can get an uncompressed "240p" capture. Also, if you already configured the capture size and phase in the Vision window (and left it open), VDub2 automatically detects the proper resolution. You might need to restart VDub2, then manually enter the resolution to match what your capture card detects though: [[File:VDub2Guide12-1024x714.jpg|400px]]
 
I did run into one last issue when doing direct-capture:  No matter what setting I toggled in the "Capture pin" window, the video stayed flipped.  No problem!
 
When in capture mode, go to "Video \\ Capture Filter": [[[File:VDub2Guide13-1024x663.jpg)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide13.jpg]]
 
Then, go to the "Filter Configure" tab and check off "Flip capture vertically": [[[File:VDub2Guide14-659x1024.png)](https://admin.retrorgb.com/wp-content/uploads/2021/05/VDub2Guide14.png]]
 
Other than that, everything else seemed to work well!
 
=== Problems / Issues ===
 
I've run into an issue where after _many_ successful captures, the audio and video would randomly get out of sync and speed.  It wasn't just a matter of moving the audio in the timeline to match, it seemed like the audio was playing much faster than the video (or vice versa).  I tried deleting the configuration in the registry at HKEY\_CURRENT\_USER\\Software\\VirtualDub.org, but had mixed results.
 
I occasionally had to [https://www.retrorgb.com/amarec.html fall back on using Amarec], when I couldn't get this fixed.  If I ever find out a permanent fix, I'll update this guide.
 
=== Final Thoughts ===


I really like this method.  It's _much_ less buggy than Amarec and less work than trying to get reliable, uncompressed captures through OBS.  I _do_ think the settings could be streamlines a lot more though.  Maybe someday, someone will fork the VDub project for _just_ a capture version, that strips all unneeded features?  Until then, I'm happy enough with this.
* If your image displays upside down, while in capture mode you can go to "Video \\ Capture Filter": <Br> [[File:VDub2Guide13-1024x663.jpg|400px]]
* ... then go to the "Filter Configure" tab and check off "Flip capture vertically": <br> [[File:VDub2Guide14-659x1024.png|400px]]


 
== Problems / Issues ==


If you're here as part of the [http://www.retrorgb.com/videocapture.html Video Capture section], feel free to move onto the next step of [https://www.retrorgb.com/virtualdub.html Scaling Your Captures].
The audio and video may randomly get out of sync and speed. It may seem like the audio was playing much faster than the video (or vice versa). Deleting the configuration in the registry at `HKEY\CURRENT\USER\Software\VirtualDub.org` may or may not fix this.

Latest revision as of 13:58, 14 July 2023

This page shows you how to use the VirtualDub2 software to get excellent quality, uncompressed game captures. While most content creators can simply use OBS to get footage of their games, anyone doing video analysis like comparison shots, or dev work needs a way to capture the exact video their console outputs. Unfortunately, capturing with little to no compression and full accuracy can be a bit confusing, so this page will walk you through it.

See RetroRGB's write-up comparing this video capture method to others.

What's needed

  • Any capture card, but one that supports 4:4:4 color space will get you the most accurate results. One such device is a Datapath Vision.
  • VirtualDub2
  • VirtualDub Pack
  • Codecs: The FFV1 uncompressed codec is already included with VDub2. If you'd like to use a compressed format, x264 is good. An alternative would be lagorith.

Setup

  1. Make sure your capture card is set up and working by opening a preview window, just to confirm operation.
  2. Download and extract VDub2 to a directory on your PC. Then launch whichever version matches your machine. 'VirtualDub64.exe' will be what most people use.

Capture

You'll have to set most of the following settings each time you capture. Some things are retained, but most things aren't. Don't worry, after doing it a few times, you'll familiarize yourself with the clunky interface and captures will be reasonably easy.

  1. To enable capture mode, go to Capture \\ Capture avi
    VDub2Guide2.jpg
  2. Select your capture card in the "Device" menu:
    VDub2Guide3.jpg
  3. Configure your settings by going to Video \\ Capture Pin:
    VDub2Guide4-1024x634.jpg
  4. Here's where you'll need to set color space and the capture resolution. In this example, a OSSC with an RGB source is used, so the color space is RGB. If needed, you can reference your capture card's preview window and confirm that the video signal is 640x480. You might need to flip the image.
    VDub2Guide5-217x300.jpg
  5. After hitting "OK", it's possible you won't see an image. That's fine, just go to "Video" and select "Preview (system)". As a note, if your video is flipped upside down in the preview window, try switching the "Bottom Up" or "Top Down" bitmap location, as showed in the picture above.
    VDub2Guide6.jpg
  6. Select the compression you'd like to use by going to "Video \\ compression":
    VDub2Guide9-1024x819.jpg
  7. You can choose anything you'd like here. If you'd just like a quality, yet compressed file (and your PC can handle it), x264 is great. The purpose of this guide is to show you how to get uncompressed captures though, so we'll be selecting the "FFMPEG FFV1 lossless codec". Make sure to hit "configure" and confirm the settings are how you want them. These are some example settings:
    VDub2Guide10-300x183.jpg
  8. Set the directory you want to save your video, by going to "File \\ Set capture file". Make sure to rename the target file between recordings, otherwise it will overwrite each time:
    VDub2Guide7.jpg
  9. Go to "Capture \\ Capture Video" to start recording. To stop capturing, either hit escape, or go back to the same drop-down and hit "Stop capture":
    VDub2Guide8.jpg

Verifying Captures

If your capture card's software allows for uncompressed screenshots (the Datapath's and Epiphan's do), you can verify your video capture settings with a still shot.

  1. Save a sill picture to a .bmp or .png using your capture software. You'll want a still scene, with something like text, or color bars to do a comparison. Title screen's, or test patterns are really helpful for this.
  2. Take a short (few-seconds) video of the exact same screen, using VDub2.
  3. Use software like MPC, or VLC Player (portable versions are available of both) to save a still .bmp or .png image of the video you just took.
  4. Use photo editing software to scale the image 1000% (10x); I used nearest-neighbor, since these are retro game captures. If the still shot from your capture card's software matches the sill pulled from the VDub2 video, then you've successfully set up uncompressed capture!

As you can see here, the direct capture and VDub2 with proper settings look identical, but when VDub is set to the wrong color space, you can see a difference inside the numbers. Alternatively, using the wrong compression settings can cause things like this as well. If you can't see a difference here, you'll likely need to find a test you're used to, such as Link's face in A Link to the Past.
VDub2Guide11-1024x206.png

Direct Capture

This method seems to work with direct analog captures as well, provided your capture card supports it.

For Datapath Vision users: Using the same setup & phase techniques described in the Vision page, you can get an uncompressed "240p" capture. Also, if you already configured the capture size and phase in the Vision window (and left it open), VDub2 automatically detects the proper resolution. You might need to restart VDub2, then manually enter the resolution to match what your capture card detects though: VDub2Guide12-1024x714.jpg

  • If your image displays upside down, while in capture mode you can go to "Video \\ Capture Filter":
    VDub2Guide13-1024x663.jpg
  • ... then go to the "Filter Configure" tab and check off "Flip capture vertically":
    VDub2Guide14-659x1024.png

Problems / Issues

The audio and video may randomly get out of sync and speed. It may seem like the audio was playing much faster than the video (or vice versa). Deleting the configuration in the registry at HKEY\CURRENT\USER\Software\VirtualDub.org may or may not fix this.