Srini's Point of View

My thoughts on technology, food and other fancies…

Join multiple mpg files into one file

I did not realize how easy it is to join mpeg files with just the windows copy command or unix cat command.

On windows the trick is to copy the files while preserving the binary format. Here is how you would do it -

copy files1.mpg /b + files2.mpg /b joinedfile.mpg

You could also do the following if the files are named consecutively

copy file*.mpg /b joinedfile.mpg

On UNIX it couldn’t be any simpler..

cat file1.mpg file2.mpg > joinedfile.mpg

or

cat file*.mpg > joinedfile.mpg

Comments