Well, I guess it's my turn to be tortured with audio sync problems. I'm converting a PAL AVI to NTSC DVD. This is my first framerate conversion, and I was successful using AviSynth & CinemaCraft Encoder (25000 -> 23976, and then applying Pulldown). I used DJRumpy's excellent tutorial.
I then used BeSweet (with AC3Machine) to "convert the framerate" of the audio (and yes, I do realize that there's no such thing as an audio framerate) from 25000 -> 23976. But I was left with an AC3 file about 9 seconds longer than my video file. DVD Lab compiled it anyway, but there were subtle sync problems (the problem being that there is no such thing as a "subtle" sync problem).
I then tried re-extracting the audio from the original source as a WAV and using GoldWave's "Time Warp" feature to simply resize the sucker. It did in fact resize just perfectly. But now the sync problem is even worse, the sound being almost 3 whole seconds ahead of the video, despite the fact that the video and audio files are of the same length.
I've read and read extensively on this topic, but I'm at a loss. Is there no option in BeSweet to do absolutely nothing to an AC3 file except a "framerate conversion?" None of the options in the AC3Machine GUI look completely appropriate for me as my file is 5-channel (not 2 and not 6-aka-5.1). I'm confused by the available "Overall Output Options" as they are limited to "5.1" and other options which seem obviously inappropriate (I also don't know the difference between "surround" and "surround2"). Further, you can't remove the checkmark next to "Channels Mode."
I also took a quick look at the BeSweet GUI, but looking at the command line it seems like it would force a bitrate of 384 kbps on my pre-conversion 448 kps file.
Is there a better way, or a more dependable way, of doing this? Would perhaps simply extracting the AC3 to wav and then feeding both through the CCE encoder together with an AviSynth script be more reliable?
Pulling my hair out on this one. Thanks in advance ...
-abs
+ Reply to Thread
Results 1 to 18 of 18
-
-
You can mux the video and ac3 with bbmeg and set the delay for the time needed,i've done it with 5.1 ac3 and it works great,just estimate how much time delay u need and enter for audio start or video start.
I think,therefore i am a hamster. -
is the audio out of sync by the same amount over the entire movie? If it is, you have several options to correct this. If the sync is non-linear (sync drifts and changes as movie plays) then you have a much harder problem to correct.
Personally I have had good luck using Vegas Video to sync audio with video. I frame-serve (or use DVD2AVi) the mpeg2 file into Vegas, then drop the audio file and sync it up by moving it forward or backward relative to the video. Vegas also has the ability to time-stretch the audio which is very helpful. Vegas can also deal with 5.1 DD audio.
DVD-Lab can compensate for audio sync problems by changing the audio delay, but you need to know what the delay value is first. -
I'm having similar issue but mine is synch drift most of the aps i've looked at are for constant out of synch i.e dvd labs.
I'm using virtualdubmod to demux the original audio and re-add it with dvdlab, but seems to be 3-4 secs out everytime.
someone suggested re editting the wav file by taking the time out of blank spots.
this seems an awefully difficult way to solve the issue.
any help on this problem would be great guys. -
In doing NTSC to PAL conversions, I have found CoolEdit PRO to be a good solution to the problem. Also, I faced many of the problems described in the postings.
Rate conversion:
It appears that the conversion factor must be precicely entered. Even a small rounding in the figure you enter can cause a gradual shift of sync and an audio file slightly longer or shorter. Even 1 second shift makes the last few minutes unwatchable. CoolEdit PRO allows a precice (4 decimal digits accuracy) conversion factor.
Sample frequency conversion:
This is a serious problem. You need a high accuracy conversion (integer converters cause spikes and brief moments of silence) to achieve a descent result. In CoolEdit you have the option of keeping pitch or beat constant. I discovered that a constant pitch conversion preserves the quality better.
Constant sync shift:
If the result causes audio to play ahead or after video by a fixed amount of time, then you can open both video and audio in VirtualDUB and select a constant positive or negative amount of delay for the audio. This fixes it.
Varying constant shift:
This is a bitch. Dropped frames caused the audio to shift from video by a constant amount of time but different on different parts of the AVI. I used VirtualDUB and the audio delay feature, however I went through the video saving parts of it (with audio) using different audio delay values. A particular video had to be split in 17 separate parts which were then opened and appended in VirtualDUB afterwards to save the whole take in a single file. It took me 3 hours, but it was fixed.The more I learn, the more I come to realize how little it is I know. -
Thanks to all for these replies.
I guess what I'm looking for here is some assurance that I'm going about things in the best way possible. This particular disc I've authored before and kept it as PAL, and then used IFOedit to apply a patch to "fool" DVD players into thinking it's an NTSC disc. That approach has worked extremely well for me as far as audio/video, but it makes the DVD menus behave rather buggily. I decided to do a proper framerate conversion.
What I'm getting at is that I plan to probably do a lot of these PAL -> NTSC conversions, and I want to make sure I'm doing things as optimally as possible. In other words, is there some way to go about this audio conversion so that problems like this are the exception rather than the rule? OR, from your experience, am I going to have a problem somewhat similar to this, but unique enough that I'm going to have to work toward a unique solution for each problem, every time I do this kind of conversion?.
So I'm trying to get a methodology down. I'd like to alter the AC3 directly, without converting to WAV, if possible. But I cannot do this with GoldWave. But even with a direct conversion with BeSweet, I'm not certain that BeSweet isn't doing something else with my file besides shortening/lengthening it.
There is also the issue of AC3fix. I've started to always use this. When it finds "bad frames," does it remove said frames, or do anything that might cause a change in the length of the audio?
As to your questions of whether this sync problem is a "constant shift" or a "drift," I'm really not certain. I've tried authoring this disc at least twice (on a rewritable), and I think I saw the problem occur both ways. I'll take a closer look if I haven't already erased it . . .
-abs -
I took another look at my latest compilation of this disc, and the audio definitely gets further ahead of the video as it goes. Whether or not that will resolve later in the movie I don't know, but I do know from watching a scene much later in the film that the problem is even worse, with the audio maybe 3 or 4 whole seconds ahead of the video.
The way I prepared this particular audio was to extract the AC3 from the AVI as a WAV, changed its length using GoldWave to be the same length as the video in DVD Lab, then recompressed it to AC3 with BeSweet. So anyway, I guess that's not a very good method ...
-abs -
There is your problem right there. DVD-Lab is NEVER CORRECT with the time of the video it displays. NEVER. I use Adobe Encore to give me the precise time, then I time-warp in Goldwave to the exact time shown in Adobe Encore. this method has worked 90%+ for me. Encore also works well for previewing the video/audio. I use it for this purpose but little else because it has so many bugs.
-
Originally Posted by Skynet107
NEVER use the duration stated by any program to calculate the length of the movie.
I open the video in VirtualDUB and check the duration as "FRAME COUNT". The original NTSC version and the new PAL version will have the same amount of frames, only a shorter duration since fps will go from 23.976 to 25.
So, if the original video is, say, 134817 frames long and you are converting from NTSC to PAL, the duration, in seconds of the final movie will be 134817 / 25 = 5,392.68
The original movie (NTSC) would be 134817 / 23.967 = 5,622.99 sec
This means that to go from NTSC to PAL audio must be faster by
25/23.976 = 104.27093%
and the reverse conversion works out to be 95.904%
Please notice the precision used for the speed modification. This level of accuracy is required if you want to have frame precice conversion on long movies. This is because the length of the movie (in frames) is 6 digits, so you need 6 significant digits of accuracy in the conversion rate.
If you take this into account, converting proper (non-corrupt or abused) movies from NTSC to PAL and/or reverse, should be easy and troublefree. Only corrupt material will cause you trouble.
Regarding the AC3 direct editing, you need to understand the following:
AC3 is a compressed format for storing audio.
Any alterations to the audio must be done to the uncompressed content.
So, ideally, what you are looking for is a good quality audio editor that can open AC3 files, uncompress them on the fly (which will take time) using a high quality algorithm (preferably the installed codec on your system), edit them for duration and then save them again in AC3 format (rather than WAV or any other).
Because there are no perfect tools, we tend to compromize using a toolbox of selected and specialized tools good for particular purposes.
Finally, the audio speed conversion is a terribly complex process and unless the editing s/w is not well designed and built, it can cause severe degradation to the audio content.
With CoolEdit PRO, if the original audio is high quality (e.g. not camcorder but DVD level), I convert the audio samples from 16 bit to 32 bit, do the conversion at this resolution and then dither back to 16 bits. If the original audio is high quality, there is an audible difference.The more I learn, the more I come to realize how little it is I know. -
I just don't get your problems. Recently finished doing 20+ hours to PAL-to-NTSC video conversion. The audio never ran out of sync with the video. Ever. Not by a single frame.
Here's the method I use:
Extract the audio to WAV file. (You can use TMPGenc, or Cool Edit Pro, or Sound Forge, or VdubMod.) Extract the video to AVI, using VDubmod with filters: Deinterlace, then Resize with Lancosz3 interpolation from 720 x 576 -> 720 x 480 but keep the 25fps rate, then Save As and choose a good internal codec (I use the Mainconcept DV codec plugin). Even though it's 25 fps the MainConcept DV codec will save as progressive frame NTSC video because it's been resized to NTSC size.
Then encode the resulting AVI using (whatever) MPEG-2 encoder with the WAV file as audio source and the AVI file as video source. Choose NON-INTERLACED instead of BOTTOM FIELD or TOP FIELD and instead of 25 fps pick the NTSC frame rate for video encoding. Also make sure to choose NTSC video format instead of PAL. When the encode is done, you've got an NTSC video file with audio in perfect sync, to the frame.
before encoding you may want to check the length of the WAV file against the AVI file in an editing app like Ulead MSP or Adobe Premiere or Vegas Video to make sure the WAV file length and the AVI file lengths match exactly. Occasionally they're off by 2 or 3 frames, in which case I trim the WAV file by 2 or 3 frames and resave as another WAV file and use that as the audio source.
Then just encode. -
Ah, thanks! I never would have known that DVD Lab was inaccurate with the time. Using a framecount is good advice ... and it's free so I'll take it
So, from what I gather here, altering an audio file to match the new-post-framerate-conversion-video-length should always be done to the audio in WAV form. Furthermore, I should use a percentage value instead of absolute time. Hence, BeSweet's AC3 "framerate conversion" is pretty well useless?
That's fine with me, really. I'm anxious to give this a try. I don't, however, know if GoldWave will convert with the level of accuracy that you specify, Sasi, in terms of percentage (as I recall, there was room for maybe only two digits after the decimal, but I don't have the program in front of me). I do have access to CoolEdit, but I don't know if it's the "pro" version or not.
Assuming I can make this work, there is still a matter regarding AC3 which confuses me: Is it possible, after extracting, say, a 5.1-channel AC3 track to WAV, then performing whatever alterations to the WAV, to then recompress the WAV back to AC3 and retain the same multichannel characteristics? I intuitively think this isn't possible, but most tutorials give me the impression that that's an everyday thing. If it is possible, what BeSweet commands are appropriate (via GUI or command line)?
-abs -
Some things to clear up:
BeSweet framerate conversion for audio is NOT useless, it can be perfectly successful. It depends on the source video if using BeSweet to alter the audio time works or not. When I do DVD PAL to NTSC re-encodes BeSweet has worked perfectly for me everytime. I tend not to use it for high quality conversions though because the sound quality is not the best.
Goldwave will alter the audio to 1/1000th of a second which is more than accurate enough. But you should NOT use a calculated percentage that is not the correct way to do it. Always get the accurate, exact time and time warp in Goldwave to that time. And do not attempt to preserve the pitch that is pointless. If you are converting from PAL to NTSC the time was sped up anyway you will be putting it back to original pitch. And keep in mind that video is expressed down to 1/30th of a second and audio is to 1/1000th. So if your video 01:10:30.15 then your audio will be 01:10:30.500
When you use BeSweet you CAN covert 25fps 5.1 audio to 23.976 5.1 audio. The far better way it to use a quality 5.1 channel encoder like Sony Vegas 4 or 5, but if you don't have Vegas BeSweet will work okay.
Use BeSweet GUI Wizard to do your frame rate change it is much easier until you get the hang of the app. -
Well if it ain't one thing it's another.
Assuming I've encoded my video, what's a good application for checking its length accurately? I can't get it to open in Vegas (it's a *.m2v file). Do I need a plugin or something?
Skynet107, I tried the BeSweet method originally. I used AC3Machine and am fairly sure I did it correctly. I used a tutorial and tried it 2 or 3 times, but the audio just won't sync with the vid.
1) When I originally used BeSweet, I ended up with audio that seemed just a few seconds ahead or behind the video (I forget now which). But I believe it was a constant difference.
2) When I tried adjusting the the precise length manually using TimeWarp in GoldWave, adjusting to the length of the video as detected by DVD Lab (which I now understand is just not accurate), I had an even worse problem of sync that drifted and audio that was as much as 3 or 4 seconds ahead of the video.
If I can't get this licked, I think I'm just going to start over and use a method similar to spectroelectro's:
a) extract the audio as a WAV
b) save the AVI without audio
c) encode both together with CCE/AviSynth
d) run pulldown on the video
e) recompress audio to AC3 (maybe)
I've just got to get a method down pat. I've got loads of PAL AVIs to convert ....
Thanks for all suggestions thus far
-abs -
I use Adobe Encore to get the exact time of the video it is 100% accurate. I am not sure what other methods will also give an ACCURATE time. How about VirtualDubMod have you tried that? I will let you know later on today I am encoding an xvid PAL to NTSC mpeg2 file right now.
Vegas Video does NOT import mpeg2 files at all. At least I have never got it to work. -
VirtualDubMod takes forever to parse the MPEG2 file, and then when it's done and I choose "File Properties" from the menu, the program just closes. Disappears. Weird. Anyway, it took so long to parse the file I didn't want to give it a second try.
I can download a trial of Encore.
Or ... couldn't I frameserve it to VDubMod or to Vegas? Would that give as accurate a reading of the time as opening the file directly? For that matter, can AviSynth parse *.m2v and *.mpv files? Is there a plugin?
-abs -
when trying to convert to ac3 in besweet there is alot of potential for problems. Besweet does not create 100% compliant ac3 files. You can go right from Ac3 to mp2 and do the framerate conversion at the same time in besweet. This mp2 file should play in 99% of all dvd players. This is how I do it and never have any audio sync problems. I just also open the m2v and mp2 files in mediaplayer and check the length. Usually they are a second off or right on and dvdlab does not display the correct lengths as stated.
-
You're right VirtualDubMod crashed the same way for me, it's not just you. Does anyone know of an accurate way to get the time of an mpeg2 DVD compliant video? Every program I try give the WRONG time. (besides Adobe Encore)
I tried DVD2AVI on my m2v file, I brought it into Vegas but the time was reported incorrectly. (about 4 seconds off)
EDIT: I brought my "AVI" file into VirtualDub and the time reported was very close. This is what I have.
Adobe Encore: 1:49:28;05
DVD2AVI+VFAPIConvEN=AVI: 1:49:28;02
so it looks like VirtualDub reports the time very close to Adobe Encore. (1/10th of a second difference) If you use DVD2AVI+ the VFAPI codec you HAVE to set DVD2AVI to FORCED FILM don't forget this step.
Using the time given in Encore I time warped my wave to that time exactly and my audio synced perfectly.
Similar Threads
-
HD 50 fps flv conversion sync Hell
By Arlich in forum Video ConversionReplies: 0Last Post: 11th Jul 2010, 15:01 -
To synchronize 29,970 audio fps for 23.976 fps
By DruidCtba in forum Newbie / General discussionsReplies: 1Last Post: 27th Sep 2009, 12:01 -
60 fps to 30 fps conversion -- It looks terrible
By usps_postal in forum EditingReplies: 6Last Post: 18th Sep 2009, 21:09 -
Sync 29.970 FPS audio to 23.976 FPS video?
By LCO1971 in forum Newbie / General discussionsReplies: 3Last Post: 13th Sep 2008, 15:23 -
Conversion out of Sync, probably cause=FPS?
By Day44 in forum Video ConversionReplies: 2Last Post: 7th Jul 2008, 14:30