Audio Sync Problems converting AVI to MPEG-2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrJingles
    Junior Member
    Junior Member
    • Sep 2003
    • 8

    Audio Sync Problems converting AVI to MPEG-2

    I have recently purchased a Sony DVD Writer and want to convert some of my Divx / Xvid files onto DVD.

    I have tried the following process to convert them :
    1. Used Virtual Dub to convert the Audio to PCM uncompressed. (Both within the same file as video, and seperating the audio out to a seperate .wav file).
    2. Used TMPGEnc to convert the new .avi file to MPEG-2 format (taking into consideration the size and format of the avi file).
    3. I then use either Nero 6 or TMPGEnc DVD Author to convert the .mpg file into the VOB / ISO files.
    4. Then I use Nero to burn these files onto DVD.

    The problem that I have is with stage 2. Whenever I convert the .avi file, the audio is always out of sync. It starts off about 15 minutes into the film and then gets progressively worse with the sound being about 2-4 seconds out of sync with the video.

    I've attempted to look about to find other software that converts avi to mpeg 2 (Cucusoft avi to DVD, Xing MPEG Encoder, etc) without much success.

    Any idea how I can ensure that the audio remains in sync with the video ?
    Last edited by MrJingles; 13 Sep 2003, 08:27 PM.
  • setarip
    Retired
    • Dec 2001
    • 24955

    #2
    A) Unless the .AVI contains a Variable Bitrate .MP3, there is no reason to perform step 1)

    B) You should be using TMPGEnc's DVD "wizard/template" for step 2) (NOT merely "MPEG-2" settings)

    C) For the time being, I would use TMPGEnc DVD Author (NOT NERO v.6.xx) to convert the files to a burnable "DVD package"

    Comment

    • MrJingles
      Junior Member
      Junior Member
      • Sep 2003
      • 8

      #3
      Hi Setarip, Thanks for you comments...

      A) Unless the .AVI contains a Variable Bitrate .MP3, there is no reason to perform step 1

      Yes the avi file was in Mpeg3 version. This wasn;t recognised in TMPEnc.

      B) You should be using TMPGEnc's DVD "wizard/template" for step 2) (NOT merely "MPEG-2" settings)

      I used the wizard to do the conversion into PAL (16:9) format with both CBR and VBR audio encoding options.

      C) For the time being, I would use TMPGEnc DVD Author (NOT NERO v.6.xx) to convert the files to a burnable "DVD package"

      So far I have tried both TMPGEnc DVD Author and Nero.

      On all of them I have the same problem.

      System specifications of my PC are a Pentium 4 2.6Ghz, 2Gb RAM, Ge Force 4 Graphics Card, 120Gb HD, Windows XP Prof SP1.

      It's starting to annoy the hell out of me 'cause it's taking 4-5 hours to re-encode the movies. Any ideas or suggestions will be a great help... Thanks

      Comment

      • setarip
        Retired
        • Dec 2001
        • 24955

        #4
        1) Load the ORIGINAL .AVI into VirtualDub - Ignore "VBR" message

        2) Load .WAV audio file

        3) Set BOTH "Video" and "Audio" to "Direct Stream Copy"

        4) Save with a new filename - and close VirtualDub

        5) Playback NEW .AVI - I'm guessing that it will be out of synchronization


        A) If the difference between audio and video is constant throughout the video:

        Load the file into VirtualDub, VirtualDubMod, or NanDub.
        Set BOTH "Video"(VirtualDub, VirtualDubMod and NanDub) and "Audio" (VirtualDub and NanDub - VirtualDubMOD>"Streams>"Stream list") to "Direct Stream Copy".
        From the "Audio" dropdown menu, select "Interleaving" (For VirtualDubMOD, rightclick on the listed audiostream and then select "Interleaving")
        Under "Audio skew correction", set an appropriate number of milleseconds (positive or negative) in the box labelled "Delay audio track by"
        Save with a new filename

        B) If the difference increases as the movie plays:

        From under the "Video" dropdown menu, select framerate - and select "Change so video and audio durations match"

        Let us know of your success ;>}

        Comment

        • MrJingles
          Junior Member
          Junior Member
          • Sep 2003
          • 8

          #5
          Hi Setarip,

          Thanks again for your guidance.

          However, the issue is not with the .avi file. The audio and video is in perfect sync in the avi. It's when I try and convert it to DVD format using TMPGEnc that the problem appears.

          After the conversion to the 4Gb ,mpg file the audio is not synchronised with the video.

          I'm just not sure how to keep the two in sync for the .mpg file ??

          Thanks again

          Comment

          • boss126
            Junior Member
            Junior Member
            • May 2003
            • 16

            #6
            just out of interest, have you checked your avi for bad frames..

            Comment

            • setarip
              Retired
              • Dec 2001
              • 24955

              #7
              To MrJingles

              "However, the issue is not with the .avi file. The audio and video is in perfect sync in the avi."

              You may have known that to be true of the ORIGINAL .AVI, including its multiplexed VBR .MP3 audiostream - BUT you don't know that regarding the video portion of the ORIGINAL .AVI combined with the extracted .WAV file...

              Comment

              • MrJingles
                Junior Member
                Junior Member
                • Sep 2003
                • 8

                #8
                Hi Boss126, how can I check the avi for bad frames? I was wondering if this was the problem 'cause the video image went really bad for about two seconds and the audio was out of sync after this.

                Setarip, thanks again for your comments, I'll try your process and see what happens. I'll let you know. Cheers.

                Comment

                • MrJingles
                  Junior Member
                  Junior Member
                  • Sep 2003
                  • 8

                  #9
                  Setarip, thanks for your info. I have looked at your suggestion and it has certainly helped me understand the whole process a lot better. The process that I am using at the moment to do the conversion is as follows :

                  1) Load the .avi file into TMPGEnc and convert the Video ONLY into DVD format (MPEG-2) - ends up being an .m2v file.

                  2) Load the .avi file into VirtualDubMod - select Streams and Save the audio as a .WAV file (although it is still compressed as a VBR .MP3 file I think ...)

                  3) Using the BeSweet Gui and SSRC.exe I convert the WAV (mp3?) file into an AC3 file with a sampling rate of 48000Hz and a bit rate of 224Kbps (the guide I used was here)

                  4) Using TMPGEnc DVD Author I load the .m2v file first, then load the .ac3 file as the audio. The movie is then encoded and sometimes works with Audio and Video in perfect sync.

                  Because of your previous replies, I have been looking at the audio section and have seen that sometimes the length of the audio after stage 2 (extracting to .wav file in VDMob) is 5 to 8 seconds shorter than the length of the video. Whenever this is the case, the audio is out of sync.

                  If the lengths of the audio and video are the same, then they are syncronised perfectly on the resulting DVD.

                  Previous to this, I followed your advice and loaded the original .avi file and the separated .wav file into Virtual Dub. Saved the resulting new.avi file. Played it back and the audio was out of sync. It gradually increased further into the video - so I attempted to change the framerate so the video and audio durations matched. The resulting .avi file was still out of sync!!

                  It seems as though all the issues surround the audio stream! For some reason it seems to be shorter than the video stream.

                  Is there any way that I can extract the audio more effectively? or

                  Is there any way that I can adjust the audio length of the .wav (mp3?) file so that it matches the video stream? I have been searching high and low for software that will enable me to do this but without much luck!!

                  Any thoughts, comments, recommendations or answers on the above would be really appreciated.

                  Thanks!

                  Comment

                  • setarip
                    Retired
                    • Dec 2001
                    • 24955

                    #10
                    You can adjust (positive or negative, beginning or end) the .AC3 audiostream you've created with AC3 Delay Corrector (Also requires download of GFAWin23.OCX to be put in same folder with "Corrector" program). You'll find it at:

                    Comment

                    Working...