INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

How To Fix Audio Sync Problems 102

Forum Index -> How to's -> User guides Printer-friendly version
Goto page 1, 2  Next
Reply to topic
Author Message
gcsnelgar
Member


Joined: 13 Jun 2004

Post Posted: Jul 16, 2004 15:40 Posts View users profile Send private message Reply with quote

Anyone who has poor audio sync in their original files (before putting them on DVD), follow this solution.
Also, anyone who has files which play properly in media players but lose sync in editing programs, follow this solution.
If the audio only loses sync on the DVD, see my post "How To Fix Audio Sync Problems 101".

The following method works if the original file is MPEG-1, MPEG-2, or AVI. This guide is designed for people who want put video files onto DVD using DVD Workshop, but can also help you fix audio in files you just want to play on your PC.

You will need these programs: Cool Edit Pro, Media Player Classic, TMPGEnc, VirtualDub.
If you have any trouble using one of these programs, you will find plenty of guides dedicated to using these if you search Google.

If the file plays out of sync even in media players, start from step 4.
If the file only loses sync in editing programs, start from step 1.
You can test to see if your file loses sync in editing programs by loading it into virtualdub, skipping to a dialogue scene near the end, and listening for sync problems. If you are told by virtualdub that the file has an improper VBR header, read the NOTE below step 8 before continuing.

1) If your file is AVI:
Open the file in virtualdub, and go File>Save Wav. Then go Audio>WAV Audio and select the wave. Then save as direct stream copy and go to step 4.

If your file is MPG:
Open TMPG, and in the project wizard, click "NTSC Low Resolution" (or PAL if you video is PAL) and make sure the window on the bottom right says "CBR MPEG-1...".
Never use variable bit rate when there are sync problems. We're using low resolution because we're going to discard the video output, and low res encodes faster.

2) Click "Next", and browse for your original video file under the AUDIO file slot. Your original file must be MPG, AVI, MP2, MPA, or WAV. Leave the video slot blank.
Click "Next" twice. To speed up the encoding, go to expert settings and change motion search precision to "Very Fast".
Click "Next" and encode the file. Check "Output as individual elementary streams".

3) Go to File>MPEG Tools, and multiplex the new audio stream (it will have the extension .mp2) with the ORIGINAL video stream. You can delete the blank m2v file TMPG generates.
These first 3 steps allow media players to see the file the same way as an editing program sees it. If you play the new file in a media player, you should see that the audio near the end is out of sync.

4) Open the file in Media Player Classic. This program is useful because of its on-the-fly audio time shift function.

5) Play the file until you notice loss of lip sync.

6) Click Play>Audio>Options. Go to Audio switcher. Check "Enable built-in audio switcher" and "Audio time shift". Enter a value such as 200 ms.

7) Click Play and see how this affects the audio sync. If it makes it worse, change to -200. If it makes it better but not enough, increase the value to 300. Keep increasing or decreasing the value until the audio is in sync. Note down the time code (Minutes:Seconds) of the point at which you adjusted the audio, and next to this write the adjustment value you settled on.

If your original file played out of sync even in a media player, one adjustment at the beginning may be enough to fix the file. If your file only lost sync in virtualdub, you may need to make more adjustments further along in the file. If you captured your file from TV or VHS, there may be dropped frames, and in this case you can also expect to make more than one adjustment.

cool.gif Continue through the file until you notice the audio lose sync again. Adjust the value again so that the audio is in sync. This time, note the difference between the new value and the old value, and write this next to the timecode where the adjustment took place.
e.g. if after the first loss of sync you adjusted by +500 ms, and on the second loss you decreased the value to +300, you would note down -200. Repeat step 8 until you have corrected any further loss of sync in the file. Try to pick your adjustment points where the is a silent pause in the audio. This is because you will either extend or shorten this silence in step 10.

NOTE:
You should only need to note down 3 or 4 values.If you find the audio constantly losing sync soon after you fixed it, then you're dealing with an avi file with an incorrect variable bit rate header. To fix this you need to first extract the audio as a wave using virtualdub. Start from step 1, but use the wave file instead of the original file in the TMPG project wizard audio slot.

