audio sync problem in xvid to dvd

Discussion in 'MPEG-1 and MPEG-2 encoding (AVI to DVD)' started by kthan, Oct 18, 2006.

  1. kthan

    kthan Member

    Joined:
    Jul 25, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    I have two xvid movie files and want to convert them into a DVD.

    First, I joined two files into one by using virtualdub (no error message and I checked the new file and found it fine...no audio sync problem....no discountinuities, etc.).

    Second, I tried several different programs (for convenience, I used all-in-one program), like DVD2SVCD <with both TMPGEnc and Cinema Craft>, AutoGK, DVDFlick, Convertxtodvd.

    But, none of the programs resolved audio sync problem (Audio comes about 1-2 sec faster than video). If I tried one program, I suspect a problem (or setting issue) of the program. But, so far I tried at least four different programs and had same problem.

    Also, I don't think it may be related to a joined(combined) file because I double checked the joined file and there's no problem of audio-sync in that file at all.

    Please advise me how to resolve this issue. I appreciate your help in advance.
     
  2. mistycat

    mistycat Active member

    Joined:
    Nov 3, 2003
    Messages:
    3,054
    Likes Received:
    0
    Trophy Points:
    66
  3. aldaco12

    aldaco12 Active member

    Joined:
    Nov 6, 2002
    Messages:
    2,544
    Likes Received:
    0
    Trophy Points:
    66
    No. If VirtualDub didn't give any warning (he did not, he said, isn't it?), the problem isn't due to the use a bad audio compression (MP3 VBR) and, therefore, decompressing the audio to WAV hasn't any effect.

    I had a similar problem once: the AVI file was in-sinc but, when encoded to DVD, it had a constant A/V delay.

    Please note I'm just guessng, but on thousand AVI I saw, only one had a [bold] fixed A/V delay [/bold].

    To find if yours is the case, oad that AVI with YAAI (Yet Another Avi Info application). At the botom of the 1st screen you'll see if there is an AVI delay, and how many ms it is.
    For instance you could see at the bottom of the screen something made like this:

    ===========================
    [bold] Audio Stream [/bold]
    Wave Type: MPEG Layer 3
    Avg Bitrate = 128.44 kbit/s
    Sample rate = 48000 Hz
    Bit depth = 0 bits
    Channels = 2
    Audio Delay = 0,0 s
    ============================

    If 'Audio Delay' is different than 0 I guessed right: it's the AVI which has an internal audio delay. The A/V delay has NOT been due to the encoding to MPG of a VBR stream, but by inserting a delayed stream on a MPEG video without giving it any delay.

    You can remove the delay on your home-made DVD on two ways:

    1) [bold] Insert that delay during autoring using elementary streams [/bold]
    You have to load the video (MPV or M2V), the audio (MP2 [MPEG Layer II] or AC3 [Dolby] ) and insert the delay which, by default, is zero but can be modified).
    If the authoring aplication loaded a MPG large 4.3 Gb, it made a simple de-multiplex by itself, transforming MPG = MPV(or M2V) + MPA(or MP2).
    Alas, it you loaded a MPG, no audio delay could be set. You need to author using 'elementary streams' (see my 'sticky' thread about it http://forums.afterdawn.com/thread_view.cfm/351013). For instance, IFOEdit (very nice and free application) has this option, but ald DVDLab and all other do.

    2) Extract the sound to WAV using VirtualDub (how to do it is written in the FAQ) and, [bold] during encoding the WAV with BeSweet to MP2, insert YOU a constant delay so the final A/V delay io zero [/bold]. After that, just author the DVD with the video you already made and the new 'delayed' audio.

    All clear?
     
    Last edited: Oct 19, 2006
  4. kthan

    kthan Member

    Joined:
    Jul 25, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    aldaco12, thanks for your advice.

    I downloaded YAAI but I only got wave type/bit rate/sample rate in YAAI (not others including "audio delay") Am I doing something wrong? I just downloaded and open AVI files with YAAI. I tried different files but no success (to see Audio delay).

    Last night, I tried another (totally different xvid file...individual file <not combined>) and got the same audio sync problem. It doesn't seem to be a problem of the file (like audio delay) because two different files got the same problem. I used DVD2SVCD (with Besweet & CCE encoding).

    Now I am wondering if I do the encoding separately (encode audio and video separately and authoring together), would it resolve the issue? I will try. But, even if I resolve the issue with separate encoding & authoring, I still doubt why (automatic) all-in-one programs like DVD2SVCD or Convertxtodvd make audio sync problems on two or more (different) files because I never heard these are the known problems when using above programs.

     
  5. aldaco12

    aldaco12 Active member

    Joined:
    Nov 6, 2002
    Messages:
    2,544
    Likes Received:
    0
    Trophy Points:
    66
    Strange. I have YAAI v2.0.2.485 (the last one), gotten from the Download page of http://yaai.sourceforge.net/, namely http://prdownloads.sourceforge.net/yaai/YAAI_2.0.2.485.zip and, after opening the file, I see three black blocks written in bold:

    [Bold]
    AVI information
    [/Bold]
    ...
    [Bold]
    Video Stream
    [/Bold]
    .....
    [Bold]
    Audio Stream
    [/Bold]
    Wave Type: MPEG Layer 3
    Avg bitrate = 128.44 kbit/s
    Sample rate = 48000 Hz
    Bit depth = 0 bits
    Channels = 2
    Audio Delay = 0,0 s

    I can't understand why shouldn't you see the bottom lines....

    More, it seems very strange you found THIS issue twice in your life (I found it once in hundreds movies).
    It might be an audio encoding issue, instead. How do you create the audio file, and author everything?
    Try to encode the audio by uncompressing it to WAV with VirtualDub and encoding to AC3 128 kbps with FFMPEG GUI.

    Later, demultiplex the video from the MPG (obtaining a MPV or a M2V) and author it with the new audio. Maybe it's just an audio encoding issue...
     
    Last edited: Oct 19, 2006
  6. kthan

    kthan Member

    Joined:
    Jul 25, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    I downloaded the file at the same site. I don't know why I can't see the bottom line. But, when I click "sync audio" tab, I also found that there's something on the bottom. But, I couldn't see it. I tried expand the window, but no go (I trid both pull down vertically and full screen. But, even with full screen, the screen shows only the half of the entire LCD, which is very strange and my first time to see. Pull down vertically didn't go either, while horizontal extension works well. So, it maybe the display issue.

    Anyway, I demuxed audio and recode with BeSweet and process(encode) video separately with TMPGEnc. Then, combine the two and author DVD. But still the same problem. I suspect it maybe an audio encoding issue. But, separate processing did the same sync problem. Also, original Xvid files play fine (no sync problem at all).

    I will try to do different ways of separate audio/video encoding and author DVD by combining two and let you know.
     
  7. kthan

    kthan Member

    Joined:
    Jul 25, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    So far I tried different types audio encoding (AC3, MP2, Wav) by using different programs (Besweet, ffmpeggui, Headac3he). Also, I tried to encode audio (with video file) in DVD2SVCD, Convertxtodvd, dvdflick.

    I suspect there's a problem with audio encoding becaues more than two different xvid files was converted to dvd with audio out-of-sync.

    I don't know what to do next. Pleaes advise me.
     
  8. aldaco12

    aldaco12 Active member

    Joined:
    Nov 6, 2002
    Messages:
    2,544
    Likes Received:
    0
    Trophy Points:
    66
    I finisched the guesses.

    fmpe GUI doesn't add any audio delay to the files, and AC3 is CBR, so the A/V delay can be due neither to an 'added delay'or to a 'VBR compression' issue.

    More, all thise programs use their own audio codec libraries, so it shouldn't be an audio codec problem.

    Unless, and this is my final guess, on your PC the file 'seems' out of sync, but once played on a DVD Player it goes right.

    Try a little check 'cutting' the movie a little (VirtualDub; Set Video to Direct straam copy; Select Video___Range about 10000 frames (few minutes) and save.
    After that, make the experiment to use your DVD player, by converting that short AVI to DVD and burning it on a DVD-RW.

    I don't have any more ideas.....
     
  9. kthan

    kthan Member

    Joined:
    Jul 25, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    Just one quick question. While reviewing the original xvid and encoded video file (MPEG), I found that original one had 23.976 pic/sec, 23.976 frame/sec. but, the encoded one had 23.976 pic/sec, 29.970 frame/sec. Does this mean I encoded the file to 29.970, not 23.976? If yes, is this related to audio-sync problem?

    Also, AC3 is more likely to produce audio-sync problem than other audio format (like mp2/mp3 44.1K/2ch)? I am trying to figure out if there's any wrongdoing in the process of encoding.
     
  10. snaggs

    snaggs Guest

    the original Xvid conversion may have been out of sync, if the audio was re timed in Vdub.."audio interleave" the re-timing is only a mask over the DVD to Xvid conversion timing..any re-conversion will result in the original timing...the Xvid needs to be un-compresed with vdub in full prossessing mode...after it's un-compressed...then reset through audio interleaving...then recompress the xvid,or, convert from uncompressed xvid...beware....uncompressing an xvid can utilize 150 GIG of HDD
     
  11. kthan

    kthan Member

    Joined:
    Jul 25, 2006
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    11
    I did ave very interesting experience yesterday. I tried the file with older version (2.05) Convertxtodvd in my laptop and it did not
    have out-of-sync problem. I had newer version (2.14) in my desktop and I used this when I tried the files (both individual and combined) before. After I succeded, I tried the same file in the newer version (in my desktop) again, but it still showed out-of-sync. Then, I uninstalled the newer version and install older one in my desktop and tried again. I got another success.

    I don't know the exact difference between two versions, but it looks like newer version processing time a lot faster (like 2.0-2.3x, as compared to 1.3-1.5x in older version). It seems to be very strange. For your reference, I tried other encodings by using DVD2SVCD and separate encodings (using virtualdub, besweet, TMPGEnc or CCE, and TMPGEnc dvd author) in both laptop and desktop, but all resulted in out-of-sync. Any comments on this?
     

Share This Page