Log in

View Full Version : Audio / Video sync issue - I'm all out of ideas...


WhipHubley
12th July 2004, 00:28
Hi there, I hope someone can help me with this issue I'm having. It's driving me nuts, and I just can't work it out!

I've got an AVI file that's mp42 video 29.97 FPS and MP3 audio 96 kb/s CBR 48000 Hz, that I want to convert to DVD. But after running it through AVI2DVD I find that the audio is ahead of the video by about a second, and this gap ever so slightly increases as the film goes on. By the end it's about two seconds ahead.

So the first thing I did was to run the AVI through VirtualDub and convert the audio to PCM, 16 bit, high quality (as advised in one of the stickies) which had always helped me before with issues such as this. Unfortunately, it had no effect this time. The same audio / video sync issue occured when ran through AVI2DVD.

I then decided to check the file lengths of the Encoded_Video_CCE_NTSC.mpv and Encoded_audio_1.mp2 files. I found that they were both the same length. So I then used TMPGEnc to mux those two files together manually - which resulted in the same audio / video sync issue as above. This (I think) rules out any problems with bbMPEG muxing the files together - something is going wrong before this point.

So I then thought I'd try and rule out the audio conversion by bringing together the Encoded_Video_CCE_NTSC.mpv and the Extracted_audio_1.wav file in TMPGEnc DVD Author. All I'm doing now is muxing the MPEG2 video file with the original extracted audio - surely they would mux together perfectly this time! But no - still the same audio / video sync issue.

This leads me to believe that something strange has happened when converting the video from mp42 to MPEG2. An important factor is that this is the first time I have had to amend the AVISYNTH.INI file so that it would accept the mp42 video. I needed to change the AVIReader to DirectShowSource as recommended by Nick. This indeed worked fine, but I'm wondering if it may have had some effect? I could of course be barking up the wrong tree, though.

That's the background, now's here's the log file. I really hope someone can spot something or advise on a course of action, as I'm all out of ideas on how to solve this one. Thanks very much in advance.

WNASPI32.DLL 4.6.0.1021
--------------------------------------------------------
- 11/07/2004 22:20:12
- AVI to SVCD Conversion
- AVI2DVD ver. 1.2.2 build 1
--------------------------------------------------------
Initializing
- D:\Captures&Rips\movie.avi
Initializing finished.

--------------------------------------------------------
- 11/07/2004 22:20:14
- Free on drive D: 16934.33 mb
- AUDIO Extraction
--------------------------------------------------------
Audio extraction finished.

--------------------------------------------------------
- 11/07/2004 22:22:03
- Free on drive D: 16013.15 mb
- AUDIO conversion
--------------------------------------------------------

Encoding Audio. Filename: D:\Captures&Rips\conversion\Extracted_audio_1.wav
Executing BeSweet. Commandline:
"C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "D:\Captures&Rips\conversion\Extracted_audio_1.wav" -output "D:\CAPTUR~1\CONVER~1\Encoded_audio_1.mp2" -logfile "D:\CAPTUR~1\CONVER~1\Encoded_audio_1.log" ) -ota( -g max ) -shibatch( --rate 48000 ) -2lame( -e -b 224 -m s )
Audio conversion of D:\Captures&Rips\conversion\Extracted_audio_1.wav finished.

Audio conversion finished.

--------------------------------------------------------
- 11/07/2004 22:25:24
- Free on drive D: 15878.80 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------

Executing Cinema Craft Encoder.
StreamSectors: 4546875788
AudioSectors: 142914380
VideoPAPO: 68219712
ScanOffsetBytes: 226167
SeqAligningBytes: 14374169
DVDBytes: 0
VideoEndHeader: 4
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 0.00
PureMPEGStream: 4321141355.67
Seconds: 5035.96
CalcMPEGStream: 4321141355.67
Frames: 150778
CDSize: 4350.00
Number of CDs: 1
Cut point 4346.00
Variable Settings:
Frames: 150778
Anti Noise Filter: Off
Passes: 3
Image Quality: 17
VAF file creation: Off
Video Encoding Mode: CBR
Avg. Bitrate: 6864
Aspect Ratio: 4:3 (No borders, encoded as 4:3)

---AVS Begin---
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
DirectShowSource("D:\CAPTUR~1\movie.avi",29.970,audio=false)
ConvertToYUY2()
Levels(0,1.2,255,0,255)
BicubicResize(720,480,0.6,0.2)
Import("D:\Captures&Rips\conversion\ResampleAudio.avs")
ResampleAudio(44100)
----AVS End----

Closing program
CCE Max Speed: 1.850
Video Encoding finished.

--------------------------------------------------------
- 11/07/2004 23:14:58
- Free on drive D: 11762.20 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 11/07/2004 23:15:01
- Free on drive D: 11762.20 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 11/07/2004 23:15:03
- Free on drive D: 11762.20 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 11/07/2004 23:15:05
- Free on drive D: 11762.20 mb
- Multiplexing and cutting
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
Offset in Seconds: 2
Executing bbMPEG.
Variable Settings:
Movie offset: 2 seconds
Cut point: 4346 mb

Executing RunbbMPEG. Commandline:
"C:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "D:\Captures&Rips\conversion\bbMPEG_Muxed_File.mpg"
Multiplexing and cutting finished.

Image creation finished.

--------------------------------------------------------
- 11/07/2004 23:28:16
- Free on drive D: 7427.67 mb
- Conversion done!
--------------------------------------------------------

Manngo
12th July 2004, 12:36
Hi there!

I have the same error, and planned to investigate a bit this week. I have NTSC Xvid source, with mp3 audio, that I convert to PAL DVD. Audio is out of sync, however audio and subtitles are in sync, so somethig is wrong with the video, I think. I tried to convert the extracted audio to ac3 and mux it manually, but the same. Audio and video length is exactly the same. The problem appeared with 2 projects and could be reproduced in both cases.

I think the solution can be found if we find common things.

I spotted only one strange thing: Looking into the scenarist project, the highlight and subtitle streams were longer than the video and audio.

WhipHubley
13th July 2004, 20:34
sorted!

I converted the original AVI to DivX by running it through DrDivX (I chose a high bitrate and the result looked just as good as the original) and then passed that DivX file through AVI2DVD.

it came out fine - no audio / video sync problems at all.

not the best solution I'm sure, and I still don't really know what the problem was, but this has certainly solved it.

I'll be staying away from mp42 AVI's in future :-)

Manngo
14th July 2004, 08:30
Hello!

Would you be so kind as to check which codec is used on your computer to decompress the mp42 format? I mean with Gspot, or Graphedit. Not Virtualdub.
If it is FFDShow, which version?

You could help me a lot, becouse I dont want to convert to DivX.

WhipHubley
14th July 2004, 15:26
Originally posted by Manngo
Hello!

Would you be so kind as to check which codec is used on your computer to decompress the mp42 format? I mean with Gspot, or Graphedit. Not Virtualdub.
If it is FFDShow, which version?

You could help me a lot, becouse I dont want to convert to DivX.

sure - it is...

Mpeg4 Decoder DMO
Corona Windows Media MPEG-4 Video Decoder
Microsoft Corporation
9.00.00.2980
mpg4dmod.dll

...hope this helps.

if you get it to work without converting could you post your solution?

thanks, and good luck!

spon
14th December 2004, 04:00
Hello. I'm having the EXACT same problem as WhipHubley. Did anyone ever come up with a solution?

spon
14th December 2004, 08:16
by the way, here is my log file. thanks!

WNASPI32.DLL 4.6.0.1021
--------------------------------------------------------
- 12/13/2004 8:08:02 PM
- AVI to SVCD Conversion
- AVI2DVD ver. 1.2.2 build 3
--------------------------------------------------------
Initializing
WARNING! You seem to be using "Norton Unerase Protection" and
you want to delete the temporary files created by dvd2svcd.
This can cause DVD2SVCD problems. Even though DVD2SVCD deletes
the temporary files, Norton doesn't, therefore DVD2SVCD
might run into diskspace problems. I suggest that you stop the
"Norton Unerase Protection" Service.
- H:\Movies\To be converted\resident.avi
Initializing finished.

--------------------------------------------------------
- 12/13/2004 8:08:04 PM
- Free on drive H: 10348.56 mb
- AUDIO Extraction
--------------------------------------------------------
Audio extraction finished.

--------------------------------------------------------
- 12/13/2004 8:14:40 PM
- Free on drive H: 9661.44 mb
- AUDIO conversion
--------------------------------------------------------
--------------------------------------------------------
- 12/13/2004 8:14:44 PM
- Free on drive H: 9632.07 mb
- AUDIO conversion
--------------------------------------------------------

Encoding Audio. Filename: H:\Movies\Temp\Extracted_audio_1.wav
Executing BeSweet. Commandline:
"C:\Program Files\DVD2SVCD\BeSweet\BeSweet.exe" -core( -input "H:\Movies\Temp\Extracted_audio_1.wav" -output "H:\Movies\Temp\Encoded_audio_1.mp2" -logfile "H:\Movies\Temp\Encoded_audio_1.log" ) -ota( -g max ) -shibatch( --rate 48000 ) -2lame( -e -b 192 -m s )
Audio conversion of H:\Movies\Temp\Extracted_audio_1.wav finished.

Audio conversion finished.

--------------------------------------------------------
- 12/13/2004 8:30:29 PM
- Free on drive H: 5982.05 mb
- Video Encoding using Cinema Craft
--------------------------------------------------------

Executing Cinema Craft Encoder.
StreamSectors: 4640997788
AudioSectors: 136997476
VideoPAPO: 69769368
ScanOffsetBytes: 0
SeqAligningBytes: 12866377
DVDBytes: 0
VideoEndHeader: 4
SubtitleSectors: 0
EmptySectors: 238.00
PictureSectors: 0.00
PureMPEGStream: 4421364562.67
Seconds: 5632.05
CalcMPEGStream: 4421364562.67
Frames: 134962
CDSize: 4440.00
Number of CDs: 1
Cut point 4436.00
Variable Settings:
Frames: 134962
Anti Noise Filter: Off
Passes: 3
Image Quality: 17
VAF file creation: On
Video Encoding Mode: Multipass VBR
Min. bitrate: 200
Max. bitrate: 9000
Avg. Bitrate: 6280
Aspect Ratio: Anamorphic (no borders, encoded as 16:9)

---AVS Begin---
LoadPlugin("C:\PROGRA~1\DVD2SVCD\AVISYN~1.5PL\Mpeg2dec\MPEG2D~1.DLL")
DirectShowSource("H:\Movies\TOBECO~1\resident.avi",23.976,audio=false)
ConvertToYUY2()
Import("C:\Program Files\DVD2SVCD\Tylo\RoBaConditional.avs")
LanczosResize(720,356)
AddBorders(0,62,0,62)
Import("H:\Movies\Temp\ResampleAudio.avs")
ResampleAudio(44100)
----AVS End----

--------------------------------------------------------
- 12/13/2004 10:30:29 PM
- AVI to SVCD Conversion
- AVI2DVD ver. 1.2.2 build 3
--------------------------------------------------------
Initializing
WARNING! You seem to be using "Norton Unerase Protection" and
you want to delete the temporary files created by dvd2svcd.
This can cause DVD2SVCD problems. Even though DVD2SVCD deletes
the temporary files, Norton doesn't, therefore DVD2SVCD
might run into diskspace problems. I suggest that you stop the
"Norton Unerase Protection" Service.
-
Initializing finished.

--------------------------------------------------------
- 12/13/2004 10:30:29 PM
- Free on drive H: 12889.20 mb
- Restarting from: Pulldown
--------------------------------------------------------
- 12/13/2004 10:30:32 PM
- Free on drive H: 12933.99 mb
- Video Pulldown
--------------------------------------------------------
Executing Pulldown. Commandline:
"C:\Program Files\DVD2SVCD\pulldown\pulldown.exe" "H:\Movies\Temp\Encoded_Video_CCE_NTSC.mpv" "H:\Movies\Temp\Pulldown_Encoded_Video_NTSC.mpv" -prog_frames p
Video pulldown finished.

--------------------------------------------------------
- 12/13/2004 10:42:02 PM
- Free on drive H: 8719.97 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 12/13/2004 10:42:05 PM
- Free on drive H: 8719.97 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 12/13/2004 10:42:08 PM
- Free on drive H: 8719.97 mb
- Converting Pictures from ES to PS
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
--------------------------------------------------------
- 12/13/2004 10:42:10 PM
- Free on drive H: 8719.97 mb
- Multiplexing and cutting
--------------------------------------------------------
Saving bbMPEG settings: C:\Program Files\DVD2SVCD\bbMPEG\default.ini
Offset in Seconds: 4
Executing bbMPEG.
Variable Settings:
Movie offset: 4 seconds
Cut point: 4436 mb

Executing RunbbMPEG. Commandline:
"C:\Program Files\DVD2SVCD\bbMPEG\RunbbMPEG.exe" "H:\Movies\To be converted\bbMPEG_Muxed_File.mpg"
Multiplexing and cutting finished.

Image creation finished.

--------------------------------------------------------
- 12/13/2004 11:01:28 PM
- Free on drive H: 4297.53 mb
- Conversion done!
--------------------------------------------------------

Manngo
14th December 2004, 11:16
Since I use the latest Xvid codec and it's directshow filter there are no problems for me. Try it!

spon
14th December 2004, 17:18
Hi Manngo, thanks for the reply. Which xvid codec are you specifically referring to? I downloaded and installed this last week:

Koepi's Binary - XviD-1.0.2-29082004.exe

Is there a different one that I should be using?

Manngo
16th December 2004, 14:18
I use something like that. And disable xvid in ffdshow.
You can use graphedit to open your avi file to see, if you computer really use Xvid 1.02 for playback.
What OS do you have? I left the problem, when changed to WinXP, but not sure it was the problem. My Win2k was full with a lot of s**t.