9) Your notes should look something like this:

13:23 +400
18:20 -200
24:47 +600

with adjustment points on the left and adjustment values on the right.
Once you have all the values, load the original file into virtualdub. Click File>Save Wav, to extract the audio to a wave file.

10) Open the wave file in Cool Edit Pro. Move the cursor to the first adjustment point. As with anything in Cool Edit, it helps if you zoom in using the magnifying glass icon.

Click the stop button.
If the adjustment value is positive, go Effects>Generate>Silence. Enter the adjustment value after the decimal point.
e.g. 50 ms will be typed as 0.050 seconds
200 ms will be typed as 0.200 seconds

If you picked your adjustment point as a silent part, this will simply extend the silence. Otherwise you will hear a short glitch in the final file.

If the adjustment value is negative, you will need to delete part of a silent pause. Find the closest silent pause to your adjustment point (silence is represented as a flat line, zoom in until you see it), highlight the appropriate amount of silence, and press delete.
e.g if your adjustment value is -200, highlight 200 ms of silence and delete it. There is a timecode array on the bottom-right corner of the screen. Under "Sel" and "Length" you will see the selection length in seconds. To delete 200 ms, get this value as close as possible to 0.200 and press delete.

If you have to delete a section that is not silent (represented as a a zigzagging line), you will be deleteing part of the audio, which could be music or characters talking. In this case you will hear a short glitch in the final file.

Make all the corrections in this way.

11) When you're finished, save the file as a wave.

12) If you want to make a DVD with the final file read this:
Import the wave into DVDWS. I recommend importing the video as m2v (demultiplex the original file using TMPG). Now the encoded DVD will have its audio in sync!

If you just want to play the final file on your PC read this:
If your original file is AVI, open the original file in virtualdub, do a direct stream copy on the video and compress the wave from step 11 to MP3.
If your original file is MPG, compress the wave from step 11 to mp2 audio like in steps 1 and 2, and multiplex it to your original file like in step 3.

Any questions email me on gcsnelgar@hotmail.com

May all your digital audio be in sync!


hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 11, 2004 03:32 Posts Comp View users profile Send private message Reply with quote

hi, Another more simple solution will be available soon :
biggrin.gif
http://hypercubemx.free.fr/html/hypercube_time_stretcher.html


johns0
Puppet Master


Joined: 05 Jun 2002
Location: canada

Post Posted: Aug 11, 2004 03:38 Posts Comp View users profile Send private message Reply with quote

hypercube,sounds very promising,so you can play the audio with video in realtime mode with the audio being shrunk or stretched on the fly and then saving after its in sync?
_________________
Ben Johnson-I didnt take any stereos!


deckard8
Member


Joined: 27 Mar 2004
Location: London

Post Posted: Aug 11, 2004 04:59 Posts Comp View users profile Send private message Reply with quote

Can't YAAI do that?

johns0
Puppet Master


Joined: 05 Jun 2002
Location: canada

Post Posted: Aug 11, 2004 09:54 Posts Comp View users profile Send private message Reply with quote

Yaai only opens avi and is buggy,keeps complaining about pins not connected.
_________________
Ben Johnson-I didnt take any stereos!


hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 11, 2004 12:12 Posts Comp View users profile Send private message Reply with quote

Quote:
hypercube,sounds very promising,so you can play the audio with video in realtime mode with the audio being shrunk or stretched on the fly and then saving after its in sync?

yup cool.gif

I made this software only to make a French version of a manga (totoro).
I had a video tape in french and a nice Divx in japanese.
Has you know it was impossible to simply dub the audio from VHS with the Video because Videotape are irregular.
after several nights it finally work ! (but still remain in beta stage !)

the most complicated task was to implement an accurate seek on a virtual WAV file (shrunk and stretched on the fly)
this WAV file becomes real only in final redering.

it will be very easy to do this kind of job and other stuffs like:
- NTSC framerate to PAL convertions
- initial offset resync
- ...


hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 11, 2004 12:20 Posts Comp View users profile Send private message Reply with quote

