Audio out of sync after VirtualDub
Hi guys, I'm getting bad results with one particular file. A script i've been using with no problems is now giving me audio issues for one captured file.
It hasn't happened with any other captures. Other videos give correct results. I'm guessing the video is losing frames in the process, but how do i fix this? Why would this only happen to only one file? Here is the script i'm using for the video. I only adjusted the 'top' crop / AddBorders. HTML Code:
ConvertToYV12(interlaced=true) |
Is the original capture in nsync?
Your script deinterlaces the video, doubles the number of frames, and doubles the frame rate. |
yeah the original capture is in sync.
The tape i used wasn't in the best condition compared to the other tapes / captures. Not sure if that would have any affect |
The only "processing" of your video that should be going on is done by Avisynth. VirtualDub just transmits the results from Avisynth to whatever new file and location you specify. Vdub shouldn't be doing any processing of its own, neither video nor audio. In VirtualDub, audio should be output using "direct steram copy" and video should use "fast recompresss".
As noted earlier, the output from VirtualDub will have double the original frame rate and double the number of original frames. The output video should retain the YV12 colorspace that Avisynth outputs. The audio sampling data during capture should be uncompressed PCM audio at 16-bits, 48Khz. Audio should stay that way until you're ready for your final encode into whatever delivery format you have in mind. You can use video properties menus in VirtualDub or your NLE or something like the free MediaInfo utility to get data statistics from your source files and compare them to your output files. With no sample of the original capture it's not otherwise possible to say what could be going on. |
2 Attachment(s)
All my settings were as you described. Here's the media info for the before and after file.
source: Attachment 4287 script: Attachment 4286 |
It's not necessary to make images of MediaInfo panels. The image only shows the "General" info panel. MediaInfo gives a lot more info in the "Text" view, which can be copied and pasted into a post or saved and attached as a text file. Here is a text copy from "Text" view of one of my captures:
Code:
Complete name : E:\GDSMAN\B\B.avi That might not solve the problem entirely, which is a big bug with Qtime and DV captures. Some Avisynth code that can set things straight (assuming you have audio set to full processing mode) is this code that you can use at the end of a script, or just run a script that opens the deinterlaced AVI and adds this line: Code:
AssumeFPS("ntsc_double",sync_audio=true) |
Wouldn't extra code only be useful if it was happening to all my videos?
If possible, i'd rather figure out why one video has audio issues when the other of 30+ videos. i tried to change the conversion to 48khz, but that did not work. Also, i do not believe this a DV capture. |
Quote:
Quote:
Quote:
When you say you think "this" is not a DV capture, which image do you mean? The upper image is MPEG-4 encoded with ProRes in a QuickTime container, isn't it? Did you notice the top video's frame rate ? (it's not 29.97). The lower image wouldn't be DV. Did you notice that the two video versions have a different running time? Is the source video another skating compilation, or is it a recording based on film or movie source? Not enough info to go with. So far the previous questions haven't been answered. But in general I'd say your original capture doesn't look right. For one thing, the frame rate is off. I'd consider a re-capture. I'd also suggest that if the original source is telecined material, you can't use a deinterlacer on it. What is the general content of the source video? |
Source
Code:
General Script Code:
General |
I did a recapture but got the same results. The video is one of a series, and this is the only video from the series or any video that has given me this problem with this script.
|
Thanks for the info text.
The problem I see is that your capture used a variable frame rate. Should be fixed rate, 29.97 fps for NTSC. |
1 Attachment(s)
|
Bet framerate? Best for what? Maybe you better set it to the framerate of your source video so that the video and the audio will run at same constant frame rate.
Turn off autogamma ! ! ! ! ! ! |
best is the default, which is why asked if that is what i should change to 29.97....
Also, i recaptured with the 'correct' settings ( i changed best to 29.97), and ran the script but got the same results. I checked the media info and it is almost identical to the capture i used with "best". Framerate still says "variable". Not sure if it's the software or the tape.. |
You would have one file after capturing, another file after running the QTGMC script. The file to scheck for audio sync is the capture file, not the deintelaced file. Your capture might have video that shouldn't be deintelaced. What is the source tape's content? Skateboarding? A movie? What does mediainfo say about the captured tape before it was deinterlaced?
|
The content is rollerblading (action sports).
The captured file does not have audio problems, the file after running the QTGMC script has the bad audio sync. The mediainfo info for both the captured source and the scripted file are posted above on post #10. I've been going through more tapes, and i've been seeing this problem more and more but only with older tapes (93-98). Although some tapes from the same year have good results with no audio problems. The content looks better after running the script, so i'm not sure if the video shouldn't be deinterlaced or not. I believe the video is dropping frames during the script process resulting in this bad audio sync. |
QTGMC doesn't drop frames. If your capture has a variable frame rate, you can't have good audio sync. When the frame rate doubles for deinterlacing you can't properly maintain a/v sync. Variable frame rates are not allowed with DVD/BluRay/AVCHD. Also you're capturing at the wrong audio rate (44KHz), which is invalid for DVD/BluRay/AVCHD.
Someone familiar with your ProRes setup will have to help with avoiding VFR and audio sampling rates. I'm using Windows XP and VirtualDub/huffyuv for losssless capture from VHS for years now and have never had the problems you're having. |
Well something is happening between the script process. Even when i put the captured audio over the scripted file it's out of sync.
I tried to explain this before, but this problem usually occurs with very old tapes. I think this is due to poor tracking, but the picture will be 'jittery'. Here is a short clip showing what i mean. https://www.dropbox.com/s/20ubwqbzgc...est-1.mov?dl=0 You said the audio rate is wrong, but didn't say the correct rate. I have no plan to ever put these on DVDs. I've also used this method on countless other videos that gave great results. I tried the smart deinterlacer plugin with VirtualDub and it still gave me an out of sync file although it wasn't as bad as the AviSynth method. Handbrake gives me an in-sync file, but the quality doesn't compare. |
The audio rate to use depends on your plans for final output.
The video test-1.mov is a clip of some jittery titles and some clouds passing over the moon. What is the audio supposed to be in sync with? The PCM audio is sampled at a 24-bit rate, and tries to play back at 32-bits. Both are invalid for PCM. PCM is 8-bit or 16-bit, preferably 16. That video looks as if it's jumping all over the place in the tape path. You need a line tbc of some kind and a frame-level tbc as well. I don't recall what you might be using for those two components. If you already have them hooked up, you're working with some dreadful tape on a player that has a real hassle trying to track it. |
Right now i'm only using the TBC that comes with the JVC SR V10u. It works for most tapes, but a lot of tapes that are in 'poor' condition it doesn't help much. If i turn off the TBC, it stabilizes the image but about 20px of the top image is useless due to 'warping'? i'm not sure of the correct term for this.
Something i just realized, which may tell why the audio is out of sync... On the video i run AviSynth scripts on, which has audio sync problems, a certain scene is at - 11:08. On the captured file and the Handbrake deinterlaced file that same scene is at - 11:20 I'm not sure what this means, but it shows why the audio would be out of sync on the AviSynth files. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.