View Full Version : XVID to SVCD out of Sync sound


mrhotdoguk
26th March 2003, 22:33
Hi Guys,

I have an issue with XVID AVI files where when converted the sound is out of sync. Everything looks fine when I have completed the DVD2SVCD process.

Also it seems to be only XVIDS with the Fraunhofer IIS MPeg layer-3 Codec that I am having issues with.

I have also tried extracting the audio in Virtual Dub in Full Processing mode but I get the same issue.

Any help is appreciated

djidjo
31st March 2003, 11:40
1. Demux your out-of-synch MPG file (with the TMPGEnc MPEG tools, for example)
2. Remultiplex a small part with much speech (to check audio synch) with BBMpeg, playing with the audio and video delay tabs.
3. Repeat this until you find the correct delay for audio synch.
4. Re-multiplex your entire movie with the correct delay.

Hope it helps !
Djidjo

thebigcheese
31st March 2003, 13:06
I have a similar error.

It's actually NOTHING to do with the Mpeg encoding. It's the VBR MP3 and Xvid that's the problem.

Load the xvid into VirtualDubMod and save audio as wav.
Then compare the running times of both - and you will find that the audio looks like 1 second short. So audio is out before any encoding is actually done.

Delaying audio start in these files may not always fix the error.
I am still looking at why/how to solve this but I am fairly unfamiliar with VBR MP3 audio - so I am trying to find the best method to extract the audio out and convert it to wav without breaking sync.

Once the ORIGINAL avi is fixed (with PCM audio) - then the svcd conversion will work 100%.

madplay, besweet, lame, vdub etc etc all perpetuate this error. I have downloaded a trial of goldwave to see if I can identify anything.

MP3/xvid peeps please feel free to jump in.

Another thread with same problem:
http://forum.doom9.org/showthread.php?

htc10825
31st March 2003, 19:59
It is very often that the divx/xvid files from Donkey/KaZaA etc. are corrupt, that is, the files contain bad frames(in video and in audio). This is due to a server crash (sometimes also a 1st-level client crash) or incorrect data transfer. Though such files can be played bach with A/V syncron, but a recompression without extra synchronisation is not possible.

1st: extract the (VBR)audio to wave, see my guide in:
http://forum.doom9.org/showthread.php?s=&threadid=49335
2nd: compare the length of the audio and video files, if different, you have to do the following work to get them re-synchron.
3rd: see my step-by-step guide in:
http://forum.doom9.org/showthread.php?s=&threadid=43037

mrhotdoguk
31st March 2003, 20:09
Guys,

Checked the extracted audio and xvid files in Windows Media Player 9 and both are the same length.

thebigcheese
1st April 2003, 07:17
mrhotdoguk:
Are you saying that all of a sudden you don't have this problem anymore ?

htc10825
1st April 2003, 13:44
Checked the extracted audio and xvid files in Windows Media Player 9 and both are the same length.1st: this statement is only a repeat(of some others).
2nd: While extracting the wave with VDub you can read the length of the video in Vdub. It is not necessary to load the xvid or so into WMP. Only the wave file, WinAmp x.xx is enough.

mrhotdoguk
1st April 2003, 20:33
htc10825

Checj vid in VDub and Audio in WMP and both are the exact length...

htc10825
2nd April 2003, 15:17
1. check the the properties of your extracted wave file, according to:
http://forum.doom9.org/showthread.php?s=&threadid=49335
2. post results here, together with the "file/file info"-box of VDub

mrhotdoguk
2nd April 2003, 18:25
htc10825


Can I post attachments on the site or does it have to be text.

mrhotdoguk
3rd April 2003, 06:57
htc10825,

In WinAmp the Wav file is 108:48 mins
In VDub the movie is 1:48:51

So ther looks like a 2 second difference.

htc10825
4th April 2003, 19:17
So you should find the first syncron point, then first asyncron point, then next asyncron point...
http://forum.doom9.org/showthread.php?s=&threadid=43037

Thermopyle
21st April 2003, 00:10
xvid to svcd is exactly what I was trying to do when I discovered how to encode vbr mp3 soundtracks to svcd.

Go here: http://forum.doom9.org/showthread.php?s=&threadid=51496

htc10825
22nd April 2003, 12:44
The Problem is the avi files contain defect/bad/invalid audio frames(due to internet data transfering), the VDub will skip these frames and append the first valid following frame direct follow the last valid frame. So in such case the audio is allways shoter than the video.

Your method has been discussed many years ago in div. forum, the Doom9's Guide about it also 3 years. Plz read the whole thread carefully and then post.

Thermopyle
23rd April 2003, 00:16
Originally posted by htc10825
The Problem is the avi files contain defect/bad/invalid audio frames(due to internet data transfering), the VDub will skip these frames and append the first valid following frame direct follow the last valid frame. So in such case the audio is allways shoter than the video.

Your method has been discussed many years ago in div. forum, the Doom9's Guide about it also 3 years. Plz read the whole thread carefully and then post.

Right. Just becuase you say that is the problem he's having doesn't automatically make it so. Unless you are the omniscient god of video encoding.

No where is it confirmed that the problem is bad audio frames. You say that it is the problem multiple times, yet your solutions don't seem to solve his problem.

I have had his EXACT symptoms multiple times and this has solved every instance. Most of those instances were downloaded from emule.

I'm not saying that what you say isn't the problem he's having, but I see no evidence that your diagnosis of the problem is more accurate then mine.

Regardless if someone has used this method before, does not make it any less valid of a solution.

thebigcheese
23rd April 2003, 13:52
thermopyle:

That is the best way to encode MP3 to SVCD.
The problem we are discussing here are the few (out of 50+ movies I've only experienced th eproblem on 2)

Using Vdub/VDubMod/NanDub to convert to WAV results in a wave shorter than the expected length. 99% of the time this will not occur, but on some MP3 VBR tracks, where there is a lack (i.e none) of sound, it gets encoded as 0K/sec.

This 0K/sec gets skipped on the conversion to Wave. That's why the only method is a manual one to identify these "pauses" and moving the audio correctly. What I'm after is if anyone knows an easier, less manual process.

And please, be nice - we're all friendly here :D

AceOvArts
23rd April 2003, 16:27
There is a little tool that comes with AVI2VCD called decompress that will decompress your audio to uncompressed PCM and write out an avi file with the decompressed audio muxed, this can then be used to convert to svcd. Ive had 100% sucess rate using this method, although now, after reinstalling my system and codecs I never get out of sync audio. So I guess its a codec problem.

Thermopyle
24th April 2003, 02:58
I just tested 10 episodes of different shows I downloaded that were encoded in xvid with a vbr sound track.

When I extracted the wav file with both vdub and nandub the wav was shorter by 2-5 seconds. In fact, I can't recall a VBR soundtrack that I've ever extracted that was the same length as the video. To test my theory I took both some DV that I filmed and some material sourced from a DVD and encoded it into divx with a vbr sound track. Each of those clips, when I used vdub and nandub to extract the audio into a wav file, ended up with a wav file several seconds shorter than the video.

In every one of those instances following the method I discovered (yes I know others have done it before) eliminated out of sync audio.

And, I am nice, but it angered me that htc10825 just assumed that I hadn't read the thread. I had read the thread, and no where is it determined that bad frames are the cause, nor is it confirmed that his way will fix the problem.

Also, the original poster's text implies that he has the problem on many xvid files: "I have an issue with XVID AVI files", "it seems to be only XVIDS with the Fraunhofer IIS MPeg layer-3 Codec".....

htc10825
24th April 2003, 21:48
1. your method to extract the vbr-audio to wave is wellknow and definitively not new. Even in this thread I've ref. to my posts in other threads to descreib the procedure. Other member in this thread, i.g. thebigcheese, has tested it before, but with no success.

2. The "un-recoverable short of time" of the audio after extract/convert to wave file is definitive due to bad frames, as I in the eraly posts of this thread pointed out. And nobody has said that's not true. I've dowloaded many Harry Potter 2 Xvid avi files in Jan.2003 and the difference between video and extracted audio was 18 - 20 seconds.

3. Now you've said that the audio of your avi after extrtacting to wave was 2-3 sec. shorter, but you said also after remux the A/V the avi file get perfect synchron... how do you explain it?
For experet it is very easy to explain this if the original avi is OK, i.e. not contain bad frames. But for avi with bad frames there is no explaination. Can you?

thebigcheese
25th April 2003, 06:58
Thermopyle: I wasn't directing at you specifically. Sorry if I angered you or upset yuo. ANYONE that gets angry will bring down the tone of the forum, and let me tell you, this place is full of the friendliest people on the internet, and damn we do appreciate ANY help :D.

The method you describe is what I have used as a default over the last few years. Hence my surprise when out of the blue a movie (I think it was Tuck Everlasting) was out of sync. As the downloads were .rar files, I cannot blame it on server errors or download.

AceOvArts: thanks for the tip - gonna give it a shot.

Also I assume (I do not know for certain) it's a problem with a newer Xvid codec as this is the first I have seen this, and it's only been movies encoded with xvid.

I have also discovered that if you use nandub/virtualdubmod etc to cut off beginning and end of the movie (credits and title screen) that it fixes the majority of the errors.

these 3 seperate parts can then have audio saved seperately, reloaded back into their avis and joined.
Then re-save wave again and about 90% of the problems go away (I assume the titles and very beginning have a large number of "empty" audio.