Quote:
Yaai only opens avi and is buggy,keeps complaining about pins not connected.


I don't know this tool. Hypercube timestretcher use DirectShow in the same way as Hypercube Transcoder. So in case of trouble with DirectShow graph, you can edit it with the mouse.

I tested my software with MPEG and AVI with success.

note that you have to demultiplex yourself the audio in a decompressed WAV file to work with. (this is required to work this accurate seeking)


gcsnelgar
Member


Joined: 13 Jun 2004

Post Posted: Aug 11, 2004 13:21 Posts View users profile Send private message Reply with quote

Actually there'a a way better way than any of these for fixing corrupt mpeg video. Most of the video downloaded off p2p networks have time stamp errors in them. They play fine in media players but lose audio sync when edited or burned to DVD. Simply use a program called Womble MPEG Video Wizard:

http://www.womble.com/download.htm

It has a function which repairs the metadata in mpeg files. It fixes GOP size errors, GOPTS errors, and PTS errors. In other words it fixes your downloaded mpegs so that you can edit or burn to DVD without losing sync.

I never use the method I originally posted anymore. The only drawback with the Womble method is that it inserts a short buzzing sound at the point of each PTS error, which could be annoying. The original method inserts silence instead, but takes 100 times longer.

The perfect method would be to fix it with Womble, and then go through the corrected WAV with Cool Edit and replace all the buzzing with silence, or make the buzzing quieter. This way Womble finds all the PTS errors for you, so you don't have to watch the whole file with Media Player Classic and jot down all the errors.

This only works for mpeg files that have bad sync because of PTS errors. It wouldn't help with your French/Japanese anime problem.


johns0
Puppet Master


Joined: 05 Jun 2002
Location: canada

Post Posted: Aug 11, 2004 15:32 Posts Comp View users profile Send private message Reply with quote

I've used womble and it doesnt stretch or shrink audio on the fly and isnt way easier cause it just doesnt do that for audio,maybe for audio that goes out of sync after joining.
_________________
Ben Johnson-I didnt take any stereos!


hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 11, 2004 17:26 Posts Comp View users profile Send private message Reply with quote

okay, the Hypercube transcoder 1.0.0.1 is out.
check it.
smile.gif

this is a pre-release: no manual.


hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 11, 2004 17:31 Posts Comp View users profile Send private message Reply with quote

oops Hypercube Time Stretcher I mean tongue.gif

deckard8
Member


Joined: 27 Mar 2004
Location: London

Post Posted: Aug 11, 2004 17:31 Posts Comp View users profile Send private message Reply with quote

Yaai 'Pins not connected error' is fixed by installing Nic's Xvid Decoder.

johns0
Puppet Master


Joined: 05 Jun 2002
Location: canada

Post Posted: Aug 11, 2004 19:14 Posts Comp View users profile Send private message Reply with quote

hypercube,im trying to d/l the time stretcher from your site but the p/w keeps getting rejected even when i refresh and get a new p/w.
_________________
Ben Johnson-I didnt take any stereos!


gcsnelgar
Member


Joined: 13 Jun 2004

Post Posted: Aug 11, 2004 19:20 Posts View users profile Send private message Reply with quote

Don't forget to enter the username it specifies as well

johns0
Puppet Master


Joined: 05 Jun 2002
Location: canada

Post Posted: Aug 11, 2004 19:24 Posts Comp View users profile Send private message Reply with quote

The user name stays the same,the p/w changes but must be my server,worked before with the trancoder file.Finally got the file to d/l.Now to test it out.
_________________
Ben Johnson-I didnt take any stereos!


catdaddio6
Member


Joined: 26 Mar 2003

Post Posted: Aug 13, 2004 02:19 Posts View users profile Send private message Reply with quote

having same troulble as above,,tried for a long long time to get in and get it,,please help

hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 13, 2004 15:59 Posts Comp View users profile Send private message Reply with quote

I test it with IE6, FireFox and Mozilla... it works !
what is your navigator ?


catdaddio6
Member


Joined: 26 Mar 2003

Post Posted: Aug 14, 2004 00:49 Posts View users profile Send private message Reply with quote

