Log in

View Full Version : Audio Sync issue


QuadraQ
17th September 2005, 22:08
Hi all,

I know that there are lots of posts on audio synchronization issues, so I may be repeating information. I couldn't find another post that specifically addresses my problem, but it could be there. If there is another post that addresses the problem, please post a link to it.

That said, this is the problem I'm experiencing. I just upgraded to the latest version of Gordian Knot and Divx 6 Pro (and I'm hoping to get into x.264). I got Gordian Knot set up correctly (I had some outdated directories), and went through all the tutorials (Robot4Rip was new to me - so you get an idea of how old my Gordian Knot experience was before).

I created a job in Gordian Knot to backup my Princess Bride DVD, and as a sort of test, before I do my other DVD's. The video came out great, but the audio is seriously out of synch. When I open it up in VirtualDubMod I get the following warning message:

VirtualDub has detected an improper VBR audio encoding in the source AVI file (audio stream 1).
The currently preference is to rewrite the audio header with standard CBR values during processing for better compatibility. This may introduce up to 36746 ms of skew from the video stream. If this is unacceptable, decompress the *entire* audio stream to an uncompressed WAV file and recompress with a constant bitrate encoder. (bitrate: 129.0 +- 16.8 kbps)

Do you still want to rewrite the header?

If I click Yes and play the movie, the audio is still off, but not as badly as if I play the movie in Media player, or the Divx player.

Since I've been advised to always post the entire log file, here is the log for this job:

9/16/2005 9:45:29 PM: Job "My Default - THE_PRINCESS_BRIDE.avi" started.

o DivX5-Single, Quality 20 : C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Credits.avs
o DivX5-First Pass: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avs
o DivX5 - Pass 2: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avs
o Append Credits & Mux Audio.
o Delete Intermediate Files.
End of Job 1 (My Default - THE_PRINCESS_BRIDE.avi).
_______________________________________________________________________________________________________________________

Gordian Knot
Encoding Job Data:

Type: EncD5_All_CreditsSep
Container: Audio-Video Interleave (AVI)
Number: 1
Name: My Default - THE_PRINCESS_BRIDE.avi
Platform: WinXP (5.1.2600).2

Files:
VirtualDubModExe: C:\PROGRA~1\GORDIA~1\VirtualDubMod\VirtualDubMod.exe
NandubExe: C:\PROGRA~1\GORDIA~1\nandub\Nandub.exe
AviFinal: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avi
AviMovie: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Movie.avi
AviCredits: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Credits.avi
MovieFS: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avs
CreditsFS: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Credits.avs
Log : C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.log
Stats: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.stats
Ecf : C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.ecf

Options:
Quality/DRF: 20
CreditsStart: 137084
UseEcf: 1
CreditsIVTC: 0
CreditsAppend: 1
DeleteInterm.: 1
EnforceBitrate: 0
AntiShit: 0

Calculator:
VideoSize: 617155 kbyte.
Audio1Size: 92524 kbyte.
Audio2Size: 0 kbyte.
Overhead: 7120 kbyte.
AviSize: 716800 kbyte (700 mbyte).
FilesSize: 0 kbyte.
TotalSize: 716800 kbyte (700 mbyte).
Interleaving: vbrmp3
Bitrate: 1073 k(=1000)Bits/s
Frames: 112999
FPS: 23.976
Duration: 118:33
Quality: 0.208 bits/(pixel*frame).
CompCheck3: 0.000 bits/(pixel*frame).
CompCheck5: 0.124 bits/(pixel*frame).
Resolution: 640 x 336

Audio 1:
Mode: Just Mux Source File.
SourceFile: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE Track 1 English DELAY 0ms.mp3
WavFile: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE Track 1 English DELAY 0ms.wav
Mp3File: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE Track 1 English DELAY 0ms_1.mp3
OggFile: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE Track 1 English DELAY 0ms.ogg
OggQuality: 0.200
OggLanguage: English
Azid:
Lame:
Delay: 0
Interval: 1
Preload: 500
Mux: 1
Recalc: 1
DeleteWav: 1

Audio 2:
none.

9:45:29 PM: Audio 1, determined: 92524 kb
9:45:29 PM: Audio 1, calc: 92524 kb
9:45:29 PM: New Bitrate for Movie = 1073 k(=1000)Bits/s

