Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have two avi parts of a film. I want to merge them to make one file.
But cat *.avi > complete.avi gives me just trash. If I just cat pt1.avi > complete.avi, complete.avi is fine, but when I cat pt2.avi >> complete.avi I get trash too.
How to fix it?
You can't do this, because I guess you broke the format of the file. example if in each avi the size is stored in the first bytes then putting 1.avi next to 2.avi will not work as the header is still the one of 1.avi.
You need avimerge. A lot of others tool might do this.
Had the same exact problem. I'm recording AVIs with lavrec, and couldn't merge them. I finally used ffmpeg to convert avi to mpg, then
cat 1.mpg 2.mpg worked perfect. The mpgs are a little smaller, too. Good workaround, unless you absolutly have to have AVI format.
Since avi is a container and not a codec it depends if one can use the cat method. It can be used with dv avi files. Also with mpg and vob files. But if you are using the cat method you should also use the mencoder with -forceidx on the end file to rebuild broken index.
Hi, I had the same need, to join several chunk of several videos into one single piece. I tried the commands you mentioned but the result was:
1. avidemux couldn't do it, in fact, I used avidemux to edit the videos and extract the chunks, but when I tried to attached all junks in one single always got the message " master index wrong, rebuild?" then I rebuild it but it was the same, I couldn't merge them.
2. mencoder gave me some errors, maybe because I think this command tried to recode the chunks and then merge them, in fact, I've used the same codecs for video and audio but still I can't get it.
The command that worked for me was: avimerge, it just joins all my chunks in one single, the line is:
Hey thank you for the line to combine chunks of avi files together it worked great with AVIMERGE and it was really fast, only took a few minutes, and I merged 5 files into one. Perfect video, nothing changed, except it converted the 5 chunks into one movie.
Thank you again for your blood sweat and tears, saved me several minutes, and having to go back to Winders to finalize.
Your welcome, as a comment, I was working in a 3D project - using blender of course- and I found several problems with the video editing, I found that the problem was the codec - first I use AVI Raw - that was all the issue, I change to mpeg, render all again and the video editing was really easy, but you know, I wrote this because when you're in a hurry to finish the work and something doesn't work you think in a lot of things, in this case, the codec was important.
Your welcome, as a comment, I was working in a 3D project - using blender of course- and I found several problems with the video editing, I found that the problem was the codec - first I use AVI Raw - that was all the issue, I change to mpeg, render all again and the video editing was really easy, but you know, I wrote this because when you're in a hurry to finish the work and something doesn't work you think in a lot of things, in this case, the codec was important.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.