Quantcast Xvid Audio Sync Issues? - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Video Encoding and Conversion

Reply
 
LinkBack Thread Tools
  #1  
11-27-2003, 11:31 AM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
11-27-2003, 11:39 AM
Abond Abond is offline
Free Member
 
Join Date: Mar 2003
Posts: 243
Thanks: 0
Thanked 0 Times in 0 Posts
Say No to VDubMod and Direct Steam to a new file. Then try with the new one.
Reply With Quote
  #3  
11-27-2003, 11:45 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #4  
11-27-2003, 12:16 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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...
Reply With Quote
  #5  
11-27-2003, 12:21 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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 ?
Reply With Quote
  #6  
11-27-2003, 12:32 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote
  #7  
11-27-2003, 01:11 PM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
If you use EnsureVBRMP3Sync(), you'll have to use it before any trimming!

Code:
avisource("source_file.avi") 
ensurevbrmp3sync()
trim(0,0)
Reply With Quote
  #8  
11-27-2003, 01:52 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote
  #9  
11-27-2003, 02:09 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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).
Reply With Quote
  #10  
11-27-2003, 02:31 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote
  #11  
11-28-2003, 06:49 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #12  
11-28-2003, 07:24 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #13  
11-28-2003, 11:32 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
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 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.
Reply With Quote
  #14  
11-29-2003, 11:14 AM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Reply With Quote
  #15  
11-29-2003, 01:03 PM
Jellygoose Jellygoose is offline
Free Member
 
Join Date: Jun 2002
Location: Germany
Posts: 1,288
Thanks: 0
Thanked 0 Times in 0 Posts
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?
__________________
j3llyG0053
Reply With Quote
  #16  
11-30-2003, 07:24 AM
Abond Abond is offline
Free Member
 
Join Date: Mar 2003
Posts: 243
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #17  
11-30-2003, 09:11 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #18  
12-01-2003, 05:02 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
  #19  
12-02-2003, 03:57 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
You could try GSpot, it may be able to tell the interleaving.
Reply With Quote
  #20  
12-02-2003, 11:08 AM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Made a KVCD 352x240, had to pulldown, but audio sync issues? sparskter Video Encoding and Conversion 3 07-09-2005 03:46 PM
Hauppauge PVR-250 Audio Sync Issues dooger2 Video Capturing / Recording 3 02-10-2004 05:55 PM
XvId audio Out of sync? EnNiS Video Encoding and Conversion 0 07-09-2003 01:42 PM
KVCD Audio Issues - audio is out of sync? Jellygoose Video Encoding and Conversion 7 05-26-2003 05:59 PM
KVCD has gradual audio sync issues? jezztek Video Encoding and Conversion 6 09-06-2002 04:33 AM




 
All times are GMT -5. The time now is 08:16 PM  —  vBulletin © Jelsoft Enterprises Ltd