VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Hi. I have an AVI with AC3 audio which is perfectly in sync. If I demux with VirtualDubMod the audio stream and I then encode AVI --> M2V, once I author
    M2V+AC3 ---> DVD
    the final VOBs are slightly off of sync.
    I tried many application: YAAI didn't see any delay, MediaInfo saw a 700 ms delay, but after hours re-encoding the AC3 stream into a delayed AC3 stream using the AC3Machine, I discovered that the delay is non-constant! Opening the AVI with SyncView I saw that the A/V are Interleaved - In fact, by opening the AVI as audio source I receive the message 'interleaved audio non supported' and, playing the set, I see that the delay is non constant during the movie.
    Whay can I do fo fix that stuff?
    Quote Quote  
  2. Always Watching guns1inger's Avatar
    Join Date
    Apr 2004
    Location
    Miskatonic U
    Search Comp PM
    The only way I have found to get the correct delay is by eyeball and ear. You can use SyncView or even Media Player Classic to do it.
    Quote Quote  
  3. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by aldaco12
    Hi. I have an AVI with AC3 audio which is perfectly in sync. If I demux with VirtualDubMod the audio stream and I then encode AVI --> M2V, once I author
    M2V+AC3 ---> DVD
    the final VOBs are slightly off of sync.
    I tried many application: YAAI didn't see any delay, MediaInfo saw a 700 ms delay, but after hours re-encoding the AC3 stream into a delayed AC3 stream using the AC3Machine, I discovered that the delay to apply to have a pefect VOB is 130 ms.

    Is there a fay to see the correct delay and to fit it? If ine examines the AVI with a proper application one should manage to see that 130 ms!
    Most authoring apps seem to have a setting where you can type in a fixed delay which will be added/subtracted when authoring.

    To directly cut or pad the AC3, use Delaycut, very fast.

    To stretch or squeeze a little, use AC3scale.

    And to work out the amount needed, you can try this Avisyth script like this:

    Code:
    video=MPEG2Source("lom-101.d2v")
    audio=DirectShowSource("lom-101.ac3")
    AudioDub(video,audio)
    DelayAudio(1.39)
    Info()
    Open in VirtualDubMod, then edit the script and reload with F5 as you adjust the time manually.

    There's a more elaborate script at http://avisynth.org/FindAudioSyncScript if you want to get more geeky.

    Then you can use the number you arrive at to fix the AC3 as above.

    You should check at least near the begining and ends to see if the sync is constant.
    Sometimes I get it correct at the begining, which gives me a delay. Then I correct it with Delaycut. But I notice it's out of sync towards the end. Then I need to strech it using AC3scale.
    Quote Quote  
  4. Very nice reply, but I can't use it.
    Once I opened the AVI with the AVS:

    video=AVISource("movie.avi", false, fourCC="DIVX") #seen using VirtualDub
    audio=DirectShowSource("movie.avi",FPS=25) #seen using VirtualDub
    AudioDub(video,audio)
    DelayAudio(1.39)
    Info()

    VirtualDub shows ths useless screen:

    Frame: (0-end)
    Colorspace: YV12
    Width: X pixels; Heigth: Y pixels
    Frames per second: 25.0000
    FieldBased (separated) Video: NO
    Parity: assuming Bottom Field First
    Video Pitch: 720 bytes
    Has audio: YES
    Audio Channels: 2
    Sample type: Integer 16 bit
    Samples per second: 48000
    CPU detected ......

    and now? I see no delay info....
    More, the AVI is in-sync. Is after an AVI-->M2V conversion that it goes out of sync!
    Quote Quote  
  5. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by aldaco12
    video=AVISource("movie.avi", false, fourCC="DIVX")

    More, the AVI is in-sync. Is after an AVI-->M2V conversion that it goes out of sync!
    Read more carefully.
    I used :

    Code:
    video=MPEG2Source("lom-101.d2v")
    After using DGindex to make the d2v file which indexes the M2V.

    Also, the "Info" command prints that data over the video. That won't tell you the delay you need, you have to work out the actual delay by trial and error. Doesn't take long, just a few seconds for each trial this way.
    Quote Quote  
  6. MediaInfo saw a 700 ms delay, but after hours re-encoding the AC3 stream...

    That was a complete waste of time. As AlanHK mentioned, either adjust the delay in your authoring app or by using Delay Cut on the AC3 track.

    ...into a delayed AC3 stream using the AC3Machine, I discovered that the delay is non-constant!

    Throw that one away and check with the original one (where you've adjusted the delay properly) if the delay is constant or progressive. If the delay is progressive (gets worse as the movie goes along), you probably changed the video framerate while encoding. If the original AVI is 23.976fps, and you converted the video framerate to 25fps, for example, that would account for it. What script did you feed into your MPEG-2 encoder, and what's the framerate of the source AVI (use GSpot if you don't know)?
    Quote Quote  
  7. Thanks to all of you! I think I managed to fix it all....
    Quote Quote  



Similar Threads

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