Gamebridge Owning Action Faction: We Love HuffYUV
By Maxwell Adams
Part 1: Welcome to Virtualdub
Congratulations on buying a Gamebridge! This cheap device is great for capturing
footage from video consoles. You may have found it through
Google, on
eBay, or possibly in Amazon,
which is turning up some retarded prices right now.
There are
actually two different models of Gamebridge out there. The regular
kind is the AVC-1400, which has composite and s-video inputs. The
other kind is the AVC-1410, which includes a Tv tuner, and adds a
cable line input. Both of them can capture video games just fine. The
AVC-1410 just adds on the ability to watch+record tv on your
computer. You can also watch+record tv using the AVC-1400 by using an
external tuner. You could plug your cable box into it and just change
channels on the box, it would work fine.
Anyway, while you
were shopping, I hope you got some s-video cables for your console.
Every game console comes with composite cables in the box, which are
the lowest common denominator of video connections these days. You
might have some fancy component cables for your console, but you
can't connect those to the gamebridge. Your only options are
composite and s-video, and s-video is way better.
Here
is the kind of picture you'll get over s-video cables.
Here
is a screenshot of what that looks like on a composite connection.
You can't see how bad it is with a still image, though.
This
is an animated close-up of that screen. On an s-video connection, the
picture stays still.
Get s-video cables, people.
Now,
you probably want to get your software installed so you can record
stuff. The Gamebridge ships with Intervideo's Home Theater.
This
program is horrible. Really. Don't even install it.
We're
going to be using Virtualdub.
Specifically, we're going to use version
1.7.8, even though the new beta version has some cool
features.
Virtualdub is installed by unzipping it into a
folder somewhere. Fire it up, go the the file menu, and click on
Capture AVI.
Welcome
to virtualdub! You might not have any video from your gamebridge
right away, so don't panic. Let's look at the menus.
Here's
the file menu. Before you can record anything, you must set the name
of the file you will capture to. Once you set the file name, you will
see it in the title bar. At the bottom, you've got Exit Capture Mode.
The other options aren't really useful.
This
is the device menu. The Device Settings... thing doesn't do anything
important, and you don't need to mess with it. Under that, you've got
your list of the video capture devices in your system. You, ah,
probably don't have so many. Just check off the Adaptec Gamebridge if
it isn't already selected. You can also see the Screen Capture option
here, which is pretty useful for capturing video from emulators and
such.
Holy
crap! Everything useful is here under the Video menu.
No
Display / Overlay / Preview / Preview Acceleration
These options
don't really do anything. Leave it on Overlay or Preview, it makes no
difference. Do not play with the Preview Acceleration options, you
have nothing to gain by doing so.
Stretch to Window /
Histogram...
You really want to check off Stretch to Window. It
will just make the video input fill the virtualdub window.
DO
NOT CLICK ON HISTOGRAM. That feature doesn't work; at least, not on
the Gamebridge.
Video Source ->
This is where you choose
the s-video or composite input. Both video inputs use the same audio
connectors.
Capture Pin
This lets you get at the Gamebridge
settings, but we'll be messing with them in a different way, so this
is useless.
Capture Filter / Crossbar
You don't want to
mess with these. Look, but don't touch.
Levels...
You can
change your brightness/contrast/etc. here. I think the default levels
are fine. If you screw around with these and want to change them
back, go to Capture Filter -> Video Proc Amp and click on
Default.
Cropping
This is a cool feature, but it doesn't
work very well. It almost works perfectly in the new beta of
virtualdub, but not quite. We'll leave it alone. Those black bars
around the video will be cropped off in post.
Swap
Fields
Nope, no need for that.
Noise Reduction
I haven't
used this feature much, but it might help out people who use
composite cables. Later on, I'll show you how to clean up video in
post.
Vertical Reduction / Extend Luma Black Point / Extend
Luma White Point
You don't want to do any of these
things.
Compression / Set Custom Format
These are very
important, and we'll get into them later.
Filters / Enable RGB
Filtering / BT8X8 Tweaker
These don't work with the
Gamebridge.
The
audio menu doesn't have nearly as many useless features as the video
menu.
Enable Audio Capture / Enable Audio Playback
These do
what you would expect. Note that they can be enabled
independently.
Volume Meter
Puts a graphical thing at the
bottom that shows you how loud the audio is.
Raw Capture
Format...
Nothing to do here.
Compression...
Lets you
pick the audio codec for compression.
Windows Mixer...
This
brings up the volume control panel for recording devices.
Audio
Input ->
If virtualdub is set to record your sound card, you
can use this to switch between microphone, line in, stereo mix, or
whatever your sound card has. While recording from the gamebridge,
there are no options here.
Audio Source ->
Now that I
think about it, I'm not sure what this is supposed to do.
Capture
Device / Something / Adaptec Gamebridge Audio Captur
This will
list the devices available for audio recording. You'll see your sound
card in that list. If you have a usb headset plugged in, you'll
probably see that too. Choosing Adaptec Gamebridge doesn't actually
work, you need it set on Capture Device to get audio from the
Gamebridge.
Finally,
we've got the capture menu.
Capture Video
Begins capturing
video. This won't work if you haven't used File -> set Capture
File to name a file to save.
Test Video Capture
This will
use your capture settings to begin capturing, but it won't write a
file. This is useful for checking the cpu usage and compression ratio
on the settings you've chosen.
Stop Capture
Yep.
Real-time
Profiler
Some kind of window with colored bars? I'm not sure how
it's useful.
Settings ->
This guy really needs to clean
up his interface. There is nothing useful under this.
Prefences
->
This is more useful. You can set hotkeys in here to
start/stop recording.
Stop Conditions ->
This lets you
set stop conditions. Why would you? I don't know.
Timing /
Disk IO / Capture Drives
These are some settings that you never
need to mess with.
Whats left...
Full Screen
This is
great if you just want to play console games on your monitor. It also
works while recording. The only way to exit is by pressing
alt+enter.
Timing Graph
This gives you a live display of
virtualdub's audio syncronizing feature. If the yellow line is flat,
everything is going just fine. If the line is bouncing around, there
is some kind of problem, and virtualdub is working hard to keep the
audio in sync with the video.
Enable Multisegment
Capture
Yeah, this feature was great for capturing files greater
than 4 gigs in windows 98.
Autoincrement filename after
Capture
ENABLE THIS FEATURE.
After you set a file to
capture to, virtualdub will write to that. Normally, after you
capture a file, virtualdub is still set to capture to that file.
So, if you started capturing again, you would immediately overwrite
the file you just made. With autoincrement on, the program is much
less stupid. It will add a number to the filename being written to.
So, if you just captured a file called "Testing 1.avi", it
would set itself to record a new file called "Testing 2.avi".
There are a couple more things in the lower right.
This
thing sets up the audio samping. The default is 48 khz, 16-bit,
stereo. Go ahead and change that to 44.1 khz, 16-bit, stereo. This
reduces audio quality a tad, but nobody will ever notice. This
setting also insures that you won't have any issues later on with
incompatable audio formats.
The
default is 29.97. That is the only setting that works, so never
change it. Unless you're European, in which case, change it to 25?
Maybe? That might make it work with PAL sources, or not, I have no
idea.
Part 2: Capturing Video
Hey, let's take
a second to look at the recording options in Intervideo Home
Theater.
HAHAHAHAHAHAHAHAHA
Okay,
let's do this. We're going to capture some video, and we're
(probably) going to compress is losslessly, so it looks exactly how
it looked when the gamebridge spat it out. It will be like saving an
image as a PNG - it will still look the same, but the file will be
smaller. Later on, the video will be recompressed and processed into
a much smaller file.
When you set up the way you capture video
in virtualdub, there are two things that you have to choose:
resolution, and codec. Deciding how to arrange things is complicated
because of the way these two things are related. It might help to
look at what our concerns are while capturing.
1. Image
quality
Image quality is great. You want as much as possible,
right? You get more quality by increasing resolution, and by
capturing losslessly.
2. Hard Drive Space
Captured video
takes up tons of space. It will take up less space if you decrease
resolution, and if you use a better codec while capturing.
3.
CPU Usage
The Gamebridge is a USB device, so it needs some CPU
power to work properly. If you push the CPU too hard while capturing,
there will be nasty green lines flickering around, and you may lose
audio sync. You might also notice some control lag. You can reduce
CPU usage by reducing resolution, and by using a codec that doesn't
compress very well.
So, basically, having tons of hard drive
space available (a hundred gigs should do it) means that your
decisions get pretty simple. Having an awesome processor (dual core,
or even a quad-core) is also good, but by no means necessary.
But
hold on, we've got more fiddly little details to go over. Let's look
at resolutions.
This
is the resolution picker you'll find under the Video menu when
virtualdub is in capture mode. As you can see, it is set at 720x480
right now, which is the maximum size the Gamebridge can use. On the
right is the data format option, which is pointless because the
Gamebridge only does UYVY.
You can mix and match these sizes
however you want, they'll all work. When choosing the vertical size,
though, there is something to take into consideration.
This
is interlacing. The way television video signals are formatted
involves these alternating lines that are woven back together when
they show up on the tv screen. I don't know, someone must have
thought it was a good idea. Here's
the wikipedia article on it.
You can capture interlaced
video, it isn't a big deal. It will all be sorted out in a later part
of the guide. However, you can avoid interlaced video entirely. The
gamebridge captures a maximum of 480 vertical lines of video. These
lines contain alternating data because that's how it comes out of
your console and there isn't anything you can do about it. However,
if you cut your vertical resolution in half, the gamebridge will grab
240 regular lines, and the interlacing will be gone.
This
frame is from video that was captured at 720x240. Yes, that is a
weird resolution, and the recording looks smashed flat. After
resizing, though, it looks pretty good.
Here are some direct
comparisons.
The
image on the left was captured at 720x240, the one on the right was
done at 720x480. The differences here are pretty small. The only
things that really looks worse at lower resolution are the 2-d
elements.
You
can really see the difference in text. In the 240 shot, the font
almost looks broken.
Let's lay out the pros and
cons.
Vertical 480
Pros - Looks great
Cons - video is
interlaced, which is annoying to watch while playing, and takes more
time to process later
Vertical 240
Pros - Half the file
size of 480, no interlacing
Cons - 2d stuff looks pretty
bad
There are, of course, more numbers between 240 and 480. I
just don't think they're worth considering. Anything higher than 240
will have interlacing, and the lower numbers will look really
terrible while playing. 480 is good, but if you have to drop, I say
you should drop all the way to 240 for the benefits of non-interlaced
video.
Then there's horizontal resolution. Whatever. More of
it looks better.
Let's look at some
codecs!
HuffYUV
http://neuron2.net/www.math.berkele...rg/huffyuv.html
HuffYUV
doesn't have a logo. I wanted to put a logo here.
HuffYUV
is fantastic. It just works. It hardly requires any CPU power at all.
I think there are some wrist watches out there that can compress
video with HuffYUV. You don't even need to fiddle with it or
configure anything.
With HuffYUV, your computer can compress
720x480 video. Your processor would have to be really sad and old to
not manage it. In fact, if it was that old, you wouldn't have any USB
2.0 ports, and you wouldn't be able to use your gamebridge in the
first place.
HuffYUV is completely lossless.
FFDShow
- modified HuffYUV
http://ffdshow-tryout.sourceforge.net/
I
don't like this one as much. These guys built HuffYUV into their cool
codec pack, and added some new features.
This
is how to configure it. The Adaptive Huffman tables thing is new, and
increases compression a bit. However, you need to change the
colorspace to YV12. This will give you more compression, but you will
lose a bit of color data. There is an option to use the YUY2
colorspace, but I get weird problems with it sometimes.
Here
is a comparison between full colors and YV12 colors. In YV12, the
colors are sort of dingy and bleh. Note that if the colors in your
game are already dingy and bleh (brown), then you probably won't
notice the loss. I compressed some Resident Evil 4 in YV12 and it
looked fine.
Modified HuffYUV is not lossless, it drops a bit
of color data.
Lagarith
http://lags.leetcode.net/codec.html
this
guy doesn't have a logo either
Lagarith doesn't really
work with the Gamebridge. I'm just including it because A. It's
pretty sweet and B. Maybe some people with non-Gamebridge capture
cards are reading this. If your card can capture natively in the YUY2
colorspace, you probably want to use lagarith.
If you try to
use lagarith to capture video from a gamebridge, you will get pretty
horrible performance. Lagarith will have to convert the video into
one of the formats it works with, and that makes it very inefficient.
Lagarith is completely
lossless.
Alparysoft
http://www.free-codecs.com/download...Video_Codec.htm
Okay,
this one is weird. First of all, it calls itself a lossless codec.
True, it has a lossless mode. However, it sucks when compared to
HuffYUV. The useful thing here is the "Visually Lossless"
mode it has.
The
visually lossless mode will compress the video by doing something
that makes the picture slightly fuzzy. It doesn't look bad, it just
looks... well, slightly fuzzy. Using visually lossless-2 will
compress pretty good, without any noticable loss in video quality.
There is also an option to change the colorspace to YV12, which would
compress even more, at the expense of color data.
This codec
needs quite a bit of horsepower to work. It doesn't make use of
multicore processors, either. You will need to reduce the resolution
of your video to get to the point where alparysoft can compress it on
the fly. Using the YV12 option reduces CPU usage a bit.
One
more thing - Alparysoft puts a logo in the lower right corner of the
video. You can register for free by sending a string of numbers to
their website, but I'm way too paranoid to do that. The thing is, as
long as your horizontal resolution is 640 or more, the logo will end
up in the black space around the edge that you're going to crop off
anyway.
Alparysoft is not lossless, it makes video slightly
fuzzy.
XVid
http://ffdshow-tryout.sourceforge.net/
XVid
is brought to you by the fine folks who make FFDShow, who saw fit to
give XVid multithreaded encoding. That means, if you have a dual core
processor, this is the codec for you.
Configure it like
this.
Set
it to 1 pass-quality, then crank up the quality bar to 100%. On the
Generic page, change the Threads to 2 (or 4, if you have a quad-core
system). On the Motion Estimation page, you want things to be "Very
Low" and "Off". Then, down in the Input page, check
off the "Assume Interlaced" feature.
Xvid will
compress the crap out of your video. It is able to recognize
low-motion scenes and only compress the stuff that is moving around.
XVid is lossless if you configure it properly.
Benchmark
time!
I got these numbers by using several different tests.
The low motion test is just a Menu in Smash Brother Brawl with some
abstract geometry spinning around a bit. The Resident Evil 4 Spin
Test was just me holding down the analog stick and making Leon spin
around. I used a Smash Brothers Brawl cutscene to test some
high-motion content.
In order to compare the codecs evenly, I
ran each test at a resolution of 640x480. My processor is a Core 2
Duo E6300.
Low Motion (Menu Screen)
CPU Compression HuffYUV 25 3.1:1
Modified HuffYUV (YV12) 31 4.4:1
Lagarith 75 3.6:1
Alparysoft Visually Lossless-2 85
7.8:1
Alparysoft VL-2 (YV12) 70 8.5:1
XVid 65 25.2:1
Constant Motion (RE4 Spinning)
CPU Compression HuffYUV 25 2.7:1
Modified HuffYUV (YV12) 31 3.4:1
Lagarith 75 3.2:1
Alparysoft Visually Lossless-2 85
8.0:1
Alparysoft VL-2 (YV12) 78 8.9:1
XVid 67 4.9:1
High Motion (Smash Bros Brawl
Cutscene)
CPU Compression HuffYUV 25 3.8:1
Modified HuffYUV (YV12) 31 6.1:1
Lagarith 75 5.0:1
Alparysoft Visually Lossless-2 80
11.2:1
Alparysoft VL-2 (YV12) 70 18.2:1
XVid 90 10.9:1
Note than when CPU usage gets to about 70%, you start
getting a small bit of control lag. Things get worse above that.