VideoHelp Forum




+ Reply to Thread
Results 1 to 14 of 14
  1. Member
    Join Date
    Jan 2003
    Location
    Deep South - La
    Search Comp PM
    I have several streams which are out of sync with each other. The way i am currently fixing this is:

    1. convert ac3 stream to wave.
    2. using sound forge, I create several versions of the this wave, with offset i.e. -10ms, -20ms, -30ms, -40ms, etc (or i use +10ms, +20ms, if the delay needs to go the other way) etc.
    3. I then use TDA and select the wave I want to try out. (tda will play back the sound, without remuxing)
    4. after figuring out which new wave is in sync, I then encode that wave to ac3 (or mp2)... and life goes on.

    but the process is real pain, and the video window in TDA is small, so not best way to see audio-video sync issue.

    So... is there a tool which would make this approach easier to fix audio sync problems?

    THANKS!
    pcexpress-guy
    Quote Quote  
  2. Had the same painful experience with my USB capture device. I never found an easy way do deal with sync problems. I do remember seeing some program on this site that lined the video and audio on a scaled bar graph to calculate the exact difference. I did not explore it, though, may be it was to expensive for me.

    Now I'm using a Canopus-100 and it’s like a different world. It is worth the extra price. My ATI card keeps audio in sync too, but it has a whole set of other problems.

    How far South are you? I am in BR.
    Quote Quote  
  3. Member
    Join Date
    Jan 2003
    Location
    Deep South - La
    Search Comp PM
    I am in BR too. Yea audio sync problems, once you figure out how to fix it, the issue is tideous to do.

    I too remember this bar graph program somewhere, but couldn't find. Not sure it would help or do what I would like it to do.

    A simple little utility that would take ac3, make it into wave, create new waves with say a range of offset files, whereas you can set the offset between each wave, and how many different files you want, would be great. With big files, it would save me a lot of time playing saving the different offset files. (waves are big... and tda only plays back, without ac3 plugin, .wav)

    a little app that would do:

    create x=5 files, with the offset value y=+05ms space added to the start of each file. click here to start... etc..

    then in a folder

    sample+05ms.wav
    sample+10ms.wav
    sample+15ms.wav
    sample+20ms.wav
    sample+25ms.wav

    now it would be great if the little application could display video with the samples, but I found TDA to do this good enough for that purpose.

    O well...

    thanks for reply!
    pcexpress-guy
    Quote Quote  
  4. An easier way to do it is to open your video stream in something like vdubmod or tempgenc thenopen your WAV file in audacity (or soundforge, but audacity is freeware).

    If the sound is offset by a constant amount throughout the movie: advance frame by frame through the video until you get to a "notable" frame for syncing (example: first frame of something blowing up.) Then write down the time at which this happens relative to the start of the video stream. Next play the audio stream until you hear the sound that corrisponds (example the start of the explosion.) Now add silence or remove audio at the beginning of the audio stream so that the explosion happens at the same time marker (relative to the beginning of the audio stream) as you wrote down from the video stream.

    If the problem is that the audio starts in sync and slowly goes out of sync as the movie progresses do the same thing except find a notable frame towards the end of the movie and then use audacity to change the Tempo of the audio stream such that the audio and video streams match at that point towards the end of the movie. That way the whole thing should be in sync.

    It still takes a lot of work, but you only have to make one audio stream and the results should be more exact.

    -Suntan
    Quote Quote  
  5. Member
    Join Date
    Jan 2003
    Location
    Deep South - La
    Search Comp PM
    Thanks!

    It seems like it is hard to hear just a 10ms or 15ms difference. The explosion idea, might work, but I find that people talking is more helpful. (besides most of the movies I have don't have explosions)

    It seems that it is hard to determine a little offset with explosions though. That might just be me? and when characters are speaking... it still hard (at least for me) to figure out if it is ahead or behind, and by how much, but when you watch the thing, you know something is out-of-wack with it.

    anyway... I will try your suggested method again.

    Thanks again!
    pcexpress-guy
    Quote Quote  
  6. Member
    Join Date
    May 2001
    Location
    United States
    Search Comp PM
    I put both the audio (.AC3) and video on the timeline in my DVD Authoring program. I try to find a point in the film with impulse noise (like a gunshot), then use AC3-Delay to cut/add frames to the audio until everything is in sync. This is a LOT faster than going the .WAV route.

    Last night, I cut out the studio intro to a film that was in the main video encode. I noted how much time I cut (gives a good starting point in adjusting the .AC3 file), then cut the audio.

    Times:
    Cut the audio - approx 30 secs.
    Reimport the audio - approx 20 secs.
    Test the sync and estimate the error - approx 60 secs.
    Repeat as necessary.
    ICBM target coordinates:
    26° 14' 10.16"N -- 80° 16' 0.91"W
    Quote Quote  
  7. Member
    Join Date
    Jan 2003
    Location
    Deep South - La
    Search Comp PM
    Yea, that would be great. Which authoring program has this feature? the one I am using TDA, dvd-lab, does not have it. (well dvd-lab has it, but it is impractcle because you can NOT listen to it, before compling dvd.)

    anyway... let me know.

    thanks!
    pcexpress-guy
    Quote Quote  
  8. Member FulciLives's Avatar
    Join Date
    May 2003
    Location
    Pittsburgh, PA in the USA
    Search Comp PM
    I capture with a PCI "TV Tuner" type capture card that uses my sound card for the audio ... so yes I know ALL about audio sync problems

    My solution?

    I capture with TheFlyDS and use AUDIO as the MASTER STREAM. This can also be done in iuVCR ... in fact both TheFlyDS and iuVCR work more-or-less the same. I capture to an AVI file using PICVideo MJPEG and 16-bit Stereo 48k PCM WAV audio. Pretty standard set-up.

    Anyways when you set the AUDIO as the MASTER STREAM this results in a file that is usually in sync but with an odd framerate. For instance instead of the NTSC fps of 29.970 I usually get something like 29.966 or 29.965 etc.

    So here is how I deal with that ...

    1.) Load the captured AVI file into VirtualDubMod. Check to make sure video and audio durations match. If not then set to sync and save a new copy using DIRECT STREAM mode. Then load the new copy just to double check it is in sync. Disregard the original capture.

    2.) To fix the "odd" framerate I use AviSynth and TMPGEnc

    Add this to your AviSynth script (I usually make it the last line)

    Code:
    AssumeFPS(29.970, true)
    When you run your AviSynth script in TMPGEnc both the video and audio are adjusted to 29.970fps

    Be sure to use LPCM audio when you do this. It seems to work best. You can then AFTERWARDS convert to MP2 or AC-3 etc.

    Also use SSRC as a plug-in for TMPGEnc since this will give you better sound quality.

    A simple AviSynth AVS script might look like this:

    Code:
    AviSource("D:\capture.avi")
    Trim(717,11507)
    AssumeFPS(29.970, true)
    I know some people get "scared" of using AviSynth but it CAN be easy. Line one loads your captured AVI file. Line two is your edit points. You can get this by editing in VirtualDubMod and then import the edit ... or trims ... into your script. VirtualDubMod has a special EASY-T0-USE script editing function to faciliate this. The last line is the bit of magic that syncs it up to a standard framerate. If you do PAL then you simply enter 25.0 instead of 29.970)

    See how easy

    - John "FulciLives" Coleman
    "The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
    EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE
    Quote Quote  
  9. Member
    Join Date
    Jan 2003
    Location
    Deep South - La
    Search Comp PM
    sounds good, but this is not for capture.. the file is already premade mpeg2, dvd (just a little messed up, on someone else's watch ) anyway.. I already have the mpeg2 file (with the out-of-sync) audio... just need a fast little way to fix (and preview the adjustment).

    Thanks!
    pcexpress-guy
    Quote Quote  
  10. Member
    Join Date
    May 2001
    Location
    United States
    Search Comp PM
    Then load your video an audio up in VirtualDub.

    vid=mpegsource("c:\dir\myvideo.d2v")
    aud=wavsource("c:\dir\myaudio.wav").delayaudio(XX. XX)


    audiodub(vid,aud)


    Adjust the delayaudio until in sync. Then take that value then trim/add that to the .wav.
    ICBM target coordinates:
    26° 14' 10.16"N -- 80° 16' 0.91"W
    Quote Quote  
  11. Member
    Join Date
    Jan 2003
    Location
    Deep South - La
    Search Comp PM
    ok this might sound ... but I haven't used VirtualDub before... will it allow audio preview with the steps you indicated?

    I have been putting trying out virtual dub for awhile... proabably should try out.

    Thanks!
    pcexpress-guy
    Quote Quote  
  12. Member
    Join Date
    Jan 2003
    Location
    Deep South - La
    Search Comp PM
    vid=mpegsource("c:\dir\myvideo.d2v")
    aud=wavsource("c:\dir\myaudio.wav").delayaudio(XX.XX)


    audiodub(vid,aud)
    can you explain this more? Is this a script? Also the BOLD part above XX.XX is the second XX is that in seconds or milliseconds?

    Is the "audiodub" reference in the text above, just a script reference for vitualdub to use? or is there a "audiodub" tool somewhere?

    I been checking out VitualDubMod (1.5.10)... It is pretty hardware intensive... I cranked up the performance settings... but it still drops frames. 1500 AMD XP + (512+256)PC2100 ram, etc.

    I think it can work well enough to fix the audio issue. This may just be the simpliest way to go. (if I knew what i was doing )

    Thanks!!
    pcexpress-guy
    Quote Quote  
  13. Member
    Join Date
    May 2001
    Location
    United States
    Search Comp PM
    Sorry. What I gave you was an AVISYNTH script that will play both audio and video in VirtualDub.
    The script contains commands from AS.

    Of course, you will need AVISYNTH 2.5+.

    The XX.XX is the delay that you want in seconds and fractional seconds.

    If your video is M2V, then you need to run it through DVD2AVI to create a .D2V mapping file.
    ICBM target coordinates:
    26° 14' 10.16"N -- 80° 16' 0.91"W
    Quote Quote  
  14. Member
    Join Date
    Jan 2003
    Location
    Deep South - La
    Search Comp PM
    Ok a lot of this is a new land for me, but I noticed that the orginal muxed files (vob) is in sync whereas the demuxed (and "fixed" GOP files are not) .

    When I play the orginal dvd the audio and video are in sync. When I try to fast foward, I can not. When I check GOP structure in dvd-lab, you can see the orginal GOP signature is way off (consistently off thought) like

    01:00:50:001 -----===>> 0:00:00:001
    01:00:50:002 -----===>> 0:00:00:002

    well something like that.

    I can correct the GOP time stamp, but when I do that, the audio is then out of wack with the video in the final product.

    Since the orginal works, at least as far as audio and video being in sync, perhaps I could use a frame serve approach to fix this? Can someone briefly tell how to set this puppy up?

    How exactly can this be done?

    Thanks!
    pcexpress-guy
    Quote Quote  



Similar Threads

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