What tool can be used to join several video files?

I have a bunch of .avi video files made with my camera, and I would like
to join them. Perhaps remove little pieces.

I had a look at avidemux, but it does not seem to serve for the purpose.

I have never done this, so I have no idea what to use.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

openshot
don’t use it myself but friends do and love it

There are many ways to join files. A lot depends on the files’ data structure and also on the presentation that you want.

Do you want transitions between the videos ?

Do the videos all have identical format ?

I find the easiest way is to simply drag and drop into kdenlive, but one does need to spend a few minutes to learn how to use the kdenlive software. But there are video tutorials in youtube and also on the kdenlive web site explaning this. Tutorials | Kdenlive Its all pretty simple.

Now having the typed the above (preference for ‘kdenlive’) if the files bit rates, codecs, resolution … etc are all identical (and that is essential) then one can even use cat !!


cat video1.avi video2.avi > combinedvideo.avi

Some users also recommend to rebuild the video file index after combining with cat, with something like:


mencoder -forceidx -oac copy -ovc copy infile.avi -o outfile.avi

IMHO using cat gives an ugly presentation with no transitions - but each to their own.

I’ve read users who use mencoder to combile videos with:


mencoder -oav copy -ovc copy -o output.avi file1.avi file2.avi

but I have never tried that myself - so I can not vouch for it functioning.

Another post I read give the synatax as


mencoder -ovc copy -oac copy file1.avi file2.avi -o output.avi 

But I have not tested this.

Again, I simply find it easy to dag and drop with kdenlive, given that I have learned a bit about the software.

On 2013-02-13 15:56, caf4926 wrote:
>
> openshot
> don’t use it myself but friends do and love it

Just tried it and does just what I want, thanks. Has a few quirks,
though, like not saving export preferences.

I still don’t know how to do a simple transition.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 2013-02-13 19:06, oldcpu wrote:
>
> There are many ways to join files. A lot depends on the files’ data
> structure and also on the presentation that you want.
>
> Do you want transitions between the videos ?

Not necessarily. My clips are short, seconds, so inserting even a simple
fade to black removes seconds from the clip that I do not want to waste.
In fact, what I’m doing is separate each clip from the next about a
second (ie, a second of full black).

> Do the videos all have identical format ?

Yes, they are all shot with the same Samsung pocket camera:


> SAM_0774.AVI:     RIFF (little-endian) data, AVI, 640 x 480, 30.00 fps, video: Motion JPEG, audio: uncompressed PCM (mono, 22050 Hz)

I think there is another command that gives better info about a video
stream, but I forget which.

I find the easiest way is to simply drag and drop into kdenlive, but
one does need to spend a few minutes to learn how to use the kdenlive
software. But there are video tutorials in youtube and also on the
kdenlive web site explaning this. ‘Tutorials | Kdenlive’
(http://www.kdenlive.org/tutorial) Its all pretty simple.

I have just tried kdenlive, after reading your post. Very nice program.

By default, the generated file was way bigger than that made by
openshot, but this can be reversed if I drop the bitrate from 8000 to
4000. I don’t really know how to calculate a suitable value. Trial and
error?

Now having the typed the above (preference for ‘kdenlive’) if the files
bit rates, codecs, resolution … etc are all identical (and that is
essential) then one can even use cat !!

WHAT? I have to try that. :-))

Code:

cat video1.avi video2.avi > combinedvideo.avi


Mmm. Xine doesn’t bite, it only plays the first video of the
combination. Same with mplayer. Let’s try reindexing

Some users also recommend to rebuild the video file index after
combining with cat, with something like:

Code:

mencoder -forceidx -oac copy -ovc copy infile.avi -o outfile.avi


Yes, now the combination plays to the end, but the sound seems broken.
It is an interesting experiment, but it doesn’t work right.

And anyway, I need to compress the clips, what the pocket camera
generates is too big.

IMHO using cat gives an ugly presentation with no transitions - but
each to their own.

It is interesting.

I’ve read users who use mencoder to combile videos with:

Code:

mencoder -oav copy -ovc copy -o output.avi file1.avi file2.avi


but I have never tried that myself - so I can not vouch for it
functioning.

Let me try. Hum, no, gives error:


-oav is not an MEncoder option

Ah, I see your next post with another combination. That produces an out
file, but with indexing broken, the slider in xine jumps back and forth.
It is interesting, though.

I would have to try several combinations of mencoder, read the man
pages, try compression options… It would have an advantage for me, as
what I want is simply to join several clips in one.

But so far the GUIs are easier :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

By default I find many video tools have a high setting on bit rate.
It’s pointless I think, to set the bit rate higher than the Original source.
So first establish the Original rate. I find this particularly true when using Devede.
The same may apply to your situation @robin_listas

Further to caf4926’s comment … I find sometimes before I work combining videos (especially those that come from a camera), I am curious to learn abit about the videos before I start working with them. I like to use an application that the packman packagers package for openSUSE, which is mediainfo - with the Packman packaged openSUSE version here. I confess I have never used the GUI for it. I prefer to open a konsole and type:


mediainfo videofile.avi

On 2013-02-14 07:36, oldcpu wrote:
>
> Further to caf4926’s comment … I find sometimes before I work
> combining videos (especially those that come from a camera), I am
> curious to learn abit about the videos before I start working with them.
> I like to use an application that the packman packagers package for
> openSUSE, which is ‘mediainfo’ (http://mediainfo.sourceforge.net/en) -
> with the ‘Packman packaged openSUSE version here’
> (http://packman.links2linux.org/package/mediainfo). I confess I have
> never used the GUI for it. I prefer to open a konsole and type:
>
> Code:
> --------------------
>
> mediainfo videofile.avi
>
> --------------------

I was going to ask precisely about that, how to get the bit rate of the
original video :slight_smile:

I think I have used some ffmpeg incantation to get the info in the past,
but I always forget which. I did not found it yesterday.


cer@Telcontar:~/Pictures/2013/02/Cabo Cope> mediainfo SAM_0774.AVI
General
Complete name                            : SAM_0774.AVI
Format                                   : AVI
Format/Info                              : Audio Video Interleave
File size                                : 17.7 MiB
Duration                                 : 11s 600ms
Overall bit rate                         : 12.8 Mbps

Video
ID                                       : 0
Format                                   : JPEG
Codec ID                                 : MJPG
Duration                                 : 11s 600ms
Bit rate                                 : 12.4 Mbps
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate                               : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 1.348
Stream size                              : 17.2 MiB (97%)

Audio
ID                                       : 1
Format                                   : PCM
Format settings, Endianness              : Little
Format settings, Sign                    : Signed
Codec ID                                 : 1
Duration                                 : 11s 585ms
Bit rate mode                            : Constant
Bit rate                                 : 352.8 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 22.05 KHz
Bit depth                                : 16 bits
Stream size                              : 499 KiB (3%)
Interleave, duration                     : 33 ms (1.00 video frame)


The bitrate reported of “12.4 Mbps” is a bit confusing when compared of
the typical values of about 10000 in kdenlive. Ah, I see… mediainfo
says I’m econding there at “4 002 Kbps”. Different units.

Also important, I suppose, is that the original codec is MJPG instead of
xvid or MPEG-4 I use.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

I use iDealshare VideoGo to join several video files or audio files into one which supports all kinds of video and audio formats like MP4, AVI, MPEG, MPG, VOB, MOV, RM, RMVB, 3GP, ASF, WMV, WTV, DVR, DivX, Xvid, M4V, MKV, FLV, F4V, SWF, WebM, OGV, Apple ProRes, AVCHD, MTS, M2TS, M2T, MXF, MVI, DAT, MOD, TOD, MPV, OGM, MP3, WAV, WMA, M4A, FLAC, M4B, AAC, AC3, APE, AIFF, Apple Lossless ALAC, VOC, QCP, AMR, AWB, DTS, AU, RA, OGG and etc

And it has both Windows version and Mac version.

Step by step guide at How to Join Video Files on Mac or Windows?

Almost two years ago, I asked:

On 2013-02-13 14:03, Carlos E. R. wrote:
> I have a bunch of .avi video files made with my camera, and I would like
> to join them. Perhaps remove little pieces.

And one suggestion was to use ‘cat’:

On 2013-02-13 19:06, oldcpu wrote:

> Now having the typed the above (preference for ‘kdenlive’) if the files
> bit rates, codecs, resolution … etc are all identical (and that is
> essential) then one can even use cat !!
>
> Code:
> --------------------
>
> cat video1.avi video2.avi > combinedvideo.avi
>
> --------------------

which at the time did not succeed with the videos from my camera (same
format, thus).

However, I tried again with the videos from my “multimedia center”,
which are streams broadcasted by digital TV stations (TDTV), in mpeg
format. And these work fine with a plain cat!


cat video1.mpg video2.mpg > combinedvideo.mpg

And as I do a conversion to avi, and further compression, with ffmpeg,
indexing is correct. There is a small glitch at the “joint”, like losing
sync for a second, that’s all.

Nice :slight_smile:

The other tools that worked with my camera videos seem less suitable
this time.

Maybe whether ‘cat’ works depends on the format of the videos.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)