Log in

View Full Version : Audio sync, I'm getting p***ed off with this!


owain_thomas
17th April 2002, 23:49
Right, here's my problem:

In fact, before I start, let me say that I've searched the forums many times, and those of VCDHelp.com, all to no avail. Lots of people have similar poblems, but no solutions seem to fix exactly what I need.

So, I've got a load of DivX's downloaded. When I play them with windows media player, they play fine, audio and video in perfect sync, no problem. I have tried numerous methods to convert these files to SVCDs so I can enjoy them on my TV and HT system, but every time I end up with an MPG which the sound is out of sync on. It's something which happens right from the start of the movie and goes right to the end, it doesn't appear to get worse as the film goes along. I have tried using TMPGenc, tried using CCE, and most recently tried using the AVI2SVCD function of DVD2SVCD (a great program BTW), nothing seems to work, the problem is always the same.

This got me thinking, so I tried out the original AVI file on another player (DivX "the playa"), and was quite surprised to find that the audio was actually out of sync on that. I mean, WTF, how can the audio be out of sync on one player and not on another? I checked it with AVInfo, and it seemed fine on that.

I am sure that this is the source of the problem, but am stumped as to a solution.

I am running win XP on an athlon XP 1600+, with 320Mb RAM, Loads of HD space. I have v5 of the DivX codecs (although the AVI files are only v3 or 4). I am using v2.50 of TMPG and 2.50 of CCE.

Has anyone got any ideas? This is making me want to give up, and I don't realy like that feeling. It seems like it should be realy easy to fix, but no joy yet.

When I posted this on VCDhelp, I was told to extract a WAV file for the sound, but I am (obviously) already doing this since DVD2SVCD does it automatically, and it was part of all the tutorials that I had read before about this topic.

Yours hopefully
Owain

Here is my Log file:

--------------------------------------------------------
- 13/04/2002 19:12:41
- AVI to SVCD Conversion
- AVI2SVCD ver. 1.0.8 build 1
--------------------------------------------------------
Initializing
Initializing finished.

--------------------------------------------------------
- 13/04/2002 19:12:45
- Free on drive D: 6187.03 mb
- Free on drive F: 129.28 mb
- AUDIO Extraction
--------------------------------------------------------
Audio extraction finished.

--------------------------------------------------------
- 13/04/2002 19:13:36
- Free on drive D: 6084.19 mb
- Free on drive F: 133.91 mb
- AUDIO conversion
--------------------------------------------------------

Converting MP2 to WAV. Filename: D:\Edonkey Downloads\VCD Work\Extracted_audio_1.mpa
Executing MADPlay (mp2 to wav). Commandline:
"F:\Program Files\DVD2SVCD\MADPlay\madplay.exe" --verbose --output=wave:"D:\Edonkey Downloads\VCD Work\Encoded_audio_1.mp2.wav" "D:\Edonkey Downloads\VCD Work\Extracted_audio_1.mpa"
Conversion (mp2 to wav) of D:\Edonkey Downloads\VCD Work\Extracted_audio_1.mpa finished.


Converting Audio to MP2. Filename: D:\Edonkey Downloads\VCD Work\Extracted_audio_1.mpa
Executing BeSweet. Commandline:
"F:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "D:\Edonkey Downloads\VCD Work\Encoded_audio_1.mp2.wav" -output "D:\EDONKE~2\VCDWOR~1\Encoded_audio_1.mp2" -logfile "D:\EDONKE~2\VCDWOR~1\Encoded_audio_1.log" ) -ota( -g max ) -ssrc( --rate 44100 ) -2lame( -e -b 128 -m s )
Audio conversion of D:\Edonkey Downloads\VCD Work\Extracted_audio_1.mpa finished.

Audio conversion finished.

--------------------------------------------------------
- 13/04/2002 19:39:05
- Free on drive D: 4785.66 mb
- Free on drive F: 133.84 mb
- Video Encoding using TMPGEnc
--------------------------------------------------------
- Encoding F:\Program Files\DVD2SVCD\Movie\AviSynth_Script_file.avs
StreamSectors: 1667869728
AudioSectors: 105981372
VideoPAPO: 24194484
ScanOffsetBytes: 146890
SeqAligningBytes: 9335669
DVDBytes: 0
VideoEndHeader: 8
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 1.00
PureMPEGStream: 1528211304.90
Seconds: 6535.44
CalcMPEGStream: 1528211304.90
Frames: 163211
CDSize: 800.00
Cut point 795.00
Executing TMPGEnc. Commandline:
"F:\Program Files\TMPGEnc 2.50\TMPGEnc.exe" "D:\Edonkey Downloads\VCD Work\Memento\TMPGEnc_Project_file.tpr" /Encode /Close
Video Encoding finished.

--------------------------------------------------------
- 14/04/2002 02:30:04
- Free on drive D: 3373.09 mb
- Free on drive F: 123.36 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: F:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 14/04/2002 02:30:07
- Free on drive D: 3373.09 mb
- Free on drive F: 123.36 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: F:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 14/04/2002 02:30:10
- Free on drive D: 3373.09 mb
- Free on drive F: 123.36 mb
- Multiplexing and cutting
--------------------------------------------------------
Saving bbMPEG settings: F:\Program Files\DVD2SVCD\bbMPEG\default.ini
Offset in Seconds: 2
Executing bbMPEG.
Variable Settings:
Movie offset: 2 seconds
Cut point: 795 mb

Executing RunbbMPEG. Commandline:
"F:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "D:\Edonkey Downloads\VCD Work\Memento\bbMPEG_Muxed_File.mpg"
Length of D:\Edonkey Downloads\VCD Work\Memento\bbMPEG_Muxed_File00.mpg
3269 Seconds
Offset in Seconds: 3271
Executing bbMPEG.
Variable Settings:
Movie offset: 2 seconds
Cut point: 795 mb

Executing RunbbMPEG. Commandline:
"F:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "D:\Edonkey Downloads\VCD Work\Memento\bbMPEG_Muxed_File.mpg"
Multiplexing and cutting finished.

--------------------------------------------------------
- 14/04/2002 02:51:09
- Free on drive D: 1786.06 mb
- Free on drive F: 123.28 mb
- Creating CD-Images using VCDImager
--------------------------------------------------------
Executing VCDImager. Commandline:
"F:\Program Files\DVD2SVCD\VCDImager\VCDImager.exe" --type=svcd --add-dir=SEGMENT --cue-file="D:\Edonkey Downloads\VCD Work\Memento\CD_Image_File_CD1.cue" --bin-file="D:\Edonkey Downloads\VCD Work\Memento\CD_Image_File_CD1.bin" --iso-volume-label=SVCD1 --progress "D:\Edonkey Downloads\VCD Work\Memento\bbMPEG_Muxed_File00.mpg"
--------------------------------------------------------
- 14/04/2002 02:57:21
- Free on drive D: 980.31 mb
- Free on drive F: 123.28 mb
- Creating CD-Images using VCDImager
--------------------------------------------------------
Executing VCDImager. Commandline:
"F:\Program Files\DVD2SVCD\VCDImager\VCDImager.exe" --type=svcd --add-dir=SEGMENT --cue-file="D:\Edonkey Downloads\VCD Work\Memento\CD_Image_File_CD2.cue" --bin-file="D:\Edonkey Downloads\VCD Work\Memento\CD_Image_File_CD2.bin" --iso-volume-label=SVCD2 --progress "D:\Edonkey Downloads\VCD Work\Memento\bbMPEG_Muxed_File01.mpg"
CD-Image creation finished.

--------------------------------------------------------
- 14/04/2002 03:03:14
- Free on drive D: 177.44 mb
- Free on drive F: 123.23 mb
- SVCD Creation finished!
--------------------------------------------------------

mrbass
18th April 2002, 00:53
you mentioned you wanted to give up. If I were you I'd do that and get the dvd for that divx movie instead. Problem solved.

anyway just to make sure when using AVI2SVCD you did check the convert divx3 to divx4 correct?

owain_thomas
18th April 2002, 08:17
you mentioned you wanted to give up. If I were you I'd do that and get the dvd for that divx movie instead. Problem solved.

LOL! I think it might well be easier to do that.

I didn't know that I had to do that conversion (divx3 to 4), why is that? If its to do with CCE (as It says next to the checkbox on DVD2SVCD) then that shouldn't be a problem as I've been using TMPG with DVD2SVCD. Also, the option to convert from 3 to 4 is greyed out on my version of DVD2SVCD, is this because I'm not using CCE?

cheers,
Owain

anarco
18th April 2002, 16:56
on the computer or your DVD-Standalone ?

donīt get mad if windows applications get out
of sync playing videos

mediaplayer, elecard and sasami did
it a lot of times to me...
the only one reliable seems to be winDVD

owain_thomas
18th April 2002, 21:38
it's on both it seems. I've been reluctant to burn all the latest conversions I've done as I don't want to keep on making coasters, and they're too big to fit onto the CDRWs I've got. The first efforts I made though had the same problems on both the stand alone and the PC players.

:mad:

Owain

markrb
18th April 2002, 22:01
How are they too big? They are 806mb's each. This is the correct size for an 80 minute CDR disc.
Have you tried burning using the FoolProof way? Read the sticky.
Have you tried using VCDEasy?
Have you tried using CDRWIN?

Mark

owain_thomas
18th April 2002, 23:14
They are too big to fit on the CDRWs that I have. I have only got 650Mb re-writeables, so they don't fit.

I can burn them to CDRs no problems, in fact compared to what I've read from a lot of people this has been remarkably straightforward for me... I just have sync problems.

I'm not going to make coaster after coaster when I can see that the problem is the same each time. I suppose that I could go out and buy some rewriteable 80min discs, but to be honest I don't feel the problem is to do with the player on my computer since it happens with every player I have, and has happened on the previous occasions when I've burnt the files to play on my stand alone.

Owain

Labersack
19th April 2002, 00:45
If you only got 74CDRW try burning them anyway. It will fail at over 90%, but the disc is playing in a standalone. Some (very few) burner can be damaged by doing so, if you want to be on the safe side, just kill your burning-prg at 90% with TaskManager.
Of course you can only watch the first 90% of the disc, but that's enough to check for sync-problems.

owain_thomas
19th April 2002, 01:19
I am grateful to everyone who's replied so far, but please believe me the problem I am experiencing is not to do with software players, it happens on my stand alone as well. I don't want to get into a big discussion about how to do tests on CDRWs and things like that, because I am positive that this problem is carried over to the stand alone. I know this because I have tried three different films on it and all have had exactly the same problem.

I have been playing about with BBmpeg on its own, and have used the mp2 audio file and the mpv video file that AVI2SVCD created for me. I have found that by setting a different delay I can get the audio to sync up, this delay is around 0.54 of a second (i.e. I make the audio 0.54 sec later and it all ties in). This leaves me with two questions:

1) How do I do this automatically within AVI2SVCD? I have seen the option to change the "Movie offset" on the bbmpeg tab, is this the place to do it? If so should I just set it to 2.54 instead of 2? or should it be 1.46? Or something else altogether?

2) Does anyone have any idea why the films that I've got have developed this 0.54 second delay? They are from various differnt sources, and it all seems a bit strange to me.

Cheers
Owain

PS this delay is not exactly 0.54 of a second, that's just the nearest I've come by trial and error with bbmpeg. It is pretty watchable like that, just not spot on exactly.

markrb
19th April 2002, 01:43
If on the misc tab you change the DVD2SVCD level from normal to advanced a new option becomes available on the bbmpeg tab. It's advanced settings. Here you can adjust your delays. They are in miliseconds.
I never mess with this myself so I only know it's there, not the correct settings.

Mark

gerti67
19th April 2002, 02:18
Hi owain_thomas,

so tell us what's the model of your standalone then - might help as I personally own a Toshiba 210-E that also has a 0.5 sec delay when playing a SVCD (there's a big thread in here about that) - and adjusting the delays in bbMPEG tab was the only solution for me to get video and audio in sync.

But now with the new 1.0.8 version of D2S you could also try to use the advanced settings of bbMPEG and try to set the program stream type to "~DVD" - this solved all issues for me and the files play perfect with the software players and on my standalone.

Bad thing is that it seems this does not work on all standalones as a friend did some testing for me and his Grundig GDV-130 played these muxed files out of sync then when they were perfect with the default settings before - I will test a Philips model this weekend with the "~DVD" stream settings.

Greetings,
Gerti

owain_thomas
19th April 2002, 08:37
I have a Sony DVP NS900. Thanks for the tip about using the ~DVD option, but unfortuanetly it gives the same results as using the SVCD option, about a 0.5 sec delay.

I don't think this problem is restricted to my particular type of stand alone, either, since the file is out of sync by exactly the same amount on every software player as well as my stand alone. This (to me) suggests that the multiplexed file itself is out of sync.

The other thing that concerns me is that the AVI file seems out of sync on some of my software players, even before I start encoding, I can't really explain this. But since the sync problem is the same (i.e. a permanent ~0.5 sec delay in the video stream, no change through the film) in the original AVI as it is in the encoded SVCDs, I feel that there is a reason for it in there somewhere, no?

I mean why does WMP get the sync right, but The PLAYA not? Surely the problem is that whatever is making the PLAYA see it as out of sync is also causing the encoding software to do the same?

Owain

dvd2svcd
19th April 2002, 09:27
You could try to load the AVI into VirtualDUB, select DirectStreamCopy for both audio and video and save the avi with a new name. Then try the new AVI in Playa, if that is in sync then I think dvd2svcd should be able to sync it too. I have successfully used the above method with some hardcase AVI files.

owain_thomas
19th April 2002, 18:06
right, tried that, didn't fix the problem, the sync is just the same, audio ~0.5 sec before the video. This is weird.

thanks for the patience, though:)

owain

Midnight Tboy
18th April 2003, 14:16
hiya,

I noticed from your log that you're converting Memento

assuming its the same old 1cd version I had from eons ago then I had that problem and sorted it, was pretty simple really and applies to lots of films where sound is out of sync. and if I remember rightly it didn't drift further and further out of sync, but was about the same all way through

for this method, where its out of sync the same amount throughout,

load up dvd2svcd

misc | recover | load the d2s file

change in the box so it says you're about to continue at the muxing and cutting stage again

go to the bbMPEG tab, click (bbMPEG Output Settings)

there the default delays for audio 1 and video 1 should both be 180 by default (dont need to worry about video 2)

if your audio is coming before the mouth moves etc, then increase the value for the audio delay. I found its best to move up in 100 or 200ms increments. if its noticably out then go up by about 200ms, (so in other words video is 180, but add 200 to the audio1, making it 380), if it seems the tiniest of fractions out then an extra 100ms does the trick nicely.

if the mouths move before the audio, then do the same but adding to the video delay instead.

then close that box, and go back to MISC then continue to let it remux the file (stop it from making the bin and cue files for now if wanted)

replay your mpg files and see how it looks, if it is still slightly out, then go back, recover, and increase that value again to 480 or 580 etc. or if it looks like you've gone too far then drop it back a 100ms or so, eventually it will fit.

from what I recall, tho I'm only guessing, memento was about 4 or 500ms out, but was def fixable, so maybe try 580 or 680 in the delay tab.

the worse case of constantly out of sync audio I've seen was collateral damage which was a ridiculous 7seconds out.

hope you get that working.

Oh yes, and importantly, before you start your next film encoding in dvd2svcd later, dont forget to go back into that bbmpeg setting in dvd2svcd, and set them values back to 180.

to cover the other type of audio problem...when it starts in sync but drifts out of sync, I found the perfect way that 99% of the time fixes the issues. Usually its because the framerate for the video does not match the framerate for the audio, or that they're both a nonstand fps (ie 23.976, 25, or 29.970). You can usually find that out, if you load up virtualdub, load your avi up, then click Video | Frame Rate. the first line, where it says "No change" shows the current fps of the video itself, the 3rd line where it says "change so audio and video durations match" it shows the fps of the audio itself" if those 2 fps's are different then its more than likely a drift will occur. dont change anything in there tho, just quit it (and use nandub if its a vbr audio else you'll get a ridiculous number for the audio fps

to solve the async'ing for those titles, what I would do is :-

let the film encode as normal in dvd2svcd, so u have your messed up mpg files etc

quit dvd2svcd

load up vdub (or nandub)

load the avi

click Audio | Full Processing Mode

click Audio | Conversion

choose 48khz, high quality, 16bit, stereo (or 44100khz if thats what you want to encode it as)

click File | save wav (give it a name like tmp.wav)

close vdub

load up tmpgenc (yes I know we prefer CCE but tmpgenc solves problem in this case

click File | New Project to make sure its been reset

for audio source, click Browse, then load your new tmp.wav file

click on settings, then set it to the same values you had on your dvd2svcd setting, ie whether its 192, 48khz, or 224 44khz etc.

then start it, might take 15mins ish

you should have a brand new mp2 file.

close tmpgenc

cut the new mp2 file you have, and paste it into the folder that dvd2svcd has been making the film in

there should be an old file called Encoded_audio_1.mp2. delete that old file.

rename your new mp2 file to the same name Encoded_audio_1.mp2

reload dvd2svcd

misc | recover (load d2s file)

choose to resume from muxing and cutting

continue

and hey presto, you should have a resynced audio that doesnt drift further and further out (if its still slightly out of sync all way through then dont forget you can still remux again changing them bbmpeg delays to make it line up)



good luck

Abond
18th April 2003, 16:19
Woah! The reply comes after 1 year...

Midnight Tboy
18th April 2003, 22:18
lol

never checked the dates, saw it when was hunting for solution for this unable to close avi file message thing annoying pausing problem in cce on some avis


wonder if gottit sorted then :P

mnlgw001
18th April 2003, 23:18
I've had all sorts of problems with out of sync AVI files, Memento and Collateral Damage were two particularly memorable ones. Iv'e just fixed Notting Hill which drifted by 300ms towards the end but was ok at the beginning. This reminded me that I have been meaning to post an alternative method of fixing the problem.

I use DVD2SVCD / CCE to automatically produce DVD compatible output audio and video files, then use IfoEdit to Author the DVD, and Prassi Primo to burn it.

DVD2SVCD uses BeSweet to process the audio files, but I have found that BeSweet generates errors when the input frame rate is non-standard. To overcome this problem, I tried leaving/changing the video framerate as standard and noting the total length using GSpot. I then loaded the audio WAV file (extracted from AVI using VirtualDub) into CoolEditPRO and used the Effects>Time/Pitch>Stretch command (resampling, preserving neither pitch nor tempo) to adjust the overall audio length to the GSpot Total (Converted to Seconds). VirtualDub was then used to produce a new AVI with this stretched WAV file as the input audio. Surprise - surprise, it synced perfectly, with no noticable effects of the stretching. I realise that not everyone has access to CoolEditPRO, but I'm sure that other audio editing programs will be equally suitable.

I have used this method to re-sync at least a dozen movies (NTSC and PAL)and I am pleased with the results and simplicity.

Note that VirtualDub can also be used for constant sync errors by simply adjusting the figure in Audio>Interleaving>Audio Skew Correction and watching for lip synchonisation.