View Full Version : Video/audio desynchronization while appending AVI files
alexVS
5th November 2007, 14:21
I have 11 AVI files (Divx, mp3), encoded with the same video and audio codecs. I join these files into one with VirtualDub (append segment, direct stream copy). When I play the final big clip, (in the end of it) audio remains about 3 seconds behind video. That is the problem.
As far as I understand, in each of 11 clips, audio and video has a bit different length. Can VirtualDub append silence or cut audio to make the length of audio and video exactly the same? So there will be no desynchronization whle appending segments? Or is there another way to solve the problem?
alexVS
5th November 2007, 16:42
Is there a program that can open AVI-file,
leave the video stream as is,
and adjust the length of audio stream to video
(if length of audio > length of video, cut audio,
if length of audio < length of video, add silence to audio)
So audio and video will have exactly the same length
Is it possible?
setarip_old
5th November 2007, 17:34
Hi!
Load the file into VirtualDub, VirtualDubMod, or NanDub.
Set BOTH "Video"(VirtualDub,
VirtualDubMod and NanDub) and "Audio"
(VirtualDub and NanDub - VirtualDubMOD>"Streams>"Stream
list") to "Direct Stream Copy".
A) If the difference between audio and video is constant
throughout the video:
From the "Audio" dropdown menu, select "Interleaving" (For
VirtualDubMOD, rightclick on the listed audiostream and then
select "Interleaving")
Under "Audio skew correction", set an appropriate number of
milliseconds (positive or negative) in the box labelled "Delay
audio track by"
Save with a new filename
B) If the difference increases as the movie plays:
From under the "Video" dropdown menu, select "Framerate" -
and select "Change so video and audio durations match"
Save with a new filename
Let us know of your success ;>}
foxyshadis
5th November 2007, 20:15
Framerate and skew doesn't have to do with this. You have to re-encode the audio, unfortunately, with a tool like Audacity; but you might try appending with other tools, like avidemux and avi mux gui, to see if they can insert silent frames to correct it.
setarip_old
5th November 2007, 20:38
Framerate and skew doesn't have to do with this.How have you determined this?
foxyshadis
5th November 2007, 23:33
Mainly because it's extremely common, and it's implicit in the first question and explicit in the second one that the individual videos are in sync.
setarip_old
6th November 2007, 01:41
The following seems to indicate that the individual videos are not in synch:As far as I understand, in each of 11 clips, audio and video has a bit different length.Perhaps "AlexVS" will be good enough to indicate whether he created 11 separate .AVIs that he's trying to join or, if for some reason, he first created ONE .AVI, split it into 11 pieces, somehow lost the original .AVI he created, and now wants to rejoin the 11 pieces.
alexVS
6th November 2007, 06:37
Clips were TV-captured. Somehow in every of 11 clips audio stream has length about 300-500 ms more than the length of video stream. Video and audio of every separate clip are in synch.
I found a program called MP4Cam2AVI Easy Converter https://sourceforge.net/projects/mp4cam2avi
It was able to join all AVI into 1 without reencoding and it kept synch all right.
foxyshadis
6th November 2007, 07:55
Cool, I'll have to keep that one around. Thanks for finding it.
setarip_old
6th November 2007, 07:58
Glad to hear you found a way to resolve your problem ;>}
May I ask how you managed to discover "MP4Cam2AVI Easy Converter", described as "MP4Cam2AVI is a MPEG4 to AVI converter/joiner for digital MPEG4 cameras, it makes their clips DivX/XviD compatible." - and that it would serve your purpose?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.