ie6,,i use passwords all the time i'm using the download1012 as log and copy and pastin the pass

gcsnelgar
Member


Joined: 13 Jun 2004

Post Posted: Aug 14, 2004 01:00 Posts View users profile Send private message Reply with quote

I used Getright, I was able to download it successfully.

catdaddio6
Member


Joined: 26 Mar 2003

Post Posted: Aug 14, 2004 01:25 Posts View users profile Send private message Reply with quote

yeah but how did you enter with the pass

steptoe
Member


Joined: 22 Sep 2002
Location: United Kingdom

Post Posted: Aug 14, 2004 01:28 Posts Comp View users profile Send private message Reply with quote

the login screen doesn't work with Netscape Navigator 7.xx


You'll have to use IE, I've just downloaded both Hypercube softares, but had to use IE 6.xx, which I don't liek using anymore

This is my personal choice, please no arguments over IE is better than NS or vice versa, I just use IE if I hit problem sites that don't like realising that other browser software except IE does actually exist


catdaddio6
Member


Joined: 26 Mar 2003

Post Posted: Aug 14, 2004 01:30 Posts View users profile Send private message Reply with quote

i'm using ie6,,,can someone send to me by messenger maybe its my roadrunner service??

hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 14, 2004 04:16 Posts Comp View users profile Send private message Reply with quote

Quote:
Netscape Navigator 7.xx

I'm going to test it...

Quote:
having same troulble as above,,tried for a long long time to get in and get it,,please help

I made some changes... my php seems to fail when a lot of queries
are coming. Now it uses mysql LOCKs. With a 10sec timeout in case
of heavy load.


hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 14, 2004 04:45 Posts Comp View users profile Send private message Reply with quote

Quote:
Netscape Navigator 7.xx

corrected.


gcsnelgar
Member


Joined: 13 Jun 2004

Post Posted: Aug 14, 2004 18:07 Posts View users profile Send private message Reply with quote

I tried downloading without Getright and that works too. I just downloaded it with Internet Explorer. I got it here:

http://hypercubemx.free.fr/html/download.php?download_id=6


hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Aug 19, 2004 11:04 Posts Comp View users profile Send private message Reply with quote

does anybody can tell me if my new soft is a good stuff or not ?

TworkEmon
Member


Joined: 03 Dec 2004

Post Posted: Jan 08, 2005 20:55 Posts View users profile Send private message Reply with quote

I liked hypercube time stretcher. I have used it acouple of times and worked great.

Just a couple of things I did notice. Not all files show the direct show graph and sometimes the stretch points are off. Maybe having the the video show size a bit bigger so we can see people lips move easier. Also I have noticed that on some files the time at the bottom of Play Stop etc... is off like it goes to the end and the movie keeps playing. One last thing maybe allowing importation of vob also in video.

Other then those minor things the synching works great and fast. I really love it easiest resynching ever.

Keep up the great work smile.gif


hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: Jan 09, 2005 04:31 Posts Comp View users profile Send private message Reply with quote

thank's a lot. You are the first talking about my second freeware. sad.gif
For instance, I don't have any time to work on it. But I will note
any comments for future release.


TworkEmon
Member


Joined: 03 Dec 2004

Post Posted: Feb 03, 2005 12:02 Posts View users profile Send private message Reply with quote

Still waiting for an update to the Hypercube TimeStretcher smile.gif Great Program dont stop developing it smile.gif

hypercube
Member


Joined: 26 Sep 2002
Location: France

Post Posted: May 12, 2005 03:24 Posts Comp View users profile Send private message Reply with quote

Arf ! I don't have any time to work on it. cry.gif (for instance, I'm trying to make a MIDI sequencer, just for the fun tongue.gif )
I can try to prepare a tutorial for this tools. juste to make it more simple
to use.


Reply to topic All times are GMT - 6 Hours
Goto page 1, 2  Next
Forum Index -> How to's -> User guides Page 1 of 2





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You can vote in polls in this forum



Jump to:  
Display:   
DVDFab DVD to DVD lets you backup DVDs to DVDr, AVI or MP4 for portable devices. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics