Friday, May 1, 2009

Kdenlive: Breakthrough in Linux Video Editing

In my view, it has for a number of years now been the greatest failing of Linux: video editors have been a joke. No one who is serious about video editing could really be happy in the least with the sorry state of non-linear video editing apps. There have been some decent entry-level standard def programs, such as Kino. If you were masochistic enough to play along with the quirks and straight-jacketed file format limitations of Cinelerra, well, you could spend many happy months trying to get that to work. Sure there are some nice conversion utilities like Avidemux and Handbrake and (for you command line lovers) ffmpeg and mencoder. And high definition? Well, please just forget about it, unless you really like self-torture and inevitable failure and aggavation. Trying to edit 24p HDV in Cinelerra? Been there, done that, and have very little hair left for my trouble.

The depressing truth was: any of a number of sub-$100 mid-level NLE's for Windows or Mac such as Adobe Premier Elements or Ulead Studio or Pinnacle would run circles around anything available on Linux. And the other rock in my sandal was that, for all the advances of virtualization and Wine, there's no way an NLE will run at decent speed in a VM or on Wine. Video is just way too demanding. So it was dual booting or keeping around a completely separate (and fairly highly spec'ed) Windows or Mac machine. Not happy.

I personally have always felt that I can't recommend Linux to a lot of people because of the lack of a decent video solution. You can't expect normal non-geeks to dual boot or keep two computers.

Kdenlive

Well, I'm happy to report that our forty years in the desert for the Linux video faithful is coming to an end. Thanks to the developers of Kdenlive, as of version 0.7.3, video on Linux is no longer a joke. This is Free software, GPL, and it's impressive. Kdenlive is poised to take it's place with Blender, the Gimp, Inkscape, Audacity, and Scribus as the essential creative apps on any Linux desktop.

Now let's be clear what we're talking about: the full version of Adobe Premiere or Avid Media Composer or Apple Final Cut Pro are not quite in Kdenlive's sights just yet. But few people really need all of that firepower. Good mid-level editors can do a great deal these days, and have enough bells and whistles and effects and corrections to make most people happy, and that's really what's been a huge gaping hole in the Linux quiver.

Let's get to the truly impressive thing right away: it's almost shocking how modest the hardware requirements are for Kdenlive. You can edit not only SD, but HD - real, tough HD like AVCHD codec out of the latest solid state cameras - on a decent dual core machine. I'm not talking about proxy files, I mean direct editing. That's pretty astonishing. In this way, believe it or not, the Linux solution may actually trump that of Windows or Mac. I found that on Windows XP with Adobe Premier Pro 7, my dual core Athlon 64 just really wouldn't cut it. With footage out of a Canon HF100, one of the most popular of recent AVCHD camcorders, I could not view footage in acceptable frame rates to edit comfortably. I had to move to an Intel quad core to got acceptable responsiveness. But with Kdenlive, I'm back on Ubuntu 9.04 Jaunty with my 3 year old dual core, editing AVCHD happily.

Now, I'm not saying that Kdenlive is quite the equal of my previous favorite NLE, said Premiere Elements. That app is quite polished and mature and stable. Kdenlive is not quite at that level yet. But it has a lot going for it. A beautiful clean modern interface, a decent and growing set of effects, as many tracks as you want of audio or video, and pretty incredible input and output format support.

So what's lacking? The DVD menu's and the titler function are pretty bare bones. There's no function to record a voice over while editing. Cut edits can't be set to automatically slide the following clips backwards on the timeline, you have to take an extra step and do that manually. At this point it doesn't seem to be possible to composite a title over multiple tracks. Judging by the rapid rate of current development however, I would guess that these and a few other little failings will be remedied shortly in future updates. And in the best tradition of Free software development, it's incredibly easy to chat with the actual developers and submit feature requests.

On the other hand, there are actually some things that, like the aforementioned advantages on modest hardware, seem to outstrip the proprietary solutions. Another such advance is the separate render pipeline. You can actually set up a render - or multiple renders - and then go back to editing. On all the proprietary editors I've tried, your app is completely tied up during render - which can take hours for a longer movie. But in Kdenlive you can set up multiple renders at once and then leave the machine to do them all. Say you want a full resolution file for local playback, and a smaller or shorter version for YouTube or Vimeo. Just set up the renders and come back when they're all done. You can change your mind and stop one render while the others continue. (I'm doing two while I write this.) This is some very slick work indeed.

The reason Kdenlive has come together at this point is really thanks not only to the Kdenlive devs, but also to key advances in other projects. In true open source Gnu Linux fashion, these projects effectively divvy up the extraordinary complexity of dealing with digital video: ffmpeg, which handles all of the format and codec matters, as well as MLT, the Inigo renderer, libdv, QImage, and lets not forget the KDE toolkits that serve as the basis for the user interface. (But don't worry, the app runs just fine on Gnome without adding a huge number of KDE libs.)

Another prerequisite to get the kind of performance I'm talking about on a mere dual core machine: you'll want to make sure you have a recent, decent Nvidia graphics card, as well as the latest proprietary nvidia drivers in the 180.xx series or later with all VDPAU libs as well. A large part of the success of HD editing (and playback for that matter) is due to an advance in the Nvidia drivers and graphics API called VDPAU. This offloads much of the video processing to the video card. Very smart. Not all video software has been re-written to take advantage of VDPAU by any means. But Kdenlive, ffmpeg, and mplayer all have recent builds that allow fairly modest machines, even singe cores, to, for instance, play back HD 1080 video in H.264 codec full-screen. (You might even be able to get away with a single core, though rendering/encoding would be quite slow. VDPAU only works with playback, not encoding.)

There have been some hiccups along the way, as I can attest to having followed the development builds for a couple of years now. But as of May of 2009, things are finally coming together. Kdenlive 0.7.3 is very much worth checking out, though with the brand new version of Ubuntu just come out and lots of changes to all the dependencies and to Kdenlive itself, there are some packaging and install and stability issues remaining. But new releases have been coming every couple of months, and the remaining bugs are being knocked down with admirable persistence. I would say that by the next release 0.7.4 most of these packaging difficulties should be ironed out. If you're editing HDV or SD video, I think you'll be extremely happy now. For those of us with AVCHD cameras, editing is generally solid in my experience, but the odd glitch remains.

So go download Kdenlive and give it a run. While you're doing so, marvel at one more thing: the entire packages of Kdenlive, it's dependencies, and the frei0r effects package all add up to a mere 19MB. You read that right: nineteen megabytes. Kdenlive starts up in five seconds on my dual core. (Adobe Premiere Element occupies a minimum of 300MB on disc and takes 35 seconds to start on a Vista quad core.) Really makes you understand how ridiculously bloated commercial software has gotten to be.

And spread the word: video editing for Linux with Free software is finally here.