User User name Password  
   
Friday 28.11.2025 / 14:36
Search AfterDawn Forums:        In English   Suomeksi   På svenska
afterdawn.com > forums > archived forums > mpeg-1 and mpeg-2 encoding (avi to dvd) > problem with audio sync in tmpgenc
Show topics
 
Forums
Forums
Problem with Audio Sync in TMPGEnc
  Jump to:
 
Posted Message
RonnaP
Junior Member
_
3. May 2005 @ 16:09 _ Link to this message    Send private message to this user   
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 :)
Advertisement
_
__
RonnaP
Junior Member
_
3. May 2005 @ 18:24 _ Link to this message    Send private message to this user   
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 :(
RonnaP
Junior Member
_
3. May 2005 @ 21:12 _ Link to this message    Send private message to this user   
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.
RonnaP
Junior Member
_
4. May 2005 @ 04:11 _ Link to this message    Send private message to this user   
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
AfterDawn Addict
_
4. May 2005 @ 07:31 _ Link to this message    Send private message to this user   
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.

Black holes are where God divided by zero...
Cheers, Jim
RonnaP
Junior Member
_
4. May 2005 @ 09:04 _ Link to this message    Send private message to this user   
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 :)
AfterDawn Addict
_
4. May 2005 @ 09:39 _ Link to this message    Send private message to this user   
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.

Black holes are where God divided by zero...
Cheers, Jim
RonnaP
Junior Member
_
4. May 2005 @ 10:12 _ Link to this message    Send private message to this user   
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 :)
AfterDawn Addict
_
4. May 2005 @ 10:58 _ Link to this message    Send private message to this user   
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.

Black holes are where God divided by zero...
Cheers, Jim
RonnaP
Junior Member
_
4. May 2005 @ 11:53 _ Link to this message    Send private message to this user   
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 ! :)
AfterDawn Addict
_
4. May 2005 @ 12:07 _ Link to this message    Send private message to this user   
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)

Black holes are where God divided by zero...
Cheers, Jim
RonnaP
Junior Member
_
4. May 2005 @ 12:10 _ Link to this message    Send private message to this user   
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??
RonnaP
Junior Member
_
4. May 2005 @ 12:35 _ Link to this message    Send private message to this user   
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 :)
AfterDawn Addict
_
4. May 2005 @ 13:34 _ Link to this message    Send private message to this user   
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.

Black holes are where God divided by zero...
Cheers, Jim
RonnaP
Junior Member
_
4. May 2005 @ 13:57 _ Link to this message    Send private message to this user   
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 !
RonnaP
Junior Member
_
4. May 2005 @ 14:07 _ Link to this message    Send private message to this user   
Well I feel like an idiot ! I loaded the mpv and AC3 in virtualdubmod but it has no sound :(
RonnaP
Junior Member
_
4. May 2005 @ 14:49 _ Link to this message    Send private message to this user   
Well I downloaded VirtualDub 148 AC3 and it tells me "VirtualDub cannot decode MPEG2 video streams" and like I said earlier VirtualDubMod I have no sound - if nothing else I can just multiplex them to view it doesn't take that long :)
AfterDawn Addict
_
4. May 2005 @ 14:57 _ Link to this message    Send private message to this user   
Bah, there's always one catch with free apps...now we know what vdubs are :)
No matter. Just mux in TMPGEnc or whatever, to test.

BTW, if you are going to be frameserving, use VirtualDub to resize the PAL video to NTSC by changing frame size.
Video, filters, add, resize.
Mainconcept will then encode, without you having to figure out it's crop and scale settings.

Black holes are where God divided by zero...
Cheers, Jim
RonnaP
Junior Member
_
4. May 2005 @ 16:06 _ Link to this message    Send private message to this user   
Ok, so are you saying resize the AVI in VirtualDub to 720x480 then save the AVI and encode it in MainConcept?? What do I choose in MainConcept - NTSC 29.97??
Sorry but I have soaked in quite a bit so I wanna make sure I have this correct :)
RonnaP
Junior Member
_
4. May 2005 @ 16:12 _ Link to this message    Send private message to this user   
I just noticed something on the videos I just encoded - the originals were in letterbox but the encoded one is in full screen.

Also is there a difference in VirtualDub and VirtualDubMod if the audio is mp3?? Do you just have to use VirtualDubMod if the audio is ac3?? VirtualDubMod is a lot slower than VirtualDub.

I guess I didnt set on the advanced tab source 1:1 VGA and Keep Aspect Ration 2 in TMPGEnc and resize the video in MainConcept - am I correct??

