PDA

View Full Version : How to join 2 AVIs with different audio sampling rates ?


mike23
12th September 2004, 09:30
I have two Divx/MP3 VBR encoded AVI movie parts.
When I try to append them in VirtualDub a dialog pops up
informing my that

"Cannot append segment.... The audio streams have different sampling rates (18860.00000 vs. 18931.00000)"

Ok. So I want to join them with Avisynth. If it necessary
to re-encode the audio part I would do it (with 128kbps).

How should an Avisynth script file for VirtualDub joining
look like (assuming the movie files are named aaa.avi and
bbb.avi)?

Thx
Mike

stickboy
12th September 2004, 10:17
Use ResampleAudio to change the sampling rate of one clip to match the other's.

stephanV
12th September 2004, 12:15
what VDub shows here is not the samplingrate in Hz, but something related to the audio block rate/bit rate. but the block rate is a special case with VBR MP3 in AVI.

do not use normal VirtualDub to open VBR MP3: it will rewrite the waveformatex header causing desynch (that seems to be happining here though)

the only proper way to do this is demuxing the MP3 files with e.g. VirtualDubMod and then join them with a MP3 joiner. (or perhaps VirtualDubMod can do it too... i'm not sure.)

in any case, it should not be necessary to resample the audio i think. Only if the *real* sampling rates are different. AVISynth is not meant for simple joining as it will require a re-encode.