Log in

View Full Version : Audio sync - progressively gets worse... am I dropping frames??


Naeko
6th June 2003, 09:04
Hey everyone!

All right, so this is my first post here... please be gentle. I suspect it’s going to be a long one. ;p Here’s what I’ve got going on. I have two .avi files at the moment. They were originally split so that they could be burned onto two individual CD’s; however I now have a DVD burner (Sony DRU-500a) and have been attempting to join the two together, re-encode and then burn to a DVD.

Below is a small list of the programs that I’ve been exposed to so far and been using to finish this process:

VirtualDub 1.5.3
NanDub 1.0 RC2
GSpot 2.2
DVD Maestro 2.9
BeSweet 1.4 + GUI 0.6 b76
AviSynth 2.08
CCE 2.66.01.07
Sonic Foundry Vegas Video 4.0
Pulldown.exe 0.99d

I’ve read through many of the guides posted here on doom9 (whew! I’d be totally lost w/o them) and believe I have a good foundation to build from, but I must be missing something. In short I’ll run you all through the processes I’ve put these .avi files through and hopefully someone can pick out where I made my error. Oh yea… it would help to know the problem huh? In short when I playback the DVD on my standalone or computer the audio appears to go progressively out of sync from the video track. Ok… now on with my novel!

First thing first. I had to get the two .avi files joined into one. To do this I used NanDub. After joining the two files together I reopened the now complete movie and was greeted with a warning message saying that there was an improper VBR audio encoding in the file and that NanDub would rewrite the headers with CBR for better compatibility… I’m sure most have seen this, but it lets you know that it would also introduce xx amounts of skew in the file. To avoid this I set the audio modes to “full processing mode” and saved the .wav file (totally decompressed) to be re-encoded later.
So far I thought things were looking good. After watching the newly merged .avi file on my computer everything looked great. Audio was in sync, no jerkiness, etc….

The next step was re-encoding the movie through CCE. I’m running a more current version than the one listed through the guides, but I believe I was able to get everything sorted correctly. Below is a copy of my AviSynth script I used to import this into CCE:

avisource("z:\MOVIE_NAME_HERE.avi")
BicubicResize(720,272)
AddBorders(0,104,0,104)
ResampleAudio(44100)

As I understand it that last line with the audio resample rate is just to “trick” CCE into accepting the file as valid? I turned off the audio output before encoding as I hear this is one of CCE's weak points.
After CCE finished encoding I now stood with 1 complete .avi file, 1 complete/decompressed .wav file and 1 .m2v movie file.

To get this to run on my standalone I ran it through pulldown. After that finished, I encoded the .wav file in Vegas 4.0 to a Dolby .ac3 audio track. I then took my .m2v and my .ac3 files and imported them both into Maestro; compiled and then burned to a DVD. The DVD plays great, but over time… slowly as the movie progresses the audio and movie go out of sync. It’s not huge… about 2 or 3 seconds by the end, but definitely distracting.

Okay – so this post is huge, sorry I hope you haven’t fallen asleep yet! ;p That’s where I stood a couple of weeks ago. Since then I’ve been through the forums and tried a few things to correct this… so far no luck.

I read in a couple of places that this issue is usually attributed to dropped frames and can be solved by using a few of the parameters in pulldown. I have tried some of those, see lines below:
Pulldown project.mpv output.m2v –prog_frames p
Pulldown project.mpv output-drop.m2v –prog_frames p –drop_frame true
but so far those have not worked. I’ve also read about people manually modifying or inserting pauses or changing the speeds of the .wav files. I’ve have been trying a few things there – Maestro has a ‘sync audio’ feature, but that has not worked either. I have noticed though, that after exporting the .wav file from my movie, for some reason the total length of the file is a few seconds shorter than the re-authored .m2v file. That has struck me as quite peculiar. I have used a few different programs to extract the .wav (thinking that it could be something to do w/ NanDub), but so far each program pulls an audio file that is just a tad too short.

I went back to my original two .avi files and ran them both into GSpot to have a look at their audio tracks. I don’t know if it means anything, but the two files both have different bitrates for audio and video. Would or could that affect playback when extracting those tracks?

All right, I’m going to cut it off here, I’m sure I’m missing some info. that you guys will want to check out (sorry in advance!). Let me know what you want; or want me to try and I’ll get it for ya! :)

… Wake UP!!! That’s right, this is the end of the post.

Thanks again!


-Naeko

hms
7th June 2003, 05:48
Do you have the same sync problem in the avi video?
If yes then I suggest you take a look at the post "Small guide: Audio Synch Proceedure" http://forum.doom9.org/showthread.php?threadid=54810

Naeko
7th June 2003, 09:58
Hey Hms,

Thanks for the reply. No sync problems in the avi file... all is good in the world there. I've watched the movie many times on my computer... it just seems to be when I try to extract the audio to burn to a DVD is where I get problems. I will check out that guide posted below as well; just in case.

Thanks! Any other suggestions??


-naeko

hms
7th June 2003, 15:17
Please check your framerate for your AVI file: It must be 29.970fps for NTSC or 25fps for PAL.
Please consider that a NTSC DVD always plays at 27.970fps and a PAL DVD plays always at 25fps.
If your framerate differs then you must first change the framerate and then stretch the audio.
I read that this can also be done in Vegas: http://forum.doom9.org/showthread.php?threadid=53715

Naeko
7th June 2003, 23:38
Thanks again Hms,

The avi movie is actually a 23.97fps file. After encoding it in CCE I used pulldown.exe to get it to work on NTSC 29.97fps standalones. I also tried the time stretch with Vegas video - thanks for that tip! After running it through Maestro however the movie is still out of sync... this time though it's out of sync all of the time so I can't really tell if it's still getting progressively worse. I am going to try compiling it again w/ a few different settings in Vegas Video to see if I can get it any closer. I will let you all know how I fair.

hms
8th June 2003, 02:16
before anything you should fix your AVI file first:
Pulldown only rewrites the headers but for your purpose it does not do.
Please open your AVI file in VirtualDub.
Under VIDEO FRAME RATE CONTROL change the framerate to 29.970fps.
Save the edited AVI file.
(check VirtualDub proceedures on doom9 guides)
Take that new file and again open in VirtualDub.
Then try to follow that little video sync procedure guide.