This message has been edited since posting. Last time this message was edited on 5. May 2005 @ 05:04

AfterDawn Addict
_
5. May 2005 @ 07:47 _ Link to this message    Send private message to this user   
OK, obviously you've been deluged with information, and it's difficult to comprehend it all.
Here's a few pointers.
HOW a movie is encoded, depends on the source.
What framerate is the source? (PAL, NTSC, HalfNTSC, 3:2 pulldown NTSC)
What aspect ratio (framesize) is the source? (352x240, 320x240, 480x480, etc) and
What audio type is the source? (mp3VBR, mp3CBR, LPCM, AC3, etc)
Once you know these three things, you can then determine how to encode the file.

We know that your source is 25fps.
We know that it's letterboxed (but I don't know what framesize/aspect)
We know the audio is mp3 (probably VBR).

Here's how I would do it:
Open the video in VirtualDub (or virtualdubmod, doesn't matter if the source is avi).
Select Audio, full processing.
Select File, save .wav
Select Video, Filters, Add, Null Transform.
Click on Cropping.
Crop off the black boxes.
Click File, start frameserver (hopefully you have installed the frameserving client already).
Give it a name, and save as whatevername.vdr
Leave the frameserving client running!!!
Open your encoder (tmpenc or mainconcept).
For video source, use the .vdr that you just started.
For audio source, use the .wav you just saved.
Encode the video.

Now for your files, try VirtualDub. If it won't work to exctract the audio to .wav, then use virtualdubmod.
Depending on the SOURCE aspect/framesize, you SHOULD resize in VirtualDub, then frameserve to mainconcept. If you're using TMPGEnc, then DO NOT resize the video.

If you tell me exactly what the current aspect ratio/framesize of the video is, and what the CROPPED aspect and framesize of the video is, (and it's framerate) I will give you the settings for TMPGEnc, and/or mainconcept.

Black holes are where God divided by zero...
Cheers, Jim
RonnaP
Junior Member
_
5. May 2005 @ 08:03 _ Link to this message    Send private message to this user   
Ok, I'm lost again (whats new right) LOL.
I know to get the source framerate, ratio etc load in GSpot but I don't know what u mean by "cropped" framerate, ratio ect.
The original file is 624x352, 4:3 with mp3 vbr audio.

Ok - I tried to do step by step what u said and when I opened the video in VirtualDub and went to crop, there aren't any black boxes. Also, I evidently don't have the frameserver client installed, where do I get that? I found what I thought was a frameserver and I installed it but when I run frameserver in VirtualDub it says "Frameclients installed: none"
I'm really sorry for all this - but I REALLY appreciate it :)

This message has been edited since posting. Last time this message was edited on 5. May 2005 @ 08:32

AfterDawn Addict
_
5. May 2005 @ 09:10 _ Link to this message    Send private message to this user   
If the original video has black bars top and bottom, one would crop those off in VirtualDub.
If you open the file, and it has no black bars, then no worries.
To install the frameserver, open the folder where you installed VirtualDub, and double click on AuxSetup.exe
Now you may have to restart VirtualDub, but you'll be able to frameserve, thus not having to save an edited AVI.
Your file is 624x352, with no letterboxing, so you can use it directly in either TMPGEnc, or mainconcept.
Either encoder will add black bars top and bottom, if needed, to keep the video aspect correct, and still fit a standard 4:3 TV.
If the video DOES have black bars, then crop it in VirtualDub, and frameserve it to TMPGEnc.
If you're frameserving it to Mainconcept, then you would resize it in VirtualDub first.
eg. The original video is an odd size, such as 352 x 176 (2:1), then in VirtualDub, select Video, Filters, Add, Resize, and make it a proper 4:3. In this case you would add borders (letterbox), so it is 352x240 (4:3). Now you don't need to do any aspect changes in Mainconcept. Just encode it to 720x480 standard NTSC (which actually comes out to 704x480, TRUE 4:3, for TV).

Black holes are where God divided by zero...
Cheers, Jim
RonnaP
Junior Member
_
5. May 2005 @ 09:44 _ Link to this message    Send private message to this user   
"If you're frameserving it to Mainconcept, then you would resize it in VirtualDub first.
eg. The original video is an odd size, such as 352 x 176 (2:1), then in VirtualDub, select Video, Filters, Add, Resize, and make it a proper 4:3. In this case you would add borders (letterbox), so it is 352x240 (4:3). Now you don't need to do any aspect changes in Mainconcept. Just encode it to 720x480 standard NTSC (which actually comes out to 704x480, TRUE 4:3, for TV)."

Ok I think I understand what your saying - but how do I know if the file needs cropping or not?? Is there standards and if its not that standard then I need to crop?? Is that what your saying??
Advertisement
_
__
 
_
AfterDawn Addict
_
5. May 2005 @ 10:28 _ Link to this message    Send private message to this user   
Exactly. Video files come in any number of sizes, but only TWO are standard for DVD. 720x480 NTSC, and 720x576 PAL.
Yes, you can do things differently than just those two, and they MAY play in any given standalone player, but again, they may not.

If your source file is NOT 4:3 fullscreen (no letterboxes), then somehow, it must be adjusted to play properly on a standard 4:3 TV.
If you actually own a 16:9 widescreen TV, then things get complicated, but we won't go into that here.
So, checking in GSpot, we find that the video is 2:1 or 3:1 or some other non-standard size.
In order to play it properly, so it's not stretched or squished on the TV, it must be letterboxed.
If the source file is letterboxed, but the correct aspect 4:3, you CAN simply encode it as such, but you're wasting a whole lot of bitrate (quality) by encoding the black stuff.
It is better to crop off the black stuff, and then frameserve. The encoder will add the black stuff back on, but doesn't waste video bitrate encoding it. TMPGEnc and Canopus are best at this.

If the video is NOT 4:3, then you can still simply encode, and let the encoder add the black. Again, Canopus and TMPGEnc.

When using MAINCONCEPT, because of the way it crops and scales, one must do things differently.
Here is where you crop (if needed) AND resize, to maintain the correct aspect (no squishing or stretching), and still get a standard 4:3 output.

In my example using a 2:1 video 352x176, in order to have it play properly, I need to letterbox it. In VirtualDub, resize filter, I set the width and height the same as the source, 352x176, but then I "expand frame and letterbox image" to 352x240. This adds the correct number of black pixels, top and bottom, and makes the video 4:3. I can now frameserve it to mainconcept, and simply use the DVD template to make the video. No messing with aspect/cropping/scaling/resizing settings, which Mainconcept doesn't do well anyhow.

What this all means is, if the video in GSpot reports 4:3 and it is full screen, not letterboxed, you can simply encode as is.
If it is letterboxed, or it is NOT 4:3, then you need to do something to it, so it comes out 4:3, but not squished or stretched.

Black holes are where God divided by zero...
Cheers, Jim
 
Related links
Download TMPGEnc from here.
Read AfterDawn.com's VCD and SVCD guides from here!
 
Related forum topics Posts Last post Forum room
TMPGEnc Authoring Works 4 and H.264 Video Preview Playback is SLOW 1 2. January 2014 Video to DVD
Review: TMPGEnc Authoring Works 4 7 15. June 2011 News comments
TMPGEnc Video Mastering Works 1 11. May 2011 Convert DVD to another format
TMPGenc Xpress 4.0 6 26. October 2010 Video - Software discussion
TMPGEnc authoring software question 4 4. September 2010 Video to DVD
Problems loading Blu Ray files into TMPGEnc DVD Author 4 3 15. April 2010 Blu-ray players
Problems loading m2ts files into TMPGEnc DVD Author 4 1 14. April 2010 Video to DVD
Copy the input format in TMPGEnc 4.0 XPress 2 14. April 2010 Video - Everything else
italics in TMPGEnc Authoring Works 4 1 26. March 2010 Video to DVD
TMPGEnc Authoring Works 4- Cannot import MPEG 2 6 19. March 2010 Video to DVD

 
afterdawn.com > forums > archived forums > mpeg-1 and mpeg-2 encoding (avi to dvd) > problem with audio sync in tmpgenc
 

Digital video: AfterDawn.com | AfterDawn Forums
Music: MP3Lizard.com
Gaming: Blasteroids.com | Blasteroids Forums | Compare game prices
Software: Software downloads
Blogs: User profile pages
RSS feeds: AfterDawn.com News | Software updates | AfterDawn Forums
International: AfterDawn in Finnish | AfterDawn in Swedish | AfterDawn in Norwegian | download.fi
Navigate: Search | Site map
About us: About AfterDawn Ltd | Advertise on our sites | Rules, Restrictions, Legal disclaimer & Privacy policy
Contact us: Send feedback | Contact our media sales team
 
  © 1999-2025 by AfterDawn Ltd.

  IDG TechNetwork