Log in

View Full Version : How can I join two AVI files with VBR MP3 audio?


zambelli
13th February 2002, 06:45
I have two DivX clips. The video is encoded using the 2-pass VBR mode. The audio is an ABR MP3 stream encoded with Lame (--alt-preset). When I try to join them in VirtualDub or Nandub, the programs complain about different audio sampling rates. I think this is BS because the audio is VBR so it's normal that every frame has a different bitrate. Is there a way to join two DivX AVIs which contain MP3 VBR audio?

zambelli
14th February 2002, 08:22
Please, I really need help with this. How can I join 2 AVI files which both contain VBR MP3 audio streams? Is there any way I can demux the video and audio, join the video together with VirtualDub, join the audio together with binary copy, and then mux them together again?

aleksander
14th February 2002, 08:34
You can get audio using Save Wav (later rename it to .mp3), then just separate audio from video, reencode audio once again at CBR, join with video (or join video first and later audio with it).

Well...most probably you will end-up with your files being unsynched...

aleksander

zambelli
14th February 2002, 23:06
Oh, damn, I didn't realize that VirtualDub/Nandub saved MP3 audio streams as MP3s, rather than as WAVs. The "Save WAV" command is not very clear about that.

OK, this is all much easier now. I have saved MP3s from both files, renamed them to .mp3, and executed the following command:

copy /b file1.mp3+file2.mp3 file.mp3

Then I saved the two AVI file without audio, and loaded the first audio-less AVI, appended the second one to it, loaded the uniform MP3 and saved it as a single file. It works now! This, of course, was done in Nandub because VirtualDub 1.4.8 can't handle VBR MP3s.

rmatei
16th February 2002, 13:37
copy /b file1.mp3+file2.mp3 file.mp3
Damn, that works? Really? Because I know I had this exact problem a couple months ago, and searched for a solution a long time unsuccessfully (one without reencoding). One of the things I tried was the above, and it didn't work, because you end up with the second file's header smack in the middle of the new file. I don't know where I'm going with this, but it just seems very strange that it would work with you.

:confused:

(In theory, one good solution would be to strip the headers from both, do a binary joining, and reconstruct the header, but I didn't find any tools to do that.)