VideoHelp Forum
+ Reply to Thread
Results 1 to 2 of 2
Thread
  1. Member
    Join Date
    Jun 2008
    Location
    Netherlands
    Search Comp PM
    Hello,

    I was wondering what I should mind with regard to audio when capturing video to prevent audio/video sync problems. My purpose is to save a separate audio file in which the same parts have been cut from as those parts/frames that have been removed from the video (so no sync probs).

    I use VirtualVCR to capture video and audio. In VirtualVCR I can compress audio with a codec and that is saved to the same AVI file, right? I can do this like a plain WAV format or use MP2 (slighlty better than AC3 I read somewhere) according to the software.

    I want to edit it in VirtualDub but should I mind the way the audio is stored when editing in VirtualDub? Should I prefer WAV or MP2 when using VirtualDub? I read somehwere that I should use keyframes when cutting lossy formats like DivX but it is not necessary when using lossyless Huffyuv or Lagarith (all key frames). And is this aligment to keyframes for both audio and video? Or for video only? How about uncompressed audio (WAV)?

    I think VirtualDub has some native support for WAV files but it will request the speficic codec to cut a part of the encoded audio stream when I cut some frames from the video, right (in direct stream mode)? I also noticed that I can use full processing mode but that is not only limited to WAV files, right? For compressed/encoded input and output like MP2 as well (and should not give any problems)?

    Or should I abandon VirtualDub when it comes to audio editing and stick to AvitSynth for example? In that case I will load codecs in an AviSynth script and trim some frames from the movie (and AviSynth then knows which part of the audio to cut too I assume). Like this:

    Video = AviSource("C:\Video.avi")
    Audio = WavSource("C:\Video.avi")
    Trim(100,0,False)

    This file I will feed to HCencoder to encode audio only. I think this would be OK. Using WavLab (WAV editor) would be very labour intensive I think because I should match the video frames with the time (from which I should cut parts that correspond to the video frames) in the audio file based on frequency/sample rate.

    Further I'am using VirtualVCR which supports the resampling of audio (in case of dropped frames) in stead of adding duplicate frames when a errorneous frame is detected. What does the audio resampling mean? Can you give an easy example? Because the text on the site is rather vague.

    For example, I start with 44.1 kHz (which means a certain amount of sample points per second) and then when an error frame occurs it drops down to 40 kHz. How does this process takes place? Because I think the final file would be 44.1 Khz thus those samples that where captured at a lower rate will be played back at 44.1 kHz with no problems, right? Or has it to do with those video frames that were dropped too (dropped frames exactly aligned with those audio samples that were skipped in the bad frame, *1)?

    Is the lower kHz a result from cutting the error part like [xxxx....] (x are skipped samples, like at *1) or by equally dividing the sampling points like [x.x.x.x.] in which the first 4 sample points correspond to a bad video frame? I think the latter would be logically because a bad video frame causes a latency and to prevent messing up the capture process one can sample at half the normal rate. This would however be less accurate audio but can still be played back at 44.1 kHz. BTW: in my example [] represents a second with 8 Hz, 8 samples in a second (which represents 44.1 kHz).

    I hope my questions are clear and my line of reasoning as well.

    Thank you in advance,
    Last edited by rmdeboer82; 20th Mar 2011 at 14:39.
    Quote Quote  
  2. IMO if you plan on editing keep the audio as PCM during capture. Your avisynth script would read:

    Video = AviSource("C:\Video.avi")
    Audio = WavSource("C:\Video.avi")
    audiodub(audio, video)
    Trim(100,0,False)

    Audio resampling simply puts means noting how many audio samples are received during a given interval and then mathematically recalculating the samples to match the correct number for the given interval. In my experience virtualdub, virtual VCR et al all do what they say they will - ie resample the audio - but regardless of the basic frame grabber I've used the results, to me at least, have never been particularly satisfactory - the audio timing drifts around the video timing with lip sync problems etc. Hardware synced audio is IMO the only effective method for good audio sync.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!