Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > (Auto) Gordian Knot

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th September 2009, 20:18   #1  |  Link
beartums
Registered User
 
Join Date: Aug 2004
Posts: 1
yet another Audio Sync thread

Sorry if this particular problem has been dealt with, but I've spent hours working on it and searching the forums and nothing helps.

I want to hardcode subtitles to an DivX avi already on my disk (this is a home movie provided by a friend -- i don't know how he recorded it). The original AVI has video and audio in sync, but AGK puts it out of sync by a few seconds at the beginning and around 10-15 seconds at the end

I have run it through virtualdub with direct copy of the video stream and full processing of the audio stream to change from a vbr mp3 to PCM audio. The output file is still in sync, but when I run it through AGK, it is out of sync by the same amount as before.

I have run this (PCM) file through virtualdub with the "change so video and audio durations match" option selected. THe output file (just like the input file) is in perfect sync throughout. When I run this output file through AGK, the sync issues are unchanged.

This is a bit frustrating and, unfortunately, most of the threads I have found about it have concentrated on DVD conversion, so any information or ideas would be helpful.

so, thanks in advance and, if the question is out there and I overlooked it, I apologize.

beartums
beartums is offline   Reply With Quote
Old 7th September 2009, 06:45   #2  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,057
Have you tried demuxing the original audio and replacing what AutoGK gives you with that original audio? Have you checked to see if the output AVI is the same length as the source AVI?

And welcome to the forum.
manono is offline   Reply With Quote
Old 13th September 2009, 14:05   #3  |  Link
yetanotherid
Banned
 
Join Date: Apr 2008
Posts: 723
I've bumped into similar problems a few times and not found an actual answer. I've had the same thing happen when trying to convert a few vob files to a single AVI many times.
I discovered when it happens with vob files it's because the length of the audio and the video don't match. It seems AutoGK demuxes the audio from each vob file then tacks it all together (and converts it if required) but doesn't take into account any situation where there's video but no audio (it's sometimes a tiny section at the end of each vob file). I wish it did, because the only way I've found to get around that is to use a program (which fills the audio gaps) to convert the vobs to another format first (I usually pick something lossless) and then use AutoGK to convert the new file to XviD/DivX.

I'm explaining all that because it's got me wondering..... is it possible to have breaks in the audio stream contained in an AVI? Because if it is, would it be possible that some conversion programs are clever enough to make note of where the gaps in the original audio file are and repeat them in the AVI they produce? That'd explain why when converting some AVIs AutoGK doesn't keep the audio in sync. It'd just tack the single audio stream together ignoring any gaps as it appears to do when converting vobs.

Just a theory.....
But I've used another program to convert AVIs to new AVIs containing lossless video and audio, tested them to make sure they're in sync, then converted the second AVI using AutoGK and it's worked that way.

For the record, I discovered the problem with vob files while trying to convert kind of "unrelated" vobs to a single AVI. An example of what I mean would be converting 4 episodes from a DVD to a single AVI rather than 4 individual AVIs. More often than not, the audio sync will change at the beginning of each episode. If I use ConvertXtoDVD to convert the same vob files to a single DVD title, I can see from the log files that the program has found gaps in the audio sync, how big they are, and therefore how much blank audio it's added each time to keep new audio stream in sync.
yetanotherid is offline   Reply With Quote
Old 13th September 2009, 16:08   #4  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,057
Quote:
Originally Posted by yetanotherid View Post
It seems AutoGK demuxes the audio from each vob file then tacks it all together (and converts it if required) but doesn't take into account any situation where there's video but no audio (it's sometimes a tiny section at the end of each vob file).
No, that's not how it does it. AutoGK doesn't do it anyway, but DGIndex. If the DVD has been decrypted properly and the VOBs are from the same movie and not corrupted, the synch should be maintained. If there's a tiny gap at the end of one VOB, the negative delay at the beginning of the next VOB ensures the continuing synch. The main exception to this is if the movie is made up of 2 or more VOB IDs. Then the audio should start off OK, but can go sharply out of synch at a certain point (or points) where you change VOB IDs, and it's not gradual at all. This is because either an earlier VOB ID's audio is shorter than is the video, or because a later VOB ID has a delay DGIndex can't take into account. This is a fairly rare occurance, though, both having multiple VOB IDs in a movie, and the audio going out of synch at the beginning of the 2nd VOB ID if there are multiple VOB IDs, but I've seen it a few times. Sure, when you join unrelated VOBs from different sources, or even different VTS's of the same DVD (different episodes, for example), you're almost inviting out of synch audio.

I've never used ConvertXToDVD, but that's a nice feature you described, but DGIndex (and hence AutoGK) has nothing like that.
manono is offline   Reply With Quote
Old 13th September 2009, 18:01   #5  |  Link
yetanotherid
Banned
 
Join Date: Apr 2008
Posts: 723
I was just theorising out loud. I'm sure I've had audio and video issues where the out of sync problem has gradually increased throughout the video, but I've also had sync issues where it appeared to be gradual, however when I looked closer it was happening in steps.
So the audio stream in an AVI must be continuous? No pieces allowed (so to speak)?

Out of curiosity, is there a way for the audio and video streams in an AVI to play at slightly different speeds, causing a gradual sync problem if they don't? I'm just trying to understand why these gradual sync problems occasionally happen, why AutoGK never seems to be able to detect and/or correct them, why most times another program will convert the same video and produce audio which is in sync when AutoGK can't, and why the "change so video and audio durations match" setting in VirtualDubMod never seems to have an effect on anything when I try it?

They are all serious questions, by the way.
I've experienced those gradual sync problems before and don't think I've ever solved one while messing about with VirtualDubMod. I did theorise a couple of times that it was a frame rate issue. Instead of the frame rate being 25fps (where I am) I thought maybe it could be something like 24.99 but AutoGK still produces a 25fps AVI anyway (is something like that possible), but even when trying to change frame rates and then adjusting the audio delay I'd get the audio in sync perfectly at one end but then it'd be out at the other.... so sooner or later I'd run the video through a program like Super to produce an AVI with uncompressed video and audio, then run that through AutoGK.
I do recall at least once or twice running a video through Super, while telling it to copy the audio and video streams rather than convert them, and that AVI would have the same audio sync issues as the AVI AutoGK had produced, so then I'd run Super again and actually convert the streams rather than copy and all would be fine with the world again.....

Maybe it'll all just remain one of life's mysteries.....
yetanotherid is offline   Reply With Quote
Reply

Tags
audio sync, autogk

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:45.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.