1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problem with Audio Sync in TMPGEnc

Discussion in 'MPEG-1 and MPEG-2 encoding (AVI to DVD)' started by RonnaP, May 2, 2005.

  1. rebootjim

    rebootjim Active member

    Joined:
    May 13, 2004
    Messages:
    2,630
    Likes Received:
    0
    Trophy Points:
    66
    Any good dvd player software. WinDVD or PowerDVD would be best, although Nero Showtime (free with Nero 6) doesn't do too badly.
    Please, do NOT use Windows Media Player to preview. It cannot correctly determine sync, nor aspect.
     
  2. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Ok - I encoded 2 different videos and this is what I got:
    The 1st one I encoded the way you told me too and then I multiplexed the 2 files together with TMPGEnc and viewed with PowerDVD and it was still off sync.
    The 2nd one I encoded according to this guide I found from another site http://members.dodo.net.au/~jimmalenko/AVI2DVD.htm - and then I took and multiplexed the 2 files together with TMPGEnc and played on PowerDVD and it was perfect!
    I even double checked the original avi on the 1st to make sure it was in sync and it is so I don't know what I'm doing wrong.
     
  3. rebootjim

    rebootjim Active member

    Joined:
    May 13, 2004
    Messages:
    2,630
    Likes Received:
    0
    Trophy Points:
    66
    You're not doing anything wrong.
    Different methods require different settings, and jimmalenko's guide is as good as any (and better than most).
    If you get the output you want, then it worked.
    Personally, I would have encoded them separately, then joined during authoring.
    There are problems associated when encoding from one framerate to another. Generally jerky video, and/or sync issues. This is why it's recommended to encode at the same framerate (or as close to it as possible) as the source.
    Of course, there's always that 1% that'll be the exception that proves the rule ;)
     
    Last edited: May 3, 2005
  4. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Well i don't know for sure yet if it worked or not I'm still waiting for the other to finish. I downloaded a trial of MainConcept and yes it works a lot faster than TMPGEnc but it seems to eat my CPU.
     
  5. rebootjim

    rebootjim Active member

    Joined:
    May 13, 2004
    Messages:
    2,630
    Likes Received:
    0
    Trophy Points:
    66
    Mainconcept is CPU intensive, no doubt...but ya gotta admit, encoding a 2 hour movie in less than 2 hours (better than realtime) is a HUGE bonus!
    Beware the mainconcept logo that will appear on all your video!
    Better off to try Canopus Procoder Express. It's as fast as MC, and cheaper at $59 last I looked.
     
  6. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Well I can't download a trial of ProCoder so I'm a little hesitant to purchase something I can't try first - so I don't know - I'll think about it. I will update you a little later about how things are going - thanks sooooooooo much rebootjim :)
     
  7. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Well I encoded the video I was having so much problem with and it still does not work !! I encoded it your way, the way on the page I gave you earlier and I encoded it in MainConcept - I tried multiplexing the m2v and ac3 file in TMPGEnc and it will not match up. I put the m2v and ac3 file in DVDLab and composed it and it still doesnt match up. One thing I did notice when I loaded the 2 files into DVDLab - the ac3 file is 43:04 in length and the m2v file is 43:01 - could that be causing the problem?? If it is why is it that way - I dont understand - PLEASE HELP ! Im at my wits end :(
     
  8. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Well I've about had it for the nite - but just to let you know I encoded another (a different) avi and did it just exactly how I did the other one (like u said) and it is in sync. So maybe there is something wrong with the other video but I don't understand what and I don't understand why it plays fine as an avi in its original form but when I encode it becomes un-sync.
     
  9. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Well just to give you a quick update - I encoded 3 more avi's overnite and they all turned out just fine. So evidently there is something wrong with that one file but I have no idea what or how to fix it (if I can). So I guess I was doing everything correctly I just didnt know it :)
    Can I ask 1 more favor pleeeeeeeeeease, can you tell me the best way to convert PAL to NTSC. Yes, I've read all the guides for it but to me there a little contradicting. If you could I would really appreciate it - thanks soooooo much
     
  10. rebootjim

    rebootjim Active member

    Joined:
    May 13, 2004
    Messages:
    2,630
    Likes Received:
    0
    Trophy Points:
    66
    When doing PAL to NTSC (or the other way around), it's best to keep the framerate as close as possible.
    In your case, you would encode at 23.976 with 3:2 pulldown during playback.
    This is probably going to cause huge audio sync issues.
    I realize the following seems a very long process, but in order to explain it properly, here's how I fix sync problems:

    1. The basic principle involved here is to strip out the Audio file (de-mux) then stretch or compress the audio frequency, 48khz, and re-sample to 48khz for DVD. Then convert to *.MP2 or AC3 format and re-multiplex with video stream (only for testing).

    2. Demux the MPG file so we can manipulate the Audio file. Run TMPGEnc, click on File and select MPEG Tools. Select Simple De-multiplex tab and for Input, browse to your problem MPG. Video and Audio output names will be automatically generated. The Audio being *.MP2 and video being *.M1V or *.M2V. Click Run and wait until its finished. Exit TMPGEnc.
    Alternatively, run virtualdubmod, load your file, select Streams, stream list. Right click on the audio, select Full Processing Mode, then click Save WAV.

    3. We now have to estimate the approx time, in seconds, that the audio is out of sync and nearest to the end of the movie as possible. Simply play the original movie with WinDVD or similar player. Windows Media Player is not recommended as it can A/V sync problems of its own. Move slider to near the end of the movie and look for speech, gun fire, explosions, door slamming, etc where you have a precise Audio to Video match up. Estimate the time difference and not the length of the movie. Lets say we find the Audio trails the Video by about 1 second and the movie length was 48 min or 2880 sec (the door slams and about 1 sec later we hear the thud).

    3. Run Goldwave and load in the *.MP2 or .wav file. Its also best to turn OFF the Undo feature to speed up the conversions (in Options / File...) Click on Effects and then Playback Rate. We need to change the 48000 Hz to sync the movie, use these formulae:

    New Hz (Audio trails Video) = (Movie length in sec + Out of Sync in sec)/(Movie length in sec) * 48000

    or

    New Hz (Audio precedes Video) = (Movie length in sec - Out of Sync in sec)/(Movie length in sec) * 48000

    So for our example, we have:

    New Hz = (48x60 + 1) / (43x60) * 48000 = 48115

    So change the Rate from 48000 to 48115 (or the number you calculated) and hit OK. Now click Effects again and select Resample. Change the 48115 (or what ever figure you have) back to 48000 and hit OK. Once the conversion is finished, hit Save. For Type select Wave (*.wav) and Attributes as 16bit, Stereo, Signed. Change File name if needed and hit Save. When it finish's answer No and exit the program.

    4. We now need to convert our WAV file back to an MP2 or AC3 form. TMPGEnc is the simplest to use for mp2. Run TMPGEnc, and click File, then New Project to clear out old settings. For Stream Type select Audio Only and for Audio Source, browse to our new WAV file and Open it. Rename the Output file name to something different than the original MP2 file. Do NOT change any other settings except Normalize in Setting button (do this only if the audio appears low in volume). Then click OK and finally click Start. When done, exit TMPGEnc. Alternatively, transcode in ffmpeggui to AC3 at 48kHz for your project.

    5. Compile the project in DVDLab and test. Alternatively, remux the video and audio in tmpgenc's mpeg tools, simple remux, and select mpeg-2 program VBR. When done, play the new MPG file in WinDVD and check that A/V sync has been fixed. If its still out a bit, you need to start all over again from Point 3 changing the frequency Rate a bit higher or lower. Repeat until its fixed.

    If the project is avi, load the video into virtualdubmod, load the fixed .wav as the audio source, and play it to check for sync.
    Once you have it, you can then encode the VIDEO ONLY in tmpgenc or other encoder, and transcode audio in ffmpeggui to AC3, then import into DVDLab.
     
  11. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Just a quick question before I attempt this (which seems a little overwhelming). Can I use VirtualDub instead of VirtualDubMod?
    Just to let you know everything seems to be working great with my previous problem - I guess something is wrong with that 1 file - I just have no idea what.
    Also, I LOVE Mainconcept it is much faster, but I don't like the fact that its CPU heavy. Is Procoder just as fast?? Is it CPU heavy?? If its just as good I will consider buying it.
    Thank you sooooooooooo much :)
     
  12. rebootjim

    rebootjim Active member

    Joined:
    May 13, 2004
    Messages:
    2,630
    Likes Received:
    0
    Trophy Points:
    66
    You can use virtualdub. I choose vdubmod, because it will accept more formats, including mpg.
    Make sure you set Audio, Full Processing, then file, Save .wav
    The process is a lot easier to DO, than to explain, and I have tried to make it as simple as possible, yet include as much info as needed.
    Read the whole thing twice, then open up the calculator and double check your figures before opening the file in Goldwave.

    All encoders use CPU cycles. You can set the priority in XP, by opening up the task manager (CTRL+ALT+DEL), and RIGHT clicking on the program, then go to process, RIGHT click, set priority.
    Drop it down one step, and see if that works better.

    The reason I highly recommend Canopus Procoder, is because it does two things well, that other encoders have trouble with.
    It deinterlaces (if you don't know what that is, don't worry about it), and it does framerate/aspect conversions (PAL<>NTSC) much better than any other encoder. It's almost as fast as Mainconcept, except on "Mastering quality" mode (not even sure the Express version has that), but IMHO outputs better quality video.
    Once you've gotten used to it's unique interface, you'll probably uninstall tmpgenc and mainconcept.
    The other program I recommend, is VSO Divx to DVD. It is absolutely fast, does conversions well, keeps audio in sync well, and is extremely simple to use.
    Combined with a good authoring app, such as DVDLab, and virtualdubmod for editing, filtering, and frameserving, those are the 4 programs I use for all my video 99% of the time.
     
  13. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    I downloaded VirtualDubMod I will try it instead of VirtualDub. I am trying to convert a PAL to NTSC as we speak (hope it works) - I've been reading and re-reading your instructions and taking my time so lets hope :)
    I will try this DivxtoDVD cuz its free and think about Procoder. I really really appreciate your help rebootjim :)
     
  14. rebootjim

    rebootjim Active member

    Joined:
    May 13, 2004
    Messages:
    2,630
    Likes Received:
    0
    Trophy Points:
    66
    Check out my post in this thread: http://forums.afterdawn.com/thread_view.cfm/188000
    Specifically method #2.
    There's 17 pages of discussion on this at doom9, and 4 more at videohelp.
    It seems to work extremely well for some. I'm running my own tests as I type this.
     
  15. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    So you are trying method #2 right now?? If so, please let me know what happens. I'm still trying the method you left for me but this does sound simpler if it works ! :)
     
  16. rebootjim

    rebootjim Active member

    Joined:
    May 13, 2004
    Messages:
    2,630
    Likes Received:
    0
    Trophy Points:
    66
    To do method #2, you really need to know your encoder's advanced settings.
    What you want output from the encoder, is a 25fps video, that is 720x480 NTSC aspect. Not many encoders will do this, without stretching, or squishing something.
    In Mainconcept:
    Select mpeg-2 output (not DVD), leave it as PAL.
    Click Details.
    Click Crop and scale.
    Remove the tick mark from "keep proportions".
    Set the size to 720x480, and audio to 48khz.
    On the main screen, Stream type, select Elementary Video and Audio.
    Encode a few minutes, abort it, and test in your player.
    It should be in the correct aspect.
    If not, scale it up, then crop to 720x480, test again.
    Once done, run the .mpv through dgpulldown, from 25 -> 29.97
    I have about 10 minutes left on my encode, but it seems to be working for me.
    I'll author it in dvdlab, and let you know the outcome.

    Is your source letterboxed, or fullscreen? (black bars top and bottom or not)
     
  17. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Ok, I just got done and what I did was pull the .wav from the .avi in VirtualDub and then encoded it in ffmpeggui to ac3. I encoded the video portion in TMPGEnc using 23.976 with 3:2 pulldown and then i multiplexed the audio (ac3) and resulting m2v file together and played it back on PowerDVD and it seems just fine - not audio out of sync or jerkiness. Did I do something wrong?? Or did I just get lucky??
     
  18. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    To answer your previous question I believe my source is letterbox (it has black at the top and bottom). Another question is (and its probably stupid - lol) how do you play the video when its in m2v and mp2 or ac3 form?? I've been multiplexing them together to view them in TMPGEnc before I author them and the only reason is to make sure they are in sync. I use DVDLab so I know I don't need to - to author it but I can't for the life of me figure out how to view it.
    Thanks bunches :)
     
  19. rebootjim

    rebootjim Active member

    Joined:
    May 13, 2004
    Messages:
    2,630
    Likes Received:
    0
    Trophy Points:
    66
    First, you have done the process exactly the way I do it, and rarely have sync problems. Lucky? maybe <grin>
    The key is extracting audio properly in vdub, and not trying to get a VIDEO encoder to encode audio. <grin again>

    I use virtualdub-ac3 or virtualdubmod to view the files.
    Load the video, then select Streams, Stream list, Add, and load the AC3.
    Play it. If it's in sync, you're good to go, if it's NOT, you can adjust audio sync, resave a .wav and test again, using the new .wav as audio source. Keep going until you have it right, then transcode to AC3, test one last time to make sure, and you're ready to author.
    This only works for audio that is out the same amount through the whole movie though, not progressive desync as I explained above how to fix.
    Often I will take the 7 minutes or so, to remux the files in tmpgenc as another way of testing sync.
     
  20. RonnaP

    RonnaP Member

    Joined:
    Mar 24, 2005
    Messages:
    94
    Likes Received:
    0
    Trophy Points:
    16
    Thanks so much for all your help - btw I knocked MainConcepts priority down 1 level and it helped a bunch :) Its a little slower processing but not enough to gripe about and I can still use my pc !
     

Share This Page