Adding this script to C:\PROGRA~1\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "DivX5 Single Pass"
// $input "C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Credits.avs"
// $output "C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Credits.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE_Credits.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x78766964,0,10000,0);
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE_Credits.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

9:45:29 PM: Started DivX5-Single, Quality 20: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Credits.avs
9:49:55 PM: Finished DivX5-Single, Quality 20: Duration: 4 minutes, 26 seconds.
9:49:55 PM: Assumed: Main Movie has 137084 Frames.
9:49:55 PM: Assumed: Credits Part has -24085 Frames.
9:49:55 PM: Credits Size = 1884 Kb
9:49:55 PM: New Bitrate for Movie = 882 k(=1000)Bits/s

Adding this script to C:\PROGRA~1\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "DivX5 First Pass"
// $input "C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avs"
// $output "C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x78766964,0,10000,0);
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE_Movie.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

9:49:55 PM: Started DivX5-First Pass: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avs
2:09:51 AM: Finished DivX5-First Pass: Duration: 4 hours, 19 minutes, 56 seconds.
2:09:51 AM: Trying to open Log-file.
2:09:51 AM: Success: Log-file open.
2:09:51 AM: Encoded: 137084 Frames.
2:09:51 AM: Speed: 8.790 Frames per Second.

Adding this script to C:\PROGRA~1\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "DivX5 Second Pass"
// $input "C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avs"
// $output "C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x78766964,0,10000,0);
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE_Movie.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

2:09:51 AM: Started DivX5 - Pass: 2: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avs
6:02:31 AM: Finished DivX5 - Pass: 2: Duration: 3 hours, 52 minutes, 39 seconds.
6:02:31 AM: Speed: 9.820 Frames per Second.

Adding this script to C:\PROGRA~1\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "DivX5 Append"
// $input "C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Movie.avi"
// $output "C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE_Movie.avi",0,0);
VirtualDub.Append("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE_Credits.avi");
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE Track 1 English DELAY 0ms.mp3",0x00000202,1);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,1,0,0);
VirtualDub.stream[0].SetClipMode(1,1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetVolume();
VirtualDub.stream[0].SetCompression();
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\Program Files\\DivX\\Movies\\DVD\\Projects\\THE_PRINCESS_BRIDE_VTS_01_PGC1\\THE_PRINCESS_BRIDE.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

6:02:31 AM: Started Appending Credits and Muxing Audio.: C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE_Movie.avi
6:03:26 AM: Finished Appending Credits and Muxing Audio.: Duration: 55 seconds.
6:03:26 AM: Deleting Intermediate Files.

6:03:26 AM: Done.
6:03:26 AM: Movie = C:\Program Files\DivX\Movies\DVD\Projects\THE_PRINCESS_BRIDE_VTS_01_PGC1\THE_PRINCESS_BRIDE.avi
Total Encoding Time: 8 hours, 17 minutes, 57 seconds.
9/17/2005 6:03:26 AM: Job "My Default - THE_PRINCESS_BRIDE.avi" finished.
_______________________________________________________________________________________________________________________

QuadraQ
18th September 2005, 08:00
I just noticed another problem: The framrate is 29.97 instead of the 23.976 that it should be for a film source. What happened? I selected 23.976 in Gordian Knot, and before I opened the .d2v file that Robot4Rip created I changed the Field_Operation=0 to Field_Operation=1 like the guide says to do for film. Why did it end up with the NTSC framrate instead of the film framerate? Could this account for the audio sync issues? Thanks.

QuadraQ
20th September 2005, 06:33
No one has responded so perhaps I'm going over issues that have already been covered. But for the benefit of those who may do a search in the future, I found that the frames being stuck at 29.97 was the issue. Even though I changed the selection to 23.976 it ended up encoding at 29.97 frames per second anyway, and as a result the audio sync was completely off. When I recreate the .d2v file that Robot4Rip creates, and manual create it with the "Force Film" option selected and then encode in Gordian Knot everything came out OK. Too bad the Fore Film check box in Robot4Rip doesn't work yet. The Guide says: "If it doesn't say FILM, you're done. If it does say FILM, and the percentage before it is larger or equal to 95.00%, then locate the following line at the beginning of the file:

Field_Operation=0

and change the 0 to a 1 to enable force film." Apperently this doesn't work. I did this, but the frames were still encoded at 29.97 frames per second.