Log in

View Full Version : Append segment AVI & MP3 VBR


Sigmatador
13th June 2003, 23:28
I need to append 2 Xvid/Mp3vbr avi files.
of course the both videos stream have the same resolution/framerate/codec
and the both audio streams the same samplerate/number of channel/codec.

but virtualdubmod (latest CVS) can't append because "the audio streams have different data formats".

is there a way to append this file without demuxing the audio streams and append them separatly with besweet ? (i have 2*27 appending to do...)

alexnoe
15th June 2003, 19:54
AVI-Mux GUI

Sigmatador
16th June 2003, 13:47
oki thx ^^

but i used a temporary ogm container to append the files and it's ok..

verabgd
23rd June 2003, 16:55
@Sigmatador

but i used a temporary ogm container to append the files and it's ok.

Can you explain this procedure or give the link to appropriate guide/help/FAQ, although I have DivX, not Xvid files?

Thank you in advance.

@ alexnoe

I didn’t succeed to concatenate two DivX AVI files with VBR audio although I read your web site carefully. I always finish with selected video file (1 or 2) with both selected audio streams !?

What you mean with “oder files” (order files?) in “mark video source file (oder files, if you want to concatenate several AVI files to one) and click "add video source" ?

Thanks.

alexnoe
23rd June 2003, 17:08
arf :(
When writing the english page, I just copied the german one and rewrote it sentence by sentence.

Obviously, I forgot to translate one word.... "oder" = "or". I'll fix it .

Select both files (ctrl + left click) and press "add video source".

verabgd
23rd June 2003, 17:32
Thanks a lot!

It's working now :)

Your AVIMux really solved my big problem - how to join multiple DivX AVI files with VBR MP3 audio.

Thanks again.

alexnoe
23rd June 2003, 17:35
You can join as many files as you want, as long as their frame rate is always the same (however, if there are too many, the audio might get off sync. I've once tried to join 22 episodes of Buffy into one file, and the result was off sync...)

Sigmatador
24th June 2003, 13:53
@verabgd
oops i forgot my post.
-convert the first avi file to an ogm file
-convert the second avi file to an ogm file
-append the both ogm file
-convert the ogm file to an avi file.


too late to use avimux_gui, all my files are appended :D
i'll will use it the next time

verabgd
24th June 2003, 16:06
@Sigmatador

Thanks for the reply.

I've just tried this method but unfortunately the second file is out of synch.

Thanks anyway - I'll read more about OGM container.

Sigmatador
24th June 2003, 22:30
if the avi file is out of sync, you could stay with the ogm one, if it works fine...

is the AViMux_Gui methode ok ? (no audio sync issue ?)

verabgd
26th June 2003, 10:24
is the AViMux_Gui methode ok ? (no audio sync issue ?)

Yes, it is quite OK, quick and easy to use. I've joined about 10 files up to now (one is about 12 min. long or approx. 150 MB - DivX5.05 AVI) and everything is OK, there is no audio sync problem.

Suiryc
26th June 2003, 14:16
Well I guess the main problem that could happen is if the audio stream end earlier than the video, then the next appended segments will likely to be out-of-sync (in AVI or OGM).

alexnoe
26th June 2003, 15:31
This can be compensated for, but I haven't implemented such a kind of compensation yet.

Basicly, it would mean that the beginning of each file would have to get a delay, which is equal to the difference between audio and video length of the preceding file.

Suiryc
26th June 2003, 22:06
Yeah but I don't think it would work for CBR streams (maybe for MP3 VBR by inserting 0-byte chunks - if it's possible for the audio of course).
It's also a problem for OGM because it uses a granulepos (Ogg) that is supposed to be the number of samples the file contains so far. You can try to play a bit with it but I don't know what does OggDS when it encounters a gap in the granulepos.

alexnoe
26th June 2003, 22:09
I don't speak about inserting 0 - Chunks.

That would be more than a crappy hack...any attempt to do this should automatically cause a format c: !

I speak about duplicating the beginning of the stream, as it is done when inserting a delay (that's why I wrote 'insert a delay')

Suiryc
26th June 2003, 22:16
I don't speak about inserting 0 - Chunks.

That would be more than a crappy hack...any attempt to do this should automatically cause a format c: !
:)

I speak about duplicating the beginning of the stream, as it is done when inserting a delay (that's why I wrote 'insert a delay')
Oh I see.
But that could lead to inserting broken frames when it is for a format you don't handle (like if you would copy the first bytes of an AC3 stream to create this delay without caring about the frame boundaries). Also maybe in this case the decoder will just skip those data as it would do with corrupted ones (making the operation useless) ?

alexnoe
26th June 2003, 22:38
I would certainly not insert broken frames. What do you think is the MP3-CBR frame mode in AVI-Mux GUI ;)

For any other formats than MP3, AC3 and DTS, the granularity values in the AVI headers are used in a senseful way, so that you can always ensure correct audio frames :D without knowing the format.