Assuming that the AVI files are of the same dimensions, frame rates, codecs etc.. I could strip the header from the second file and append the first file with it. Then I would re-write the header of the first file, probably just altering the number of frames, would this work![]()
![]()
+ Reply to Thread
Results 1 to 6 of 6
-
-
It should work, but I have never tried it (yet). It can depend on the avi file itself, as AVI is just a container for videos with different codecs. Maybe some codecs add something like a timestamp for frames or GOPs, this may cause problems with the mentioned method.
GUI for dvdauthor:
https://www.videohelp.com/~gfd/ -
As there are sepearte tools (e.g. VirtualDub) who are capable of joining, somebody must have programmed them. It's obviously not a problem.
-
..but mh2360 wants to do this through code, that he wants to create
as a tool, I think..that's why he posted here in the
Programmers area
I used to think the same thing.., that it *should* be easy. But, it
turned out to be more dificult than what it seems. But, in time,
and with some studying, one can figure it all out, and cook up a
tool to do it.., provided some rules are followed ...
If you really want to get into AVI meat, look for a file called:
* vfw.h (or vfw.c) --- C/C++
* vfw.pas ------------ Pascal (delphi) code
* vfw.bas ------------ VB (visual basic)
IMO, it would probably be best to first understand how a BITMAP is
put together, because BITMAP's are the basic building blocks for
an image/video. (One day soon, I hope to come up with my own codec,
to add to the many that are already out there, but its just pretty
slow for me, because I have many other things to attend to)
If you study the vfw.pas (and find some good *short* code examples
on putting together AVI's from scratch, you could figure out how to
do it in shorter code, and use a more *direct* approach in your goal
of creating a util to "join" AVI files.
But, for now, here is something to look at, to get an idea of how an
AVI is put together, and also might show you why its not so easy at
first glance.
.
Below, is a snip from a FAQ I found some time ago. Later, you can do
some additional google searching for more info and knowledge. There's
tons of info. But, the problem is in *understanding* all the code snips
that are floating around. C/C++ is the hardest to understand. But,
there are a lot of info for Pascal (delphi) code snip that is a bit
more easy to digest (still tough for me though)
From an AVI.FAQ file I found on the web some time ago.
----- -- ----- -- ---------- -- ----- -- ---------- -- ----- -- ---------- -- ----- --
Code:What is the AVI File Format? AVI Files are a special case of RIFF files. RIFF is the Resource Interchange File Format. RIFF files are built from (1) RIFF Form Header 'RIFF' (4 byte file size) 'xxxx' where 'xxxx' identifies the specialization (or form) of RIFF. 'AVI ' is an example. (2) A Chunk (4 byte ident) (4 byte chunk size) (data) (3) A List 'LIST' (4 byte list size) (4 byte list ident) (data) where the data is comprised of LISTS or CHUNKS. AVI is a specialization or "form" of RIFF, described below. 'RIFF' (4 byte file length) 'AVI ' // file header 'LIST' (4 byte list length) 'hdrl' // list of hdrs for AVI file 'avih' (4 byte chunk size) (data) // AVI header 'LIST' (4 byte list length) 'strl' // stream list 'strh' (4 byte chunk size) (data) // video stream header 'strf' (4 byte chunk size) (data) // video stream format 'LIST' (4 byte list length) 'strl' // stream list 'strh' (4 byte chunk size) (data) // audio stream header 'strf' (4 byte chunk size) (data) // audio stream format (optional junk chunk to align on 2K byte boundary) 'LIST' (4 byte list length) 'movi' // list of movie data one or more ... 'LIST' (4 byte list length) 'rec ' '##wb' (4 byte chunk size) (data)// sound data '##dc' (4 byte chunk size) (data)// video data optional index 'idx1' (4 byte chunk sz) (index data) //index into movie Each 'rec ' list contains the sound data and video data for a single frame in the sound data chunk and the video data chunk. The sound data is typically 8 or 16 bit PCM, stereo or mono, sampled at 11, 22, or 44.1 KHz. The sound is typically uncompressed.
-
use one of
virtual dub
nandub
virtual dub mod
file -> append avi segment to keep adding all the parts
video -> direct stream copy
file -> save as
takes approx 1 minute per hour of video
Similar Threads
-
Joining avi files
By carlmart in forum Video ConversionReplies: 13Last Post: 29th May 2009, 07:35 -
Joining AVI files
By nycdude in forum EditingReplies: 6Last Post: 20th May 2009, 23:03 -
Joining avi files?
By tofuguy in forum EditingReplies: 4Last Post: 7th Oct 2008, 02:30 -
Joining avi files?
By t_jay17 in forum EditingReplies: 5Last Post: 18th Dec 2007, 12:22 -
joining avi files
By king2136 in forum Authoring (DVD)Replies: 4Last Post: 1st Oct 2007, 14:30