Log in

View Full Version : Capturing VHS cassettes in AVI with VirtualDub- audio and video out of sync.


avz10
5th January 2013, 09:37
Apologies for this long thread. The topics of this thread are:

1. My big disappointment: Audio and video not synced.
2. Hardware
3. VCR connection to computer:
4. Chain of events in VirtualDub
5. My VirtualDub capture settings:

After studying the subject for a few months, I have started capturing my VHS cassettes with VirtualDub, the cassettes date to the late eighties and nineties.

I bought a JVC SVHS HR-S8960 in a very good condition. This one apparently has a built in TBC/DNR, i.e. Time Base Corrector with Digital Noise Reduction. (From an earlier post: the HR-S8960 does have the desirable DigiPure TBC/DNR feature)
I also bought an Avermedia A323 Mini Capture card second hand. I have a NVIDIA GeForce GT 520.

VCR connection to computer:
I found that the image quality of the Composite connection was better than the S VHS connection, so I am using composite.
I also cleaned the heads of the VCR just to get the best result possible.
After capturing an hour on a very “much used” cassette, I had no dropped frames.
http://i261.photobucket.com/albums/ii62/avz10/3-6_zpsda4d8674.jpg
My plan is to capture all the video cassettes initially and then one after the other move from internal E drive to my external HD with direct stream copy in VirtualDub.

Chain of events:
1. Initial capture with Virtualdub.exe and Lagarith and save on my second internal HD. Big file ± 70GB per 3 hours
a) Clean: Avisynth will process the video and send the clean video to VitualDub 32 bit.
b) Open Virtual Dub 32 bit version and open the Clean VHS.AVS
c) From here insert Reverse Field Dominance and select Celocida Codec.
d) After ending will get a cleaned Dv file.
2. Save in second internal HD as a DV file. (Size now much smaller)
3. Edit this DV file with Pinnacle
4. Now saving for future use- encoding, converting to MPEG and DVDs
I plan to keep the original big AVI files, should I need it in future

My VirtualDub capture settings:
Capture AVI
Device>Avermedia
Video >Preview
Video Source>Video composite
Video >Capture pin: PAL N; Frame rate: 25; Color space:UyUy; Output: 720x576
Video >Capture filter: Video decoder>PAL N>OK
Video >Crossbar: 0:Video Comp In-Video Decoder Out
http://i261.photobucket.com/albums/ii62/avz10/1-11_zps0fb470e8.jpg
4:Audio line in-Audio decoder out
http://i261.photobucket.com/albums/ii62/avz10/2-8_zpsaf984ae2.jpg
Video >Compression> Lagarith
Audio >Enable audio capture
>Volume meter
>Audio source: Audio line
>Capture device

I captured a cassette two days ago, while at work. As the video stopped after 3 hours and Vdub kept on recording- I had a massive file (more than 100GB).
Getting home, I stopped recording, but did not look at the parameters in the sidebar.
I opened the file in Vdub to delete the unnecessary parts and then found that the audio and video was out of sync. (Up to 3 seconds at the end of the cassette)
I deleted this file and started again to record the same cassette. Values while capturing: 66 000 frames captured after 44 min, 0 frames dropped/inserted; sync: VT adj +0ms; current error: 0
It indicated while capturing that there were no dropped frames or sync issues. But, playing the same AVI file on Vdub- using the internal E drive, gave me up to a ± 3 second delay between audio and video.

I then used one of the AVI files that I have captured a few days ago- this file also has a delay. So, it is not this specific cassette.

What I have not done in the past, prior to capturing “seriously”, was to change the crossbar. (See the 2 screenshots).

I plan to set up both VCRs over the weekend - my Sansui VCR and the JVC S-VCR, connect it to the TV and see if the videos have an AV delay. (I have in the past, while playing cassettes, never noticed a sync issue)

My questions:
1. Is there a way to overcome this sync issue? I am sure that moving audio will still not be 100%
2. Is a setting wrong?
3. Is there another program that I should rather use rather than VirtualDub to capture raw AVI?

manolito
5th January 2013, 21:48
I am not familiar with this specific Avermedia card, but I assume that it does not handle audio, so audio is captured via the soundcard.

In this case you have to set up VDub to take care of A/V sync, because the two different oscillators of the capture card and the soundcard will never be in perfect sync.

My capture timing setup looks like this:

http://i45.tinypic.com/35klo9j.png

Maybe you also have to check "Correct video timing for fewer frame drops". On my computer it was not necessary to check this option.


All your other settings look fine to me. Depending on the speed of your computer it may be necessary to "capture blind", i.e. disable rendering while capturing. And make sure that audio is captured uncompressed in 16/48 mode.

There is another software called VirtualVCR which is also capable to keep A/V sync. But I found that VDub does a much better job.

Your "chain of events" could be simplified. The conversion to an intermediate DV file seems unnecessary to me and causes a quality degradation (DV format is not lossless). You can just as well edit the captured AVI file directly.

One other thing I noticed: You are capturing at full PAL resolution 720 x 576. Depending on the chip used in your capture card (active capture area) this might result in a small aspect ratio error. Before you start capturing your whole collection of tapes, you better do some tests to make sure that circles stay perfectly round.



Good luck
manolito

avz10
16th January 2013, 20:32
Apologies for only replying now!

I am not familiar with this specific Avermedia card, but I assume that it does not handle audio,
This one has been modified and handles A and V.

With regards to Capture timer options, I set it eventually at "Sync video to audio" Now everything, as I notice, is in sync.

Your "chain of events" could be simplified. The conversion to an intermediate DV file seems unnecessary to me and causes a quality degradation (DV format is not lossless). You can just as well edit the captured AVI file directly.

Here I have a problem and need your help. I have numerous VHS cassettes that I am capturing now. Some are duplicated and I found some small ones in VHS C format, which in the past were copied to bigger VHS cassettes.

I think I have stated that I want to keep these "raw" AVI files for future purposes, if Mpeg in future might not be the flavour of the month in future??

I want to do a rough edit before I do my "final" edit e.g. delete some of the parts that are on VHS cassetes, insert some of the VHS C scenes into the VHS videos (in AVI) etc. The final editing I will do later in Pinnacle.

The ones that I have captured, I have tried to open in Pinnacle. Pinnacle does not open these files. Vdub opens them all.

Is there a programme that generally open AVI files with a basic editing mode? As I have said, the final editing will be done later, perhaps in MPeg in Pinnacle. Then I will compress as well.

Thanks for any advice

Mounir
16th January 2013, 22:39
You can try a simple avisynth script such as avisource("blahblah.avi) and after that you create a dummy avi with avs2avi (google it) and normally pinnacle should be able to open this dummy avi (it's been a while since i last used pinnacle products)

manolito
17th January 2013, 05:31
There are several tools to make "fake" AVIs which then can be read by other applications. One of them is avs2avi which was mentioned by Mounir. The other ones I am aware of are VFAPI, MakeAVIs (part of ffmpeg) and the AviSynth Virtual File System.

Of these the most reliable solution is probably AVFS. I remember reading only recently that avs2avi does not work under Win7.

Is there a programme that generally open AVI files with a basic editing mode?

If hard cuts is all you need, why don't you just use VirtualDub for basic editing? It is even reasonably fast if you use Direct Stream Copy mode.



Cheers
manolito

avz10
17th January 2013, 07:44
It is only hard cuts and I have deleted some sections using VD.

What I also want to do is to import cuts from the VHS C cassets and replace some parts that are on the VHS cassets with VHS C clips- these will be the same clips, but will be of a better quality, as these will be the original videos. i hope this is clear and not too confusing.

so, will I be able to import one piece of AVIinto another piece of AVI, using VD, or should I use the programs you mentioned above?

manolito
17th January 2013, 09:23
VDub's editing capabilities are quite limited, especially in Direct Mode, but it is certainly capable to do what you want to...

It is mandatory that your VHS captures and your VHS-C captures have been made using the same compressor (Lagarith in your case). Create a new text file containing the following line:
AVISource("My_VHS.avi") ++ AVISource("My_VHS_C.avi")
and give it an appropriate name with the .avs extension.
(This makes an "Aligned Splice". Using VDub's command "Append AVI Segment" would make an "Unaligned Splice" which could cause A/V sync errors).

Open this file in VDub. Use the selection commands and assemble your target video using the Cut, Copy and Paste commands from the menu. Don't forget to delete the unused VHS-C parts before saving to a new file. BTW the VDub help explains the whole procedure quite well...


Cheers
manolito

avz10
24th January 2013, 13:20
Thanks for the replies.

I am now at the stage where I want to do a "finer" edit in Pinnacle.

I have arranged the AVI files in folders, using years- 1989-2005.

I want to combine the 4 to 5 AVI files in each folder, edit it and export as one AVI file back into the folder. Then I can delete these "components" (these 4/5 files)

When I use Pinnacle (Ultimate 15), I can import the files on to the storyboard or time line, and it does play the audio in Pinnacle, but there is no image. Pinnacle also has the ability to export it as an AVI file. At a later stage, I will convert to mpeg 2 and create DVDs.

So, this means, I will need to create "fake" AVI's as mentioned above.

There are several tools to make "fake" AVIs which then can be read by other applications. One of them is avs2avi which was mentioned by Mounir. The other ones I am aware of are VFAPI, MakeAVIs (part of ffmpeg) and the AviSynth Virtual File System.

Unfortunately, I am totally ignorant with regards to scripts, AviSynth, etc.

Is it possible that someone can talk me through this process? E.g. "download..., add the file, convert to..., etc? Or is there a good tutorial??

Thanks a lot

Albie

Mounir
24th January 2013, 23:59
The script couldn't be more basic it's just the video source such as: avisource("blabla.avi") one line script
then to create a dummy avi with avs2avi (i've never tried the other) you basically just drag the avs script to avs2.avi.exe and it will create it. But on win7 x64 it don't work it seems , on Xp x86 no problem