Sometime you want to join a couple of files to be 1 file. You can do that really easy in Ubuntu or any Linux. But in this case i will show in Ubuntu only, since my pc is using Ubuntu. You can join files with “cat” command. What file type can be joined with this command? Well as far as i know you can join text files, audio files and video files. haven’t tried for other files like ISO files. If you tried it and successed please let me know by leave the comment.
Well “cat” command is really useful. I used it a lot for joining text files. But for now i want to show you how to join audio files or video files. Here is the command format:
cat file1 file2 file3 > joinedfile
Example of joining audio files:
cat audio1.mp3 audio2.mp3 > compiled.mp3
Example of joining video files:
cat video1.mpg video2.mpg > compiled.mpg
Please be careful if you joining a large file, it will take many resource and make your system freeze. So please make sure your resources is enough. You can how to use “cat” command by type
PS: you can join video files by using mencoder too, here is the example:
mencoder -oac copy -o joined.mpeg movie1.mpeg movie2.mpeg
Thanks a lot…. that really works 🙁
Man, this was really helpful.
Thanks so much 😀 I was about to use audacity to do that, but this is much more fast!
glad to hear that my post help you.
This is nonsense. Using cat (concatenation) for audio and/or video files doesn't work because the header at the start isn't modified and only specifies the length of the first audio/video file. Therefore, with a audio player that respects this header (mplayer/audacity) this will not work, and most likely even corrupt the file because it's data section doesn't match the given header. Anyone using cat for this is risking corrupt output files.
Well, this work for me. have you try it?
I tried it, and it didn't work
It doesn’t work. I tried it too. Just like the previous comment said. It’s bullshit because the start and end information isn’t correct. I open the concatenated file and all I get is the last video instead of all the videos.
It doesnt work for .wma files. The output is the last file in inputs
I have a couple of video files .MOD that concatenated into one it worked for me on my system.
It`s interesting. The power of streams in unix > < but not always is so simply…
I tried it and it didn't work.
It's true that join the files, the output file size is a sum of other sizes, but only reproduce one part of these files, and the total time it's show incorrectly
Cat – join files, but not format correctly the video params in output file….
Really so simple. As i am new to ubuntu and if I can do then be sure everyone can do the enjoyable thing. Its really so fast.
Thanx again for this article 🙂
WTF. Stop spewing nonsense and ignorance. This "hack" may work in media files with same bitrate. But not all files can be binary concatenated and still have a valid data stream.
Ivan, any chance you know how I can install Linux on my Samsung Tab S7 Plus tablet? There is apparently no available AOSP de-googled Android OS available and wanted to ask if you know of any way to install Linux distros on Samsung Tabs?