digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   Xvid audio sync issues? (http://www.digitalfaq.com/archives/encode/6894-xvid-audio-sync.html)

J-Wo 11-27-2003 11:31 AM

Xvid audio sync issues?
 
Hey guys. I have a couple xvid's with vbr mp3 audio which play fine in all media players (WMP, zoomplayer) but are out of sync when I load them in VirtualDub or try to encode. I'm wondering if it might be some kind of video or audio codec problem... I know vdub doesn't use ffdshow filters so I have nic's xvid codec installed -- maybe that's where the audio skew is coming from? If I load the file in vdubmod, it asks if I want to rewrite the audio header (because it's vbr). If I say no, then vdubmod can't play the file (says ACM reported error on audio decompress). If I say yes, then the audio is out of sync. So maybe it's an mp3 audio codec issue?

I've also tried loading the avi with a basic avs script, something like the following:
Code:

avisource("source_file.avi")
trim(0,0)
ensurevbrmp3sync()

but that didn't solve the problem either. I'd appreciate any help you guys can give! Thanks

Abond 11-27-2003 11:39 AM

Say No to VDubMod and Direct Steam to a new file. Then try with the new one.

Dialhot 11-27-2003 11:45 AM

Re: xvid audio sync issues
 
Quote:

Originally Posted by J-Wo
If I say no, then vdubmod can't play the file

It can't play but it can still extract the audio in an uncompressed wav (or demux in mpa). And taht is all what we ask to it !

So as Abond said, answer "no" and just extract the wav.

J-Wo 11-27-2003 12:16 PM

okay so I wanted to start off fresh so I uninstalled all my video codecs and went into device manager to delete the Fraunhofer mp3 audio codec. Then I installed nic's xvid codec, and oddly enough that was all my system needed to play the file in my media players. But as I expected, if I openned the file up in vdub/vdubmod, it didn't recognize the audio stream so it couldn't uncompress it. So I installed MP3CodecPro1263.zip from codec-download.com. now vdub could uncompress the audio, but vdubmod could not (it gives the same error "ACM reported error on audio decompress").

Anyway I went ahead and converted my WAV to MP2 using headache. Then I tried both CCE and tmpgenc to encode a small clip, muxed, but the resulting file is STILL OUT OF SYNC, just like how it plays in vdub.

This is why I suspect I have some kind of codec misconfiguration. I'm pretty certain if the file plays out of sync in vdub, then your final encode will be also. Has anyone else noticed this? Any other thoughts? I'm going to try fooling around with some other mp3 codecs to see if that fixes it...

Dialhot 11-27-2003 12:21 PM

Quote:

Originally Posted by J-Wo
I'm pretty certain if the file plays out of sync in vdub, then your final encode will be also. Has anyone else noticed this? Any other thoughts? I'm going to try fooling around with some other mp3 codecs to see if that fixes it...

Vdub and Vdubmod can't play VBR MP3 in synch ! That is why they offer to rewrite the header of the file when you load them.

But I do not understand something in your post : you tell you can't play the file in vdub. Why "play" ? I just tell you to "load" the file and to extract the audio (demux it if you can do a direct copy). Even that is not possible ?

J-Wo 11-27-2003 12:32 PM

Quote:

Originally Posted by Dialhot
Vdub and Vdubmod can't play VBR MP3 in synch ! That is why they offer to rewrite the header of the file when you load them.

Hmmm, I see...

Quote:

Originally Posted by Dialhot
But I do not understand something in your post : you tell you can't play the file in vdub. Why "play" ? I just tell you to "load" the file and to extract the audio (demux it if you can do a direct copy). Even that is not possible ?

Ya, I was using the Play Input buttom (bottom left, next to stop). I did demux the audio to wav (I could only do this in vdub, not vdubmod because the latter gave an acm uncompress error). I then converted wav to mp2 using headache, and encoded a small clip in CCE and tmpgenc. When I muxed the two together, my audio was out of sync! It played the same way as when I Play Input in vdub. So I know something is going wrong in my system...

I'm going to try the cardinal sin right now--install some codec packs!

Boulder 11-27-2003 01:11 PM

If you use EnsureVBRMP3Sync(), you'll have to use it before any trimming!

Code:

avisource("source_file.avi")
ensurevbrmp3sync()
trim(0,0)


J-Wo 11-27-2003 01:52 PM

Quote:

Originally Posted by Boulder
If you use EnsureVBRMP3Sync(), you'll have to use it before any trimming!
Code:

avisource("source_file.avi")
ensurevbrmp3sync()
trim(0,0)


I tried that, but it still didn't work... i.e. the file was out of sync when played with vdub, as well as when I decompress the audio, convert to mp2, and mux it with my encoded video.

Starting to pull my hair out!

Dialhot 11-27-2003 02:09 PM

Is the "out of synch" constant or growing while you play the video ?

If it is constant, then you have to use the "delay" feature (that you can find either in vdub, besweet or headac3che).

J-Wo 11-27-2003 02:31 PM

the sync appears to be constant throughout the movie... so I'm fooling around with setting an audio delay with virtualdub. The annoying thing is that it's totally trial and error... I just don't get why vdub can't tell what delay to put automatically since the file plays fine in my media players. So in vdub I'm fiddling with the "Audio skew correction" to delay the audio track. But above it, "Audio/video interleaving" is turned on and "Audio block placement" is set to preload 500ms of audio before video starts. Does this mean anything? Should I turn it off?

After a bit of searching in the newsgroups, I read many people had audio sync problems with vbr mp3 audio extracted thru vdub. So someone mentioned a program called EO Video (www.eo-video.com), so I gave it a whirl and yes it does extract the audio perfectly with no sync issues. Problem is it is verrrrrrrry slowwwwww at extracting!

Boulder 11-28-2003 06:49 AM

One possible way is to load the video clip in the latest VirtualDubMod, choose not to overwrite the header and demux the audio into an MP3 file and then encode this file straight to MP2 or use MADPlay to do MP3->WAV and then to MP2.

Dialhot 11-28-2003 07:24 AM

Quote:

Originally Posted by Boulder
One possible way is to load the video clip in the latest VirtualDubMod, choose not to overwrite the header and demux the audio into an MP3 file and then encode this file straight to MP2 or use MADPlay to do MP3->WAV and then to MP2.

That's exactly what Abond and I already said :-)

Boulder 11-28-2003 11:32 AM

Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by Boulder
One possible way is to load the video clip in the latest VirtualDubMod, choose not to overwrite the header and demux the audio into an MP3 file and then encode this file straight to MP2 or use MADPlay to do MP3->WAV and then to MP2.

That's exactly what Abond and I already said :-)

Yes, I see it now. I got all mixed up trying to see what had already been done :oops: What really puzzled me was that he was unable to demux the audio track to an MP3 file (or an MP3 file with a RIFF-WAV header) in VDubMod.

J-Wo 11-29-2003 11:14 AM

okay here is the problem. As stated earlier, I am NOT able to demux the file to mp3 with vdubmod, I keep getting an acm error. However I can in vdub. But here's the problem! When I play my movie in a media player, I notice that there is about a second or so silence at the beginning and THEN the audio starts, keeping it in sync. But whenever I extract the audio (be it in WAV or MP3), there is no such silence at the beginning. That is why my audio always ends up out of sync.

As I mentioned, the only way I've been able to solve this is use a program called EO Video to extract the audio to WAV format, preserving this delay. However this program seems to extract in real time, so the process takes almost an hour!

any other ideas guys? Thanks!

Jellygoose 11-29-2003 01:03 PM

I used to have this problem all the time... Why don't you just Add the audio delay manually, by counting the silence at the beginning?
I know you're not satisfied with this, but you can still use EO-video...

BtW: How do you know it's working when you don't want to wait until it's done? :roll:

Abond 11-30-2003 07:24 AM

Hi, J-Wo,
Maybe I was not clear (sure!) in my post, but the suggestion I gave there is not to demux. It is to load your file, to select Direct Stream Copy for audio and video and to resave the whole thing to a new .avi file. Then to try with this new .avi to demux with VDubMod, maybe even it is not bad idea to use Nandub. Some problems of this type (rare) can be cured simply with resaving the file.

Dialhot 11-30-2003 09:11 AM

Quote:

Originally Posted by Abond
maybe even it is not bad idea to use Nandub. Some problems of this type (rare) can be cured simply with resaving the file.

That's right. But rewriting all the avi or simply the audio part (in other word : to demux) will lead to the same result.

J-Wo 12-01-2003 05:02 PM

I have discovered part of my problem. After some investigation, I learned that the xvid files I am using have seem to make use of an interleaved audio delay. Rather than fixing the delay, the original encoders just set the audio to start some milliseconds after the video. So for one of my files, loading my file through vdub eliminates this delay, thus the audio plays before the video. Adding a 1000 ms delay solved the problem. However this is totally trial and error, which is my one big gripe. Is there any way to detect what this interleaved audio delay SHOULD be?

Boulder 12-02-2003 03:57 AM

You could try GSpot, it may be able to tell the interleaving.

J-Wo 12-02-2003 11:08 AM

I gave it a shot but couldn't see any of that information... do you know where I should be looking in gspot for that?


All times are GMT -5. The time now is 02:03 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.