Log in

View Full Version : Weird audio desynchronization


eXtremeDevil
29th August 2015, 20:31
Hi, I'm trying to synchronize two audios and when I put the start at the same time the end is delayed in one of them by 150ms (more or less). But I've been looking at the whole audio and it seems like is a progressive issue. How can I treat the second audio to remove the 150 progressive delay?

Thanks!

tebasuna51
29th August 2015, 21:45
All audio editors have functions to change the audio duration.

BTW there are methods to avoid lose quality decoding -> Changing duration -> recoding, when is a short delay progressive in a large audio.

If your audio is a AC3 you can try:

eac3to input.ac3 output1.ac3 edit=0:01:40.000,-32ms
eac3to output1.ac3 output2.ac3 edit=0:01:20.000,-32ms
eac3to output2.ac3 output3.ac3 edit=0:01:00.000,-32ms
eac3to output3.ac3 output4.ac3 edit=0:00:40.000,-32ms
eac3to output4.ac3 output.ac3 edit=0:00:20.000,-32ms

Select edit points along the movie in silence or low volume points.
The output.ac3 is 160ms short than input.ac3

eXtremeDevil
29th August 2015, 22:35
Yes, but you are talking about cutting at certain points, I can do that, but what I really want is to exand progressively the total audio up to 150ms more, for example. The delay is not constant so no matter how many cuts I apply, it will never be 100% sychronized with the other.

sneaker_ger
30th August 2015, 08:59
100%? No. But will it be perceivable?

But like tebasuna51 said, many sound editors can change speed. SoX and Audacity both have the "speed" option for example. It can be done in AviSynth as well:
AssumeSampleRate(X)
ResampleAudio(48000) #if you need 48KHz output

eXtremeDevil
30th August 2015, 10:04
I tried changing the speed with BeSweet but the minimun that it extends is about 3 seconds. I want a total plus of 150ms more or less, not that much. Can that be done? To slow down the audio to only 150ms in the overall duration?

sneaker_ger
30th August 2015, 10:19
Do the math to find X?
No one can do it for you because you only keep posting about the 150ms but never mention the total duration (or sample rate).

tebasuna51
30th August 2015, 11:39
- When the async is less than a videoframe duration (40 ms for a 25 fps movie) you can't perceive the video/audio async.

The cut audio frames method can guarantee a async less than a audio frame duration (32 ms for AC3), even with perfect points selected only half audio frame duration (16 ms for AC3).

Search two sync points between audios and fill the exact points:

At begin At end
------------ ------------
Good Audio 00:mm:ss.mmm hh:mm:ss.mmm
Bad Audio 00:mm:ss.mmm hh:mm:ss.mmm

and say me the audio format of the Bad (AC3, DTS, MP3, ...) than you want sync.
I can provide you the optimal cut points, but you must change a little to next point with silence/low volume in Bad.

- There are many methods, using Audio Editors, Sox or AviSynth, to change the audio duration but not always perfect.
Someones can introduce phase async between channels, others can produce artifacts and also don't have enough precission to obtain the exact amount of delay required.

For instance the resample method require a integer value, then using:
AssumeSampleRate(48001) #minimum change
ResampleAudio(48000)

Can short your audio in a factor:
48000/48001 = 0,9999791671

Then short 150 ms at end point 2:00:00.150
But if your end point is only 1:30:00, you can only short the duration 112 ms. and finish with 38 ms of delay.

eXtremeDevil
30th August 2015, 11:49
Thanks for all the help guys, what I did in the end was to add/remove silences every here and there when I saw the desynchronization was too big. I think the overall result is not that bad :)