View Full Version : Very strange audio video sync problem
AlexeyS
21st August 2005, 18:00
I have really strange video audio sync problem. I want to make DVD rip with alternative audio tracks (the translation on some DVDs sometimes awful).
First of all, I'd like to tell what I'm doing.
I encode video to Xvid. Then I encode alternative AC3 audio track to WAV file for better/faster working with VirtualDub. Then I open video and audio with VirtualDub.
Now, I try to find the Audio Delay (for example 12000 ms). Then I Frame Rate and make Convert FPS to .... The second step is always needed because in PAL countries movies selling with ~24, 25 and ~30 FPS.
Now the beginnig and ending parts of movie have no video/audio sync problems. But when I try to play middle parts of movie, I have audio sync problem. The delay may be -1200, then 2800, then -3400, then 800 etc. There are about 10-30 such delay problems.
Why I have this problem? How to make normal video/audio sync DVD rip?
neuron2
21st August 2005, 18:32
How did you decode the MPEG2 video? If you have irregular pulldown and you just ignore it, you can get sync drift.
mic
21st August 2005, 19:58
Agree with neuron2
Only time I've experienced this was years back doing ivt in V/Dub, then trying to match with unaltered audio. While total time didn't change, removal of frames wasn't consistant.
Are you doing 2 conversions, one to 24 & then to 25?
AlexeyS
21st August 2005, 19:59
How did you decode the MPEG2 video? If you have irregular pulldown and you just ignore it, you can get sync drift.
I just put it into VirtualDub.
AlexeyS
21st August 2005, 20:10
Agree with neuron2
Only time I've experienced this was years back doing ivt in V/Dub, then trying to match with unaltered audio. While total time didn't change, removal of frames wasn't consistant.
Are you doing 2 conversions, one to 24 & then to 25?
No. I'm not doing conversion. I just try to make normal audio and video sync by changing FPS of video with VD. Only then I make conversion of audio. Sometimes things are not standard. For example, 25 fps >> 27.453 fps.
neuron2
21st August 2005, 20:43
You said you are ripping from DVD. That means it is MPEG2. VirtualDub does not open MPEG2. So again I ask, how are you decoding the MPEG2?
AlexeyS
21st August 2005, 21:16
You said you are ripping from DVD. That means it is MPEG2. VirtualDub does not open MPEG2. So again I ask, how are you decoding the MPEG2?
It does. I have version with MPEG2 (version 1.5.10 with MPEG2 support).
Leak
21st August 2005, 21:20
It does. I have version with MPEG2 (version 1.5.10 with MPEG2 support).
That's either VirtualDub-MPEG2 by fccHandler or VirtualDubMod, but not plain vanilla VirtualDub...
neuron2
21st August 2005, 21:30
It does. I have version with MPEG2 (version 1.5.10 with MPEG2 support). That version of VirtualDub MPEG2 or VirtualDubMod does not support RFF flags and will produce sync drift if there is irregular pulldown, as I mentioned in my first post. Even the most recent version of VirtualDub MPEG2, which can honor RFF flags, does not support Force Film mode, so you'll have to deal with pulled-down (combed) frames. There's still no VirtualDub equivalent of DGMPGDec, whose Force Film mode can avoid sync drift with irregular pulldown.
mic
21st August 2005, 21:52
@AlexeyS
If I read your posts correctly, you've got an audio stream or file that you try to combine with mpg2 video & want to create xvid video. This should be rather straight forward with several methods/tools. Also if I read your posts correctly, your immediate problem is audio sync.
If your alternative audio is from the same DVD as the video, shouldn't be a problem. If the audio is from somewhere else, then there's a chance that you might correct it by time-shifting the audio file, but it might be a situation where you have to break the audio into separate sections and time-shift these individually to get things in sync.
That said, it sounds like your current methods are introducing prob.
If you've got audio & video off the same DVD, follow guides/posts etc to create a project file with DGIndex, strip audio, get both in V/Dub, & create your xvid.
If the audio is from somewhere else, I'd still strip the original audio, compare the two in software like an NLE with 2 tracks. Regardless the language, should see opening/closing music that matches. Determine any timing differences from that, stretching/compressing alternate file, adding silence or trimming as needed. This might get you close.
AlexeyS
23rd August 2005, 14:13
There's still no VirtualDub equivalent of DGMPGDec, whose Force Film mode can avoid sync drift with irregular pulldown.
Ok, and how I can make normal Xvid from MPEG2 video with simple deinterlace? Will DGIndex+Avisynth+VirtualDub help me?
If the audio is from somewhere else, I'd still strip the original audio, compare the two in software like an NLE with 2 tracks. Regardless the language, should see opening/closing music that matches. Determine any timing differences from that, stretching/compressing alternate file, adding silence or trimming as needed. This might get you close.
To do this I need to cut movies for 10-20 parts to resolve problem. I think it's too hard work to do. :confused:
neuron2
23rd August 2005, 15:16
Will DGIndex+Avisynth+VirtualDub help me? If you have irregular pulldown, yes.
AlexeyS
23rd August 2005, 16:52
If you have irregular pulldown, yes.
I've saved .d2v project with new dgmpgdec (beta7) with "Ignore Pulldown Tags" option enabled.
With avisynth I've used simple script with resize and TomsMoComp deinterlace.
With VirtualDub, I've encoded video to Xvid.
I still have the same problem...
Maybe I should choose another video codec (which has no such problem)? :confused:
neuron2
23rd August 2005, 17:30
Don't use Ignore Pulldown Flags! That will give you the same result as VirtualDubMod.
Use Force Film.
Alexey, you're just groping around; you're not understanding what you are doing. Have you even checked whether the clip uses pulldown at all?
AlexeyS
23rd August 2005, 22:05
Alexey, you're just groping around; you're not understanding what you are doing. Have you even checked whether the clip uses pulldown at all?
Yes, it does. I've tried Force Film with few other movies and it worked great only with one of them. I'll try it now...
AlexeyS
25th August 2005, 22:18
Thanks Neuron2. It works perfectly.
One question - is Force Film means automatically pulldown removal (or I need use some commands like Decimate etc, such when I don't use Force Film)?
neuron2
25th August 2005, 23:15
One question - is Force Film means automatically pulldown removal (or I need use some commands like Decimate etc, such when I don't use Force Film)? Force Film mode is complete just by itself. It removes pulldown and maintains a constant base frame rate of 23.976, thereby keeping the audio and video in sync throughout. You do not need any other tools, such as Decimate.
Be aware that Force Film is not *always* applicable, but when it is, it is a very fine method for performing IVTC. One should always try to use it if possible.
AlexeyS
25th August 2005, 23:42
Force Film mode is complete just by itself. It removes pulldown and maintains a constant base frame rate of 23.976, thereby keeping the audio and video in sync throughout. You do not need any other tools, such as Decimate.
Be aware that Force Film is not *always* applicable, but when it is, it is a very fine method for performing IVTC. One should always try to use it if possible.
Ok. Thanks again.
AlexeyS
3rd September 2005, 20:43
thereby keeping the audio and video in sync throughout
And what I should do with movies when Forced Film is not applicable? Forced Film helped me with few movies, but today I've tried to encode another one problem movie and there is audio sync problem.
PS: I've used Forced Film and IVTC was done well.
AlexeyS
3rd September 2005, 20:56
When Force Film is not applicable you must use other methods for making your video progressive, depending on the nature of the source video. Those methods include deinterlacing, IVTC using Decomb (or equivalent), and deblending.
There is no substitute for analyzing your source material and understanding the appropriate processes.
But I get ideal movie quality (no deinterlace artifacts etc). The Forced Film made ideal IVTC. The problem is in audio sync only.
neuron2
3rd September 2005, 20:57
You have to figure out why the desync is occurring and then take appropriate corrective action. Without knowing any details about your source material and processing you're applying I can't tell you more than that.
Does the desync stay constant or does it get progressively larger?
Can you upload an unprocessed source sample clip that shows the problem.
AlexeyS
3rd September 2005, 21:04
You have to figure out why the desync is occurring and then take appropriate corrective action. Without knowing any details about your source material and processing you're applying I can't tell you more than that.
Does the desync stay constant or does it get progressively larger?
The thing is I don't understand why it's happening. It's really strange for me.
The desync in progressively larger, but I use Frame Rate Change in VD. So, the beginning and ending of movie have normal audio sync. In the middle of movie there is desync (for example -2000ms, then +3500 ms, then -5000ms, then +500ms etc).
Can you upload an unprocessed source sample clip that shows the problem.
Yes, I will upload.
AlexeyS
3rd September 2005, 21:06
What I should use to keep original video? Honor pulldown tags or Ignore pulldown tags (I mean in DGIndex)?
Or I can cut part of movie without recompression.
neuron2
3rd September 2005, 21:21
What is the nature of the source file: VOB, transport stream, ... ?
5000ms! That means the video and audio mismatch by 5 seconds.
Don't use frame rate change in VirtualDub. That is a silly bandaid. Find out the real cause and fix that.
AlexeyS
3rd September 2005, 21:24
What is the nature of the source file: VOB, transport stream, ... ?
The video is transport stream. The audio is from transport stream too, but from another one. Also, I have DVD (the audio sync is also the same), but I don't like the quality of sound there...
AlexeyS
3rd September 2005, 21:28
5000ms! That means the video and audio mismatch by 5 seconds.
Don't use frame rate change in VirtualDub. That is a silly bandaid. Find out the real cause and fix that.
Yes. The delay is huge sometimes.
For two of my movies which was with this problem (when Forced Film helped me) I've made Frame Rate Change first to find out what is difference (for example, 0.941 ratio). Then I've streched audio to this ratio and got normal 23.976 movie with normal audio.
neuron2
3rd September 2005, 21:36
The video is transport stream. The audio is from transport stream too, but from another one. Also, I have DVD (the audio sync is also the same), but I don't like the quality of sound there... So you're trying to combine audio from one stream with video from another. That's a difficult operation. You have to accurately cut the video and audio and then arrange their durations between matching points at their starts and ends so that they are the same duration. You may need to stretch or compress the audio.
I'll help with the DVD but I don't have time for all the work involved in helping you sync the two transport streams. Use ChopperXP to cut a chunk of the VOB.
AlexeyS
3rd September 2005, 21:42
So you're trying to combine audio from one stream with video from another. That's a difficult operation. You have to accurately cut the video and audio and then arrange their durations between matching points at their starts and ends so that they are the same duration. You may need to stretch or compress the audio.
Yes, I'm always doing this first. In 95% cases after that I need just to strech audio.
neuron2
3rd September 2005, 21:46
Maybe the broadcaster of one of the streams played some speedup games to add extra commercial time. It's not unusual. If so, you're screwed.
AlexeyS
3rd September 2005, 21:54
Maybe the broadcaster of one of the streams played some speedup games to add extra commercial time. It's not unusual. If so, you're screwed.
Nope, I watch pay SatTV without ads during movie (hate ads :)). That's why it's strange - it should working, because versions of movie are the same (both same play time).
The same problem was with another movie (with audio sync which was +7000, then -2500 etc), but when I've used Forced Film the problem is gone...
mic
3rd September 2005, 22:13
I can't say how to solve the problem you're experiencing -- only say what I do and why...
I do 2 captures off digital cable; 1 for video, recording decoded ac3 audio in separate app, 2nd in ati vcr format with mpg audio for CC & audio baseline. Because I'm using a separate app, differences in video and audio clocks, separate recordings, lag from decoding ac3 etc., decoded ac3 will not sync.
In Vegas I line up both videos, and start of mpg audio with start of vcr video. Import wav from decoded ac3, sync with mpg audio at start. Compare waveforms between audio tracks. As timeline progresses, I find first instance where audio sync is off by ~3 frames. I backtrack to first relative silence, and split decoded ac3 track. I then drag new clip on right to re-sync with mpg audio. Audio clip on left is time stretched (ctrl-drag) to butt start of clip on right.
I usually do this maybe 4 times, make 4 splits in audio track per video project. It usually takes about 10 minutes if I render new wav and import to check accuracy.
Because project is intended for DVD on TV & capture format used, I select honor pulldown flags in DGIndex, and do not alter fps anywhere.
neuron2
3rd September 2005, 23:54
Nope If you can upload portions of *both* original transport streams such that I can duplicate the problem, then I'll try to figure out why it is happening.
AlexeyS
3rd September 2005, 23:58
If you can upload portions of *both* original transport streams such that I can duplicate the problem, then I'll try to figure out why it is happening.
Ok. Is it better to upload same scenes or it doesn't matter?
Also, how to save original video? DGIndex >> Honor pulldown tags or Ignore pulldown tag? I think ChopperXP is suitable only for DVDs...
neuron2
4th September 2005, 02:01
Ok. Is it better to upload same scenes or it doesn't matter? Of course they have to be the same scenes! I'm going to match the audio of one to the video of the other and see if sync is maintained. Isn't that what you said your problem is? So, don't bother uploading anything if I won't be able to duplicate your problem. I mean, if I go through it all and it is showing no problem, and you say, well, I didn't give you big enough cuts, or I didn't give you the right section, it's a waste of everybody's time.
Also, how to save original video? DGIndex >> Honor pulldown tags or Ignore pulldown tag? I think ChopperXP is suitable only for DVDs... Anyway I don't want anything processed. Use a binary editor if you have to.
AlexeyS
4th September 2005, 02:04
I think it'll work. Anyway I don't want anything processed. Use a binary editor if you have to.
Ok. You said me one time that I can use DGIndex to cut raw video form file. But now you've changed names of some functions in new versions of DGIndex (Ignoe tags and Honor tags)...
neuron2
4th September 2005, 02:15
I'm trying to reduce the variables, but if you insist...
Please use Honor Pulldown Flags. You can look at the new DGIndex manual for a good explanation of these names and how they translate to the old names.
If you do it that way, you'll have to upload the audio cuts as well, of course.
AlexeyS
4th September 2005, 14:58
I've uploaded samples to your FTP (1.rar).
"73" - it's version with good sound and bad screen.
"cut" - it's version with good screen.
The delay is -15832ms. I think it's wrong because the audio track is almost the same (another translation) as on my old DVD. I mean I can without any problems (without audio desync) put this sound to my old DVD's video. So I think problem is with video ("cut" video) only.
neuron2
4th September 2005, 15:56
Now please explain how I duplicate your issue using the files that you uploaded.
I observe that the video clips contain no features that would allow me to assess audio sync, and that the audio appears to be unrelated to this video.
BTW, is this an audio dub in Russian or something?
AlexeyS
4th September 2005, 16:30
Now please explain how I duplicate your issue using the files that you uploaded.
I observe that the video clips contain no features that would allow me to assess audio sync, and that the audio appears to be unrelated to this video.
BTW, is this an audio dub in Russian or something?
Yes, I want to make movie with good Greek and Russian translations.
AlexeyS
4th September 2005, 16:33
Now please explain how I duplicate your issue using the files that you uploaded.
I observe that the video clips contain no features that would allow me to assess audio sync, and that the audio appears to be unrelated to this video.
Is there some tool to cut original Transport Stream (not VOB)?
The video with bad quality and audio are can't be in original transport stream I think, because software of my SatTV reciever is making MPG file as output from original video (SatTV reciever's HDD has it's own file system and file formats).
neuron2
4th September 2005, 17:47
Since I had specifically asked you not to upload things that I could not use to duplicate your issue because it would waste my time, and since you now fail to tell me how the uploaded files can be used to demonstrate your issue, I conclude that you are just wasting my time, and I decline to participate further.
AlexeyS
4th September 2005, 21:30
Since I had specifically asked you not to upload things that I could not use to duplicate your issue because it would waste my time, and since you now fail to tell me how the uploaded files can be used to demonstrate your issue, I conclude that you are just wasting my time, and I decline to participate further.
I've uploaded original streams but processed with DGIndex. Last time I've uploaded (about two months ago) video processed with DGIndex and you helped me.
Sorry for waste your time. I'll try to resolve problem by myself trying different deinterlacers, filters etc.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.