PDA

View Full Version : capturing VHS with SAA7134, nvidia vivo, or through DV ?


pcat
13th June 2007, 17:32
Hello,

I would like to archive my old collection of vhs tape at the best possible quality, given my options:

- I can do a dv capture with an old PC8 sony miniDV from a VHS deck
- I can use a terratec cinergy board (with a Philips saa7134 chipset)
- or I can use an Nvidia 6600GT with VIVO (not sure about what type of chipset are used on these board for the analog video stage)

I have read that the saa7134 have some good built-in denoising filters, but only on the composite input. I have also seen here and there some for complex avisynth scripts for processing vhs capture (stabilizing, denoising, fixing chroma...)

I'm not sure on the way to follow, and which kind of processing to apply after the capture, given the filtering already done by the hardware (if any).

Thx for your comments or suggestions

nikolai
14th June 2007, 05:30
What do you mean by "archive"? Do you want to burn DVDs with best-available quality? As an aside, VHS isn't that great quality-wise to begin with, but I understand your desire to preserve as much as possible of whatever is there.

Or do you want to save the video for posterity? In that case you will be looking at files that are much larger to archive.

Capturing to DV over Firewire may be the best place to start. Or maybe not. If DVD is your ultimate goal and you have the right hardware and software you might be better off capturing through your analog capture board and encoding directly to MPEG2 (the native format needed for burning DVDs).

Capturing to DV will require 13 GB per hour. If you capture straight analog video without real-time MPEG2 encoding you're looking at approx. 65 GB per hour (130 GB for a 120 minute VHS tape). Disk space requirements play a big role in whatever method you choose.

If you have a lot of tapes, you can capture to DV on your computer and then dump the DV back to your MiniDV camcorder for safekeeping. You'll need 2 MiniDV tapes for every 120 minute VHS tape. One of the advantages of DV is that once you have it you can copy it over and over again without any generational loss. Once you encode to MPEG2 (or any other lossy encoding) the information that's lost in the encoding process is gone forever. Unless you keep the original tapes (or maintain the captured DV footage someplace).

It's a very, very broad topic. You might want to browse the forums for some more ideas.

pcat
14th June 2007, 11:12
What do you mean by "archive"?


I was meaning that these VHS tapes were to be thrown away after being digitized, so the capture process should preserve as much as possible of the original content as the latter won't be available in the future for a new capture.

I know that VHS isn't great qualitywise, and I this is why I want to optimize the capture process, in order to not degrade further the original content. I have only 12 tapes of 20 to 50min, but these tapes are important to me (rare sport footage I shot)


Do you want to burn DVDs with best-available quality? As an aside, VHS isn't that great quality-wise to begin with,


I'm not dealing with the final format. I'm only concerned about the capture process to either a huffyuv (preferably), or DV if the VHS to miniDV is the best way do the capture. From that, I will likely recompress MPEG2 or h.264 versions for playback, but this is not what I'm talking about in this post.


but I understand your desire to preserve as much as possible of whatever is there.

exactly.


Capturing to DV over Firewire may be the best place to start. Or maybe not. If DVD is your ultimate goal and you have the right hardware and software you might be better off capturing through your analog capture board and encoding directly to MPEG2 (the native format needed for burning DVDs).


DVD/MPEG2 is not the ultimate goal : ideally, I would like to get huffyuv output, preserving the more quality as possible. I mean preserving most of the details and filtering out most of the noise and chroma problems (if possible).


It's a very, very broad topic. You might want to browse the forums for some more ideas.

I had browse the forums a lot. The most relevant info I got were from Scharfis_brain posts from 2003/2004. May be current state of the art for VHS capture have changed since then. If not, I will try to work from the AVS scripts he proposed at that time...

Regards

chipzoller
14th June 2007, 16:03
The most important things to consider when capturing VHS are the VHS deck itself (if you can manage one with a TBC that would be optimal), the connection out of the deck (s-video if at all possible because chroma won't bleed, eliminating the need for any hard/software comb filters), and the capture card and resolution. As I always capture mine in lossless format, I make sure I have the highest quality output before the signal even makes its way onto the capture board. Are your choices of hardware you mentioned in the first post all you have and/or are willing to use?

pcat
14th June 2007, 16:45
The most important things to consider when capturing VHS are the VHS deck itself .... Are your choices of hardware you mentioned in the first post all you have and/or are willing to use?

Unfortunately, all I have is a quite good consumer-grade VHS deck and a Sony-MiniDV. I probably could manage do rent an SVHS deck if it's worth it. I can also use an old DV500 board (which I removed from my PC because of endless drivers problems), but analogue capture quality didn't seem better than with my current saa7134 (as a side note, svideo AND composite capture from a DV source were almost identical with the dv500)

nibbles
14th June 2007, 17:46
I would note that, having used the 6600 GT VIVO, that NVIDIA hasn't updated their WDM driver since Sept. 2005, because they are lazy and don't want to have to port it to 64bit XP. So there are things that won't work when capturing with that, like the WDM sharpness, white level, and black level for instance sliders are all stippled out when I access those using Virtual VCR. I've since switched to using an ATI Theater 650 based dedicated capture card where all the sliders work and the drivers are still being released. There's been at least 2 new versions this year. Plus I now use iuVCR, which is still being developed and is very much worth the $25.

A couple of things to watch out for when capturing. First off is the color and luminance levels, which easily change (for better or worse) what gets recorded. Those levels do not have reasonable default values (200 for the sharpenss is crazy). So you usually have to make adjusments. This will leave you wondering what exactly was on the VHS tape in the first place. Make several small captures, and do you best to get the levels correct. If you throw out the tapes, you can never go back and make it brighter. All you can do is tweak what you recorded. Secondly is the file size issues. I use a dedicated WD Raptor 150 GB harddrive, but a pair of Seagate 7200.10 drives in a RAID array is just as good if not better because they have so much more capacity. Be sure nothing at all is on the storage drive, then do one capture, then defrag, then do another capture, then defrag, then a final capture.

What I like to do is capture the same VHS tape 3 times at least, then carefully sync the three, frame for frame, then average the three captures.

There are two sources of noise in a VHS tape, what I call inherited noise and induced noise. The inherited noise is what got recorded onto the VHS tape and will appear the same way every time you play it. The induced noise creeps in during the capture process by capacitive coupling and induction from EMI/RFI crap flying around your office. The induced noise appears as grain mostly and is different during each recording.

By averaging captures you can minimize the induced noise.
By post-processing using AVS, you minimize the inherited noise.

The VHS is interlaced source. DVDs are native interlaced. So keep the capture/average/final as interlaced. To post-process interlaced material, scharfis has it well covered. What I do is what has been covered a lot by him and others, something like this in my AviSynth script:

Load plugins
Load seesaw script
Load averaged capture video, forcing fps to NTSC, cropping to 704x472.
LeakKernelBob() < this temporarily deinterlaces it
Convert to yv12
Seesaw with DeGrainMedian, MVAnalyze, MVDegrain2, etc
Convert back to yuy2
Adjust chrominance and luminance if necessary with HDRAGC etc.
Selectevery/Weave to get it back to interlaced.
Add in 8 pixels on the bottom to replace the head scanning noise that I cropped out so the final size is 704x480.

That's what I figure does a good job, but the colors and luminance part during capture are really critical. Also like someone else said, get a professional JVC S-VHS deck, otherwise garbage in, garbage out. You can resell the deck later. You might put a TBC in the chain. Probably a good idea, but that can lead to very slight timing differences between how fast the deck puts out frames compared to how fast the TBC clocks frames compared to how the capture card clocks frames. Very very slight differences in clock crystal oscillations over the course of 2hrs will lead to the TBC or capture card duplicating a few frames or dropping a few frames or blending two frames to keep everything in sync. You will only see this when you compare the three captures frame for frame. I use AvsP to do all my scripting work in. It's amazing!

Keeping audio sync is a complete bitch. I do this quite often, and it never comes out dead perfect every time. Sampling rates and clock rates come into play again. It might help to have a VHS/DVD-R combo deck handy to make a master burn which you can always go back to and check sync on that.

It can be said that a Canopus ADVC 110 that captures to DV so well and locks the sync is a good thing. But because DV is lossy, I'm gonna stick with a capture card.

Good luck, nibs

pcat
14th June 2007, 22:27
Nibbles, thank you so much for your tips :-) !

I didn't knew about the "averaging" method, this is very interesting. How do you manage to "sync" perfectly the captures, this seems tricky to me?
Does it provide significant improvement over the more traditionnal temporal noise filters ?

Thanks again !

nikolai
14th June 2007, 23:31
Great advice from nibbles. I wasn't even aware of those nVidia VIVO issues. One issue I am aware of is that the Philips chipset has a nasty habit of detecting Macrovision even when there is none actually present on the original tape. It's worse when the tape is older and has a lot of noise. I don't know what chipset ATI uses and if that's an issue there or not.

If you only have 12 hours of video your disk space requirements won't be too bad. Another reason I like nibbles' post is I just ordered 2 of those 7200.10 Seagates yesterday :) Less than a hundred bucks apiece on sale.

nibbles
18th June 2007, 08:13
Syncing frame for frame multiple captures is tricky.
Clearly all captures need to have the same total number of frames.
They need to start on the same frame. In the end, all three will
end on the same frame, but to begin with they won't.

I use AvsP as my development tool for this. Try it if you haven't.
I open up 6 tabs for 6 scripts in AvsP. I subtract clip1 from clip2
and use Histogram(mode="luma") to emphasize the difference.
When the two clips are on the same frame, the difference
between them is basically only noise. When the two clips are
out of sync, the difference is glaring. Here are my scripts I
open in AvsP.

1) Subtract12.avs
2) Subtract13.avs
3) Clip1.avs
4) Clip2.avs
5) Clip3.avs
6) Common.avsi

This is how they look:

Subtract12
Import("R:\Projects\gd91-09-24\common.avsi")

Subtract(c1,c2)
Histogram(mode="luma")

Subtract13
Import("R:\Projects\gd91-09-24\common.avsi")

Subtract(c1,c3)
Histogram(mode="luma")

Clip1.avs
Import("R:\Projects\gd91-09-24\common.avsi")

c1

Clip2.avs
Import("R:\Projects\gd91-09-24\common.avsi")

c2

Clip3.avs
Import("R:\Projects\gd91-09-24\common.avsi")

c3

Common.avsi
c1=AVISource("R:\Projects\gd91-09-24\gd91-09-24a.1.avi", false, "YUY2").Trim(26,126480).crop(8,0,-8,0,true)
c2=AVISource("C:\Temp\video\gd91-09-24a.2.avi", false, "YUY2").Trim(10,126463).crop(8,0,-8,0,true)
c3=AVISource("C:\Temp\video\gd91-09-24a.3.avi", false, "YUY2").Trim(22,126476).crop(8,0,-8,0,true)

c1=c1.DeleteFrame(278)
c2=c2.DeleteFrame(1630)
c3=c3.DeleteFrame(6857)
c2=Trim(c2,0,11933-1) + Trim(c1,11933,11933+1) + Trim(c2,11933+1,0)
c1=c1.DeleteFrame(18338)
c2=c2.DeleteFrame(26785)
c3=c3.DeleteFrame(26785)
c3=Trim(c3,0,35247) + Trim(c2,35248,35248) + Trim(c3,35248,0)
c2=c2.DeleteFrame(36979)
c3=c3.DeleteFrame(39558)
c1=c1.DeleteFrame(52879)
c2=c2.DeleteFrame(71639)
c3=c3.DeleteFrame(72094)
c1=c1.DeleteFrame(86690)
c3=c3.DeleteFrame(104395)
c2=c2.DeleteFrame(105892)
c2=Trim(c2,0,108380) + Trim(c1,108381,108381) + Trim(c2,108381,0)
c1=c1.DeleteFrame(120172)
c1=Trim(c1,0,120367) + Trim(c2,120368,120368) + Trim(c1,120368,0)

Here's where it gets a little tricky. Whenever you use a line in
Common.avsi like c1=c1.DeleteFrame(1234), whenever
you delete a frame from clip1 you have to add 1 to the last
frame number in your Trim command so the total number of
frames remains constant. So this line:
c1=AVISource("R:\Projects\gd91-09-24\gd91-09-24a.1.avi", false, "YUY2").Trim(26,126480).crop(8,0,-8,0,true)

becomes this:
c1=AVISource("R:\Projects\gd91-09-24\gd91-09-24a.1.avi", false, "YUY2").Trim(26,126481).crop(8,0,-8,0,true)

Conversely, whenever you add a frame, you must decrease the
final frame number in the Trim command.

Every time you make changes to Common.avsi, you then save
that file and switch to each of the other tabs and hit the F5
function key which reloads their scripts causing them all to
reread Common.avsi.

So I start with a bare Common.avsi that just gets all the clips
to start at the same point and same total frames. I make
sure that the total number of frames I use is at least 10 frames
less than what the shortest clip total is. By not using the last
10 frames you leave yourself room to +1 to their Trim command
without running out.

With Common loaded and all the other scripts loaded, I switch
to the Subtract12 tab, press F5 to reload and refresh the
preview window and hold down the "down arrow" key, which
fast-forwards through the clip, jumping by 1sec at a time.
As I'm holding the down arrow, I the mouse click the Subtract13
tab, then about every three seconds or so I click back to the
Subtract12 tab and back and forth watching the preview on
both tabs.

I'm looking for either or both Subtract tabs to show a glaring
preview when the clips go out of sync. Either

Clip2 goes out of sync with clip1, which you see in Subtract12.
Clip3 goes out of sync with clip1, which you see in Subtract13.
Clip1 goes out of sync with both, which you see in both Subtract tabs.

Those three options cover all the possibilities, but I encourage
you to do the mind games on your own whiteboard until you're
convinced. The possibility that a dupe/blend/missing frame
issue occurs in 2 clips at the same frame # is very remote.
So I don't bother worrying about that. Only 1 clip has a problem
at any given time, basically.

Let's look at those three possibilities:

When clip2 gets out of sync with clip1, you will see the glaring
result looks much brighter than when you look at the subtraction
of clip3 and clip1. So you stop at the frame where it went bad,
and you decide if that frame was duplicated, blended with the
next frame, or missing. Those are your choices. Most of the time
it's a duplicated frame. To make the decision, you switch to
the real clip2 and left/right arrow to step frame by frame forward
and back to see if it's a dup/blend/missing. You can see from
my common.avsi how many times I got dupes by all the delete
commands I had to use. Often times it's easiest to guess it's
a dupe and just try a DeleteFrame() command. A dupe frame
shows itself often by being a bit more focused and shifted up by
1 pixel.


If clip3 gets out of sync with clip1, then you'll see on Subtract13
that it goes out, but Subtract12 will still look ok because those
two clips still agree.


But if clip1 gets out of sync, both Subtract12 and Subtract13
will look glaring, because clip1 differs from both clip2 and clip3.

Because AvsP allows you to make macros of commands and
clicks you regularly make in it's window, you can automate
the modifications to Common.avsi. So I just press Alt+F4
on my comp, which is my Duplicated Frame macro, and it does
all the mods to Common.avsi and reloads the scripts. Good
stuff that.

Once you have all clips in sync, then use this script to average:

ThreeAverage.avs
Import("R:\Projects\gd91-09-24\common.avsi")

Interleave(c1,c2,c3)
TemporalSoften(1,255,255)
SelectEvery(3,1)
Load that into VDubMod and you're set. Good luck!
nibs

pcat
18th June 2007, 11:43
Nibbles, you should be a wizard and all this looks like black magic to me ;) . I won't go right now in such a complex process which I don't master, but sure I will try to experiment with it :-)

Thanks a lot !

pinkish
19th June 2007, 02:24
i don't want to "hijack" this thread or anything, but i saw what nibbles wrote in the past few posts and i would like to ask him something like pcat asked in the first post:

- i have VHS tapes that i want copied to my hard drive. computer specs i can do, no problem. what i want to ask you is: what capture device and tbc do i need to get the VHS tapes to my hard drive? i just want the videos in sync with no dropped frames. i don't want any post-cleaning of the video or other editing.

this is what i want to do:

VHS tape -> capture card/tbc -> computer file format (dv, i-frame mpeg2, uncompressed or whatever you say is best)

i won't convert any further (to dvd or whatever)

thank you.

nibbles
20th June 2007, 16:42
Pcat, it took me a while to learn that, heh. Lots of searching
through Doom9.

Pinkish, if you want to capture to a compressed format like DV or
MPEG2 or MPEG4 with perfect sync and no intentions of post-
processing, then you would do well to simply get an Canopus
ADVC 110 I think it's called. That is an external capture device
that preserves sync and captures to DV, outputting that format
to your computer via 1394 or USB. A second choice would be to
use the ATI Theater 650 card like I have, but rather than capture
using WDM and iuVCR, you would capture using the supplied
Catalyst Control Center to MPEG4. As far as putting a TBC
in the analog chain, a low cost but well respected model is the
AVTools AVT8710. Not sure of the Canopus has a TBC builtin.
I would try captures with and without the TBC, and I would
suggest a high quality JVC S-VHS deck for playback.

Good luck,
nibs