Printable Version of Topic
Click here to view this topic in its original format
Unofficial VirtualDub Support Forums > Capture > Audio / Video Mismatch After Screen Capture


Posted by: MrSmite Dec 23 2009, 06:14 AM
Greetings,

I'm experiencing some minor audio / video issues after capturing video from my desktop and
am having difficulty coming up with a reasonable solution.

Tools Used:

HuffYUV 2.1.1
VHSCrCap - to simulate a capture device for VDub to connect to
VirtualDub 1.8.8

Video Source: Desktop (NTSC), 640x360

Method:

I select the region of the screen I want to record. Next I set up VDub to capture using
HuffYUV set to "fastest" at 29.970fps with 48,000 Hz PCM.

In the timing options I have both "Drop Frames" and "Insert Frames" selected as well
as the option to resample the audio to keep sync.

I record up to each commercial and stop, starting a new capture when the commercial ends.
I am able to capture with zero dropped frames and zero inserted frames.

The problem:

My problem is, the individual clips can not be appended together without losing sync. They play
fine individually but if they are appended, the audio goes out of sync at the third clip.

I noticed that the "Frame Rate" screen usually shows "No Change (29.970)" and "Change so audio
and video durations match (29.860) note, this second number changes from clip to clip.

During the capture, I see that the audio is usually being resampled to ~48,000 to 47,7989, varying for each clip.

What I've tried

GSpot shows "xxx MB unneeded data" on some clips while others are "file length correct".

Loading the file into VDub and using "Convert to FPS: 29.970" (under the "Frame Rate Conversion" section)
as well as resampling the audio back to 48,000 does not seem to line them up, the resulting file still shows
audio and video framerates are off by the original ammount.

Loading all clips into Sony Vegas 7 Pro and rendering the file does in fact correct the sync issue with
one major issue: GSpot showed in a 32 GB file there was 11 GB of unnecessary data at the end.

My Question:

How can I take each clip and fix them so that they can be appended together? I don't mind working on each clip individually as long as I can ultimately get them appended together.

My goal is to frameserve them to TMPGenc and ultimately put them on a DVD.


Thanks

PS:

What is this "Unnecessary data" that GSpot shows? I Google'd it but couldn't find a
suitable answer. It seems odd to me that 11 GB of a 32 GB file is "unnecessary"...

Edit:

Edited video source since I'm capturing off my desktop, not via a capture card or
camera.

Posted by: phaeron Dec 24 2009, 12:26 AM
For speed, VirtualDub doesn't attempt to cleanly match the ends of the audio and video streams, and just terminates both of them with the data that was received at the time that the capture was ended. This results in misalignment if you attempt to join the clips via the append option, because that option doesn't attempt to compensate (it's intended for scenarios where this specifically is not desired).

Posted by: MrSmite Dec 24 2009, 09:11 AM
QUOTE (phaeron @ Dec 24 2009, 12:26 AM)
For speed, VirtualDub doesn't attempt to cleanly match the ends of the audio and video streams, and just terminates both of them with the data that was received at the time that the capture was ended. This results in misalignment if you attempt to join the clips via the append option, because that option doesn't attempt to compensate (it's intended for scenarios where this specifically is not desired).

@phaeron,

Thanks for the info. I actually read that in the help files after my OP (sorry).

I'm curious then, what would be the best way to fix each clip so they can be appended? I noticed when I look at each clip's properties in VDub, the audio is shorter by about 1 ms or less (usualy something like: video = 11:23.47 audio = 11:22.36 or some such).

I'm very happy with the quality of the capture and after trying other programs (such as Camtasia which usually drops at least 1 frame), I'd really like to fix the clips I have.

I tried extracting the audio and extending it in both CoolEdit and Vegas but then when I tried "Audio from file" in VDub, the clips which were individually OK are now totally out of sync.

By the way, the original clips show a 0.0 sec preload yet even with Interleaving set to 0 ms preload, the "Audio from file" did not match up.

Posted by: Jam One Dec 24 2009, 02:24 PM
...Cut several of the ending frames off before appending another AVI ?...

Posted by: MrSmite Dec 25 2009, 04:55 AM
QUOTE (Jam One @ Dec 24 2009, 02:24 PM)
...Cut several of the ending frames off before appending another AVI ?...

Yes, that works pretty well.

I had to adjust my recordings but now the process seems pretty straight-forward. All I do is continue to record about 5 seconds after the video completes and then cut off those 5 seconds in VDub. This seems to allow things to match up.

Thanks.

Powered by Invision Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)