Log in

View Full Version : Joining many files - audio sync problems


Shubin
7th June 2004, 12:12
I've made a lot of (about 30) clips which I want to
join together to make a movie. Each clip was made in
AviSynth and requires a lot of processing.

Files were encoded with XVid and Lame MP3.

Now I have 30 avi files. When I tried to join them
together using VDub, I got audio out of sync. I've
found a method described on doom9 which recommends
cutting out several frames from the end of each avi
to be joined. Maybe it works, but imagine repeating
this 29 times... Also cutting several frames will make
me to rewrite several avs scripts, because some of these
avi's are transitions from one clip to another.

Is there an easier way to do the job ?

I can not process all avs as a single file - it runs out
of memory after 4 hours of working.

Each avi fragment takes 1 to 30 minutes of processing...

stephanV
7th June 2004, 13:04
the correct way would be doing it with avisynth... otherwise deleting frames (or adding small pieces of audio) is your only option.

but are you using such heavy scripts that you get an 'out of memory'-error? im sure this is not normal behaviour for avisynth. you might better invest your time in finding the cause of that (clean up your plug-in directory to begin with); it shouldn't be happening i think.

Shubin
7th June 2004, 13:57
>but are you using such heavy scripts that you get an 'out of memory'-error?
>im sure this is not normal behaviour for avisynth.

I believe it is. The original video is in DV format. Total
of 40 gigs or so. Each .avs processes from 2 to 6 original files.
Video is at least deinterlaced, resized, cropped, denoised and sharped.
AViSynth normally GPFs when I am trying to arrange 4 files
together (video from one file replaces video in another)
with dissolve or something like this. SetMemoryMax(120000)
solves this, but does not help with the whole project.

I have Duron 950 with 128 Mb memory.

>clean up your plug-in directory to begin with

Do you think that removing unnecessary plugins will help ?

So you think it can't be done with VDub ?

stephanV
7th June 2004, 14:07
it could, some avisynth plug-ins seem to randomly crash virtualdub from time to time. it certainly wouldnt hurt i think.

the probem is that your audiostreams are longer or shorther than your videostreams and it is this what causes the desynch i think.

just thought of something; what you could try is:

just join all the DV-files with avisynth, but dont use any filtering. then open this in VDub and save the audio-stream... use this audio-stream as replacement for your joined files in VDub. it might just work.

toysoldier
22nd June 2004, 08:39
I am a newbie of virtualdub and avisynth,
I guess maybe you can try this avs script:

a1=("...\*1.avi").changefps(25) # or changfps(30) in ntsc
.....
a30=("...\*30.avi").changefps(25)
a1++a2++...........a29++a30

then open this avs in virtualdub.

Amdh
26th June 2004, 09:45
:) :)
Well Friend ...
I have had the same problem joining a movie which i have processed in 4 parts ...
Allways the last part has an audio / video desync ..
but I think i have found a solution !
I need not compress the audio in mp3 when compressing the video ..
so leave the audio in wav format .. compress the video then join videos together leaving audio in Wave format !
Now u have only one file ..
Open it in vdub then compress the audio in lame mp3 (At least 128 kbps) and indiquate direct stream copy for video ..
This must work !
waiting for ur reply !