Saturday, January 19, 2008

video editing in linux

I had some old camcorder videos that I wanted to digitize/transfer to DVD and distribute to family. I borrowed an ATI USB 2.0 TV wonder gadget from a friend and unfortunately was stuck with windoze to capture the streams. After capturing all the videos, I switched back to linux to start chopping up the files as appropriate. This is where it got tough.

I captured to MPEG-2 and simply wanted to split videos at specific times. With AVI files it's easy, just use avisplit which I believe is part of the transcode package. MPEG2 isn't quite as simple. I was hoping to simply load a video into a program, scroll to the split point, mark it and tell the program to split at the nearest I-frame, without re-encoding the file.

So, I soon found Cinelerra, Kino, Avidemux and Kdenlive. A quick search showed that Cinelerra and Kino are both complex, so I started with Kdenlive which was said to be super simple - and it seemed overly complicated as well to me. And it quickly became apparent that it'd want to re-encode my files. So I switched to avidemux - it was great for scrolling through files and finding the split points. However, it wanted to re-encode my files as well :(

More googling pointed me to mpgtx - a command line MPEG toolbox. Perfect. I used avidemux to locate all the split points in all the files, put them into a script file that would call mpgsplit as appropriate. I thought I had this in the bag until I started playing back the files and noticed the split points were just wrong in some files. Ugh. No idea why.

Ok, more searching leads me to GOPchop, which installs but crashes - says my MPEG-2 files have incorrect headers and I-frames. Next is GOPdit. Ok, very simple, but effective. Had to make sure the pereferences were setup. This tool is good, but could use some more effective keyboard shortcuts and editing tools. But for the most part it seemed to work.

Notable mentions include ProjectX which is supposed to be good for fixing up the MPEG-2 files that capture devices often hack up. Didn't manage to get it installed, but may still be of use when I get to 8mm projector files. Also, Lives is supposed to be another good program, but it's not in the repositories either.

Lastly, another good site I am going to mention for searching for linux equivalents of windoze programs: http://www.linuxalt.com/