Log in

View Full Version : Joining to .avi (xvid) files... trouble!


Fmazzanti
17th December 2004, 07:51
Hi all,

I have 2 avi files which are xvid plus mp3 128Kbps. I try to join them to a single file with no luck.
I've tried to do so with virtualdub but it complains about the two files not having the same data format. Which is not true: both are xvid with mp3 128Kbs. The only problem is that the first is 1160Kbps and the second is 1650Kbps. I've tried to convert the former to 1650Kbps but then virtualdub says 'error statsfile not found' and I am at a loss... what can I do then?

best regards,

Ferran.

Ark
17th December 2004, 09:30
use Avisynth:

v1=Avisource("C:\.....\your-first-Xvid-video")
v2=Avisource("C:\.....\your-second-Xvid-video")
return v1+v2

then feed that script to Virtualdub et voilą!

Leak
17th December 2004, 10:58
Originally posted by Ark
use Avisynth:

v1=Avisource("C:\.....\your-first-Xvid-video")
v2=Avisource("C:\.....\your-second-Xvid-video")
return v1+v2

then feed that script to Virtualdub et voilą!

I somehow doubt that he wanted to re-encode the audio and video to join the files...

celtic_druid
17th December 2004, 12:12
If you used the DSynth mod though... might be more tolerant than VDub.

yaz
17th December 2004, 12:35
try to join them w/avimuxgui. if mp3 is vbr i'd remux them one by one before. should work.
the bests
y

Fmazzanti
18th December 2004, 01:06
Hi again,

well i don't care if it takes a little bit to process the thing in Virtualdub... I'm trying the Avisynth way and 2 files at about 600Mb each joint to something of... 12Gb!! What's going on here?
I'm no expert a virtualdub, so what I did was simply to copy the script you posted and feed it to Virtualdub via Ctrl-O. Then I pressed F7 to save it as an .avi file and I got this 12Gb stuff, which is no good. What can I do then?

And how do I use avimucgui to join 2 files?

Best wishes and many thanks,

Ferran.

jon.schaffer
18th December 2004, 01:27
Maybe the sound tracks are really different (e.g. one is 44000 Hz, while the other is 48000 Hz; or a VBR and a CBR ones...)

Nevermind... here's what I would do:
you should extract one by one the soundtracks to 2 wave files (AUDIO -> DIRECT STREAM COPY then FILE -> SAVE WAVE). These audio files then needs to be joint with another program (I think some ones can joint without re-encoding, but I'm not sure). Or at least, you open it in a sound editor program (e.g. Nero Wave Editor), you join them and then re-encode to a MP3 file (yes, I know - not a very good thing, but...)
If these 2 files are indeed different,then open them separetely and save them separately to WAVE files and then join these WAVE files...
Last: use mpa2wav to change the .mp3 to a valid mp3 encoded WAVE file (.wav)

In the other side: save separately the 2 videos without sound (AUDIO -> NO AUDIO and VIDEO -> DIRECT STREAM COPY) to 2 "muted" AVI files.
Then, open and append these 2 new files and save them to a new one.

THEN (at last...): open the new one-piece video and the new one-piece sound (.wav, mp3 endoded) and save this (DIRECT STREAM COPY in both AUDIO and VIDEO menus)

THE END



Hope this helps...

Jon

Fmazzanti
18th December 2004, 01:52
Sorry but the 2 audios are 128Kbps mp3 hich are identical. I guess the problem is with the videos: one is 1160Kbps and the other 1665Kbps, according to Virtualdub info. When I try to append the second no-audio video file to the first no-audio video file, once again complains these have different formats and refuse to merge them...
This is giving me the headache :(

jon.schaffer
18th December 2004, 16:43
OK, let's forget the soundtrack...

Originally posted by Fmazzanti
I'm trying the Avisynth way and 2 files at about 600Mb each joint to something of... 12Gb!! What's going on here?

It's because you have to re-encode the content after having opened it via AviSynth (VirtualDub doesn't see it like a XviD anymore, but like an "uncompressed" YV12-video). So, if youn use AviSynth, then re-encode the video (VIDEO -> Fast Recompress; VIDEO -> compression; Choose Xvid and choose appropriate settings...)

Maybe the problem is that the 2 videos have been encoded with different versions of XviD (which would not be impossible as there have been many builds avalaible). I don't know a program exists that is able to see the exact version of the codec used (more information than the 4CC...).

Another method I would try: re-encode directly and separately each video to XviD and then join the newly encoded videos...

Oh, a last question: are the 2 videos exactly the same resolution? (I guess yes since you tried AviSynth with success... but...)

Jon

Poutnik
18th December 2004, 16:44
To Fmazzanti: Are you sure both ones have identical (exact) fps and audio sampling rate (in case of mp3 maybe irrelevant)? These ones are often slightly changed (e.g. 0.05% ) because of a/v sync. (AFAIK)

celtic_druid
18th December 2004, 17:03
AVISynth wouldn't let you do v1+v2 if the framerates were different unless you did assumefps or similar first.

Both GSpot and MPEG4Modifer can tell you the XviD bitstream version (if present).

jon.schaffer
18th December 2004, 17:54
Originally posted by celtic_druid
Both GSpot and MPEG4Modifer can tell you the XviD bitstream version (if present).
Where can it be found? I can only see the 4cc and the codec name...
Do not all versions of XviD store the bitstream version?

celtic_druid
18th December 2004, 18:18
Old builds didn't, there is a thread around here someplace that outlines the bitstream version and versions/dates.

You would need a recent version of GSpot then it can be seen in the userdata field.