VideoHelp Forum
+ Reply to Thread
Results 1 to 16 of 16
Thread
  1. Member
    Join Date: Dec 2007
    Location: Puerto Rico
    Search Comp PM
    Usually to save hard disk space I convert downloaded files from say a 640x400 resolution MPG, AVI or WMV to a 320x240 standard DIVX encoded AVI file and usually the conversion takes place without a hitch but sometimes the audio of some files just lag in a progressive manner, to say it's starts ok but loses sync as the video progresses so that by the time the video is finished the video and the audio are one mile away from each other! So what is the procedure to fix this. I do have VirtualDubMod and VirtualDub as well, so I have the tools but would like to know how to fix this particular type of audio lag using the programs I mentioned before. I know they are used for this stuff but not the correct way to use them to fix this so any help would be greatly appreciated Thank you!
    Quote Quote  
  2. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    progressive desync usually means different lengths of video & audio

    there are many guides and ways to attempt a fix. Here is one guide, skip to the 2nd situation:

    http://www.gromkov.com/faq/faq2004-0064.html

    The other possibility is that your source file has a variable frame rate (VFR), if you search , this topic has been addressed here several times as well. Only certain containers (e.g. mp4, mkv, wmv) support this, so if you source was AVI for example, it most definitely is not VFR
    Quote Quote  
  3. Member
    Join Date: Dec 2007
    Location: Puerto Rico
    Search Comp PM
    Thanks I've downloaded the programs there and basically most of them do separately what VirtualDubMod and VirtualDub do as a one package deal.
    I've used the programs there and the VirtualDubMod, VirtualDub programs to no avail, either the audio skips too far ahead or lags if I skew it and saving the audio file separately and re-merging it latter on has not worked at all. So I truly am out of ideas here!
    Quote Quote  
  4. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    I don't think you understand.

    It's NOT a skew correction (like in vdub), that is for constant delay scenario. (That just shifts the audio +/- delay). Here the duration is the same, and you can fix it with a skew, or audio delay +/- (in this example below you can shift the audio right 1 segment to make it line up)

    Code:
    _vvv
    aaa
    The progressively worsening scenario means different length audio & video. You described it as initially lined up
    e.g.

    Code:
    vvvvvvv
    aaaaa
    video 100sec
    audio 99sec

    In this scenario you would stretch the audio by 100/99 to match in an audio editor (e.g. audition, soundforge, audacity). You could also slow the video by 99/100 in this example, that would work as well. The last program in that link can adjust the frame rate. Did you try it or follow the instructions?

    You can sometimes determine the audio & video length with mediainfo (view=>text) but it is sometimes incorrect if the video is damaged

    The other possibility is that you have glitches/desynch points that throw the audio off at each glitch - you would have to process the video in segements or cut out the offending section. In this case you have to take each "good" section, apply the skew (audio shift) correction then join, you could do that with vdub or avidemux

    And I have to ask the Capt. Obvious question(s): is your original source file in sync? And how did you convert it?
    Quote Quote  
  5. Member
    Join Date: Dec 2007
    Location: Puerto Rico
    Search Comp PM
    I have mediainfo I've ran it and this are the results: It says that both Audio and video are 1 hour and 14 minutes long. The bit rates for audio and video are radically different though for the video is 201 KBPS while the audio stands at about 56 KBPS.
    Quote Quote  
  6. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    It's likely that it's reporting it incorrectly (e.g. just reading the header info, but the actual video & audio data might be different, or damaged).

    The bitrate has nothing to do with sync issues.

    Instead of fixing it, another option would be to try another converting method. You haven't given enough information. If you don't feel like answering the questions that were already asked I can't help you.

    1) Is the original file in sync
    2) Any glitches in the original file
    3) What format is the original file? (avi, mkv etc...)
    4) How did you convert it
    5) Any glitches in the converted file?
    6) When does the desync occur?
    Quote Quote  
  7. Member
    Join Date: Dec 2007
    Location: Puerto Rico
    Search Comp PM
    Originally Posted by poisondeathray
    1) Is the original file in sync
    It was I sadly deleted the considerably larger file after I had made the more compact copy, because at the time I had no clue something was wrong, because is not noticeable until at least 8 or more minutes of playback time...

    Originally Posted by poisondeathray
    2) Any glitches in the original file
    Not that I could hear or see...

    Originally Posted by poisondeathray
    3) What format is the original file? (avi, mkv etc...)
    AVI.

    Originally Posted by poisondeathray
    4) How did you convert it
    I used Video Edit Magic to recompress to a 320x240 WMV format and then in turn convert the WMV Draft copy to AVI and finally use virtualDubmod to create the final AVI file in DIVX format.

    Originally Posted by poisondeathray
    5) Any glitches in the converted file?
    Since the glitch or glitches are not detectable until after 8 minutes or so of playback I had not noticed anything wrong until it was too late...

    Originally Posted by poisondeathray
    6) When does the desync occur?
    At about 8 minutes or so of playback or at least that is when it becomes noticeable it could be that is that point that one could really discern that is occurring.
    Quote Quote  
  8. Member
    Join Date: Nov 2002
    Location: United States
    Search Comp PM
    Open the AVI in Virtualdub > go to the last frame and note the time of the video.

    Open the audio in Goldwave and check to see if the audio length matches the video.

    If not, use the Time Warp feature under Effects to make the audio the same length as the video.

    Save the audio ( mp3 ? ) and under audio in Virtualdub > click "audio from other file" and select the file that you saved with Goldwave.

    If the audio is still out of sync after using Goldwave then use the audio interleave feature in Virtualdub. You have to experiment until you get it right.
    Quote Quote  
  9. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    When you say "glitches", is there a distinct video and audio discrepancy at a certain point in time?

    If so, and if you want to salvage what you have, you have to process it in segments.

    Identify ALL the glitch points. There will be an audio offset at each point in the encoded video (usually about -200ms or so). These will accumulate over time (i.e. about -400ms after 2 glitches, etc....)

    Cut it up in vdub or avidemux into "good" sections. Fix each segment by using the skew correction in vdub or audio shift in avidemux. Then join them all

    If the audio & video don't match in duration for each "good" section you have to stretch/shrink either the video or audio to match as described earlier
    Quote Quote  
  10. Member AlanHK's Avatar
    Join Date: Apr 2006
    Location: Hong Kong
    Search Comp PM
    Originally Posted by PunkMaister
    I used Video Edit Magic to recompress to a 320x240 WMV format and then in turn convert the WMV Draft copy to AVI and finally use virtualDubmod to create the final AVI file in DIVX format.
    Why go through WMV? I often have sync problems when using WMV files.
    Just load the original AVI file in VirtualDub, resize with its filters, save as a new AVI?
    Or do the same with AviDemux, which I find very stable for such conversions.

    That doesn't help much with fixing what you've got now though.
    As the sync seems not to smoothly vary, if you can find where there are jumps, try cutting it into segments (with Avidemux or VD). Then you may be able to skew each segment back into sync, and finally rejoin.
    If you need to stretch the time, you can demux the audio to WAVE and use a sound editor.
    Quote Quote  
  11. Member
    Join Date: Dec 2007
    Location: Puerto Rico
    Search Comp PM
    Originally Posted by poisondeathray
    When you say "glitches", is there a distinct video and audio discrepancy at a certain point in time?

    If so, and if you want to salvage what you have, you have to process it in segments.

    Identify ALL the glitch points. There will be an audio offset at each point in the encoded video (usually about -200ms or so). These will accumulate over time (i.e. about -400ms after 2 glitches, etc....)

    Cut it up in vdub or avidemux into "good" sections. Fix each segment by using the skew correction in vdub or audio shift in avidemux. Then join them all

    If the audio & video don't match in duration for each "good" section you have to stretch/shrink either the video or audio to match as described earlier
    That's just it it seems more like the desync very slowly but surely progresses up till one can hear that is not in sync as opposed to a solid boundary where it just abruptly desync... I watched the video with a counter on and it was not after 10 to 11 minutes to be exact that one can discern that something is wrong and even then is still barely noticeable but there but since it keeps progressing about 5 to 8 minutes after that it becomes unmistakable that the Sync problem is just growing and growing as playback time goes on...
    Quote Quote  
  12. Member
    Join Date: Dec 2007
    Location: Puerto Rico
    Search Comp PM
    Originally Posted by AlanHK
    Why go through WMV? I often have sync problems when using WMV files.
    Just load the original AVI file in VirtualDub, resize with its filters, save as a new AVI?
    Or do the same with AviDemux, which I find very stable for such conversions.

    That doesn't help much with fixing what you've got now though.
    As the sync seems not to smoothly vary, if you can find where there are jumps, try cutting it into segments (with Avidemux or VD). Then you may be able to skew each segment back into sync, and finally rejoin.
    If you need to stretch the time, you can demux the audio to WAVE and use a sound editor.
    Well this kind of thing is thakfully the exception and not the rule. Most of the files that I process like this go thru without a hitch I think I got that AviDemux around somewhere....
    Quote Quote  
  13. Member AlanHK's Avatar
    Join Date: Apr 2006
    Location: Hong Kong
    Search Comp PM
    Originally Posted by PunkMaister
    Well this kind of thing is thakfully the exception and not the rule. Most of the files that I process like this go thru without a hitch I think I got that AviDemux around somewhere....
    Why use WMV at all if you start and finish with AVI?
    Intermediate conversions take quite long time, and lose quality needlessly.
    Quote Quote  
  14. Member Sartori's Avatar
    Join Date: Nov 2002
    Location: United Kingdom
    Search Comp PM
    Ive sometimes found a few files to seem like they are out of sync on my PC but it was WMP that was at fault . I use VLC now .
    For my backups , I use (as mentioned above) AviDemux to convert to Xvid as my Son deck plays them , I keep the resolution and drop the bitrate .
    If you want to correct the files and its a linear out of sync fault , just note certain points at the start and end and then stretch/shrink in Audacity (or whatever) . Ive changed quite a few music videos to a cd based soundtrack from old VHS captures and even 0.1s is really noticeable on lip sync , you`ll need the time down to milliseconds .
    Quote Quote  
  15. Member
    Join Date: Dec 2007
    Location: Puerto Rico
    Search Comp PM
    Yay I finally managed to fix it by very,very slightly changing the frame rate using VDub! It's unbelievable that all that was causing the problem was that originally the frame rate was 30.142 and just by setting it to 30.000 flat the whole lagging problem vanished!
    Quote Quote  
  16. Member
    Join Date: Sep 2007
    Location: Canada
    Search Comp PM
    Originally Posted by PunkMaister
    Yay I finally managed to fix it by very,very slightly changing the frame rate using VDub! It's unbelievable that all that was causing the problem was that originally the frame rate was 30.142 and just by setting it to 30.000 flat the whole lagging problem vanished!
    LOL that's exactly what the 1st link tells you to do with the progressive scenario, adjust the fps in small increments!
    Quote Quote  



Similar Threads