Development
Keeping Up With Kdenlive
Kdenlive is a non-linear editor and digital video workstation, similar in design to a digital audio workstation such as Ardour or Qtractor. In an audio workstation, segments of recorded sound are arranged and edited in a layout of individual tracks. Kdenlive works in the same way with video data. You can record directly into the program, transfer video data from an external device, and load video files from disk or over a network. Basic editing operations include cut/copy/paste, trim, crop, and so forth. Internal processing functions and external plugins can be invoked to apply corrective functions and special effects, and the final rendering stage offers a variety of target formats. Other features include titling functions, image sequencing, audio manipulation, and DVD production utilities.This article presents Kdenlive from my perspective as a casual but serious user; that is, I compile the program myself, I work with it frequently, but my demands on its capabilities are relatively light. I use Kdenlive to make simple video productions from clips from my shows and from experimental audio/visual works created with Jean-Pierre Lemoine's AVSynthesis. As I'll detail later, I've also been using Kdenlive as a stand-alone creative environment. My productions aren't especially fancy, but they do illustrate the basic actions described here.
Prerequisites
Like other Linux video editors, Kdenlive relies on a foundation of prior
work. Its primary dependency is the Media Lovin'
Toolkit (MLT), a production framework for streamlining the task of
programming multimedia applications. MLT itself depends on the FFmpeg software for many of
its video services. For the complete Kdenlive experience you'll also need
the Xine media playback
system, the RecordMyDesktop
software, and the QImage module
from Qt4. The whole list is an impressive suite of libraries and
utilities. Combine that suite with a clearly organized Qt4 GUI, and behold,
you have Kdenlive.
Incidentally, Kdenlive programmer Dan Dennedy is involved with developing and maintaining some of those other projects. Dan is a member of the Kdenlive and MLT development crews; his involvement with both projects helps to ensure their compatibility and to keep them up to date. I'm sure it also gives him an edge as the chief Kdenlive bug fixer (his job description on the Contributors page).
Retrieve, compile, install
Kdenlive can be found in all mainstream Linux distribution software repositories, so check with your package manager to see if a version is available for your system. However, even if your distribution provides Kdenlive it may be an out-of-date version — the current public release is version 0.9.2 — or it may exhibit problematic behavior due to the changing nature of some of its dependencies. If you choose to compile Kdenlive you have some options to consider first. You can download and build from a source tarball, or you can clone and compile from Kdenlive's Git source repository. However, in either case you are responsible for the installation of Kdenlive's dependencies, a non-trivial matter (see the Installing Required Libraries page for more information).
Fortunately, developers Mads Dydensborg and Dan Dennedy have written a shell script (build-kdenlive.sh) that will compile the current Kdenlive source code along with the source code for its more mercurial dependencies (i.e. FFmpeg and friends). You can read about the details of the script and its use in a thread on compiling Kdenlive for AVLinux. The script appears to be system-agnostic — I use it to build Kdenlive on machines running Debian Squeeze, Ubuntu 10.04, and 64-bit Arch — and it can be customized easily if needed. I must emphasize that the script builds what it finds on-line. If a dependency's current codebase is buggy then your Kdenlive binary is likely to be buggy too. The script takes a while to run, and, if it stops before completion, it will issue an error message, typically regarding a missing external dependency. Install the missing package, re-start the script, be patient, and eventually you'll have an up-to-date and stable Kdenlive.
The whole environment is "sandboxed", i.e. its binaries and libraries are not installed. You run your newly-minted version with the start-kdenlive command in the date-stamped directory at ~/kdenlive. Here's how I do it :
cd /home/dave/kdenlive/20120915 ./start-kdenlive
The start-up script knows where to find everything it needs to successfully invoke your new Kdenlive.
I've been using the script for a few months, and I've had only two notable issues with its builds. Unfortunately both issues were show-stoppers. I reported them to the Kdenlive Mantis bug tracker, and within twenty-four hours the problems had been resolved by Kdenlive's main developer Jean-Baptiste Mardelle. I always keep a previously working version, so I lost no productivity, but I was impressed by the quick resolutions. Advice to all Kdenlive users: report problems to the bug tracker, don't just mention them on the forums. Kdenlive will leave a crash report that can help its programmers locate the source of a problem, and running the program with the --gdb debugging option generates a full back-trace easily copied to a Mantis report.
In this article, my descriptions and screenshots apply only to versions of Kdenlive compiled from the build script. The script pulls the Kdenlive source code from the current source repository and may include fixes and features not yet available in the public releases. As of September 15 it builds MLT version 0.8.3 and Kdenlive version 0.9.3.
Learning Kdenlive
The Kdenlive user's manual is a work in progress and thus a bit uneven. Some sections are quite detailed while others are lacking any entry at all. It definitely provides some assistance to the beginner, but once you've moved on to the next level you'll want more knowledge about more aspects of the program. Fortunately Kdenlive's users have been busy creating their own documentation projects, posting tutorials, demonstrations, and creative works on sites such as YouTube and Vimeo. And of course the forums at Kdenlive.org are always open for discussion of anything about Kdenlive.
In my opinion the best way to learn about Kdenlive is to dive into it and start playing. Create a test project, import some files, and start working with the tools. Spend some time learning the environment before starting any serious work. Import and arrange some clips in the track display, test-drive a few video effects processors, check out the view and zoom options. Record a clip from your webcam. Get to know the place.
Earlier I mentioned that I've been using Kdenlive as a stand-alone creative
environment. A very cool "online resources" feature opens connections to the
free media databases at Freesound
(for audio files), the Internet
Archive (for video footage), and OpenClipArt.org (for images). If you're
at a loss for something to do in Kdenlive, right-click anywhere in the
Project Tree panel, open the Online Resources dialog (shown on the right),
and search
those sites with whatever descriptors you can imagine. This feature makes
Kdenlive more than a well-stocked toolkit for video production - it invites
and inspires creativity, always a welcome feature in software designed for
the artistic spirit.
Regarding cameras and codecs
The Kdenlive web site maintains a list of compatible cameras and other video devices. The program will try to identify a default input device, but you may need to make further adjustments for a best fit. For example, Kdenlive recognized my laptop's integrated camera, but its default settings prevented successful video capture. I discovered that FFmpeg doesn't like the device's default frame rate, so I edited that value (in Kdenlive) to one I knew was valid for my camera and FFmpeg. Voila, the camera now records without complaint from Kdenlive.
I also have an old Samsung miniDV camera that is supported by Kdenlive. I can record directly into the program from the camera, or I can transfer previously recorded material. Support is also available for cameras capable of recording in the HDV and AVCHD high-definition formats, though AVCHD compatibility is not yet guaranteed. See the Supported Audio & Video Formats page on the Kdenlive Web site for more information supported cameras and camcorders.
A video codec is a piece of software that compresses and decompresses a stream of video data. The various video formats require specific codecs. Because there are many formats, there are many codecs, and Kdenlive wants its share. Fortunately, it's not a huge share — twelve are required and should be included in your distribution's package repositories. My work requires no esoteric or proprietary codecs, and so far I've had no trouble loading and saving videos in AVI, MPEG, FLV, and other common formats.
By the way, Kdenlive also supports a number of common audio file types, including the MP3, Ogg Vorbis, and WAV formats. When recording you can choose to include an audio track, but users should note that results may vary with the recording device. Audio is badly aligned when I record from the webcam, while I have no such problem when recording from the midiDV camera. Fortunately, Kdenlive includes a few tools for audio correction; you should be able to realign audio and video tracks with only a little effort.
Titling, text, and other random tips and tricks
Kdenlive's titling module is a helpful and flexible tool. The
standard controls are present — font selection, text sizing and colors,
outlining, placement, etc. — along with control over the title text
rotation and the clip's duration. By default, a title clip includes a
composite transition that allows transparency of the titles when placed
over another clip. Blur and typewriter effects are available in the title
clip editor, and further processing can be obtained from the effect list. A
title clip can be saved as a template or rendered as a video clip for later
use. For example, I made a virtual finale reel from a title clip with text,
an added soundtrack, scratchlines and other "old movie" effects, and a
brief video quote at the end. You can view the results at The Fin on my YouTube channel.
The effect list dialog includes a "dynamic text" item in the "misc" submenu. I assumed that it placed user-specified text at keyframe breakpoints, but it appears not to work in that manner. I'll continue to investigate its operation. The "overlay" transition provides another text effect for the transparent combination of text over video clips and image sequences. The transition is easy to apply; there are no parameters except the selected target track, and it works well.
It's easy to create a video from a sequence of still images. Select an image, place it in a video track, then use the clip's length handle to stretch it to the desired time. You can also add video effects and transitions to your image sequences, including the popular Ken Burns effect used to create a sense of animation in an image sequence.
Kdenlive supports the frei0r
video plugins and the LADSPA audio
processors, thus greatly expanding the program's power. Effects are chosen
from the effect list and edited, muted, reordered, or deleted in the "Effect
Stack" panel (left). Many effects are keyframeable, meaning that you
can create a control curve to automate an effect parameter, just like it's
done in a digital audio workstation. Kdenlive's keyframe implementation
includes excellent tools
to add precisely measured values at precise locations in a clip. To the
right, you can see the control curve described by the parameters in
the panel on the left. By
the way, the order of effects is important, so if you think one is behaving
oddly move it up or down in the stack.
Audio support in Kdenlive is basic but definitely useful. Alas, there's no support for the JACK audio server. It is possible to run the program with JACK but the configuration is a bit tricky. In my opinion, until Kdenlive offers direct support for JACK you're better off with PulseAudio or plain ALSA for the duration of your session. Kdenlive also provides a call-out to a user-specified audio editor, Audacity by default. Select the "Edit Clip" item from the "Project" menu to invoke the editor. The call-out works fine, but as far as I could tell Kdenlive does not auto-update an altered file, even after I selected Reload Clip. I'm probably missing something obvious and shall await enlightenment.
Sending it forward
When you're satisfied with your work it's time to save your session and
select a render target. Click on the big red "Render" button to open the render
dialog for choosing your work's destination format and its
output parameters. Kdenlive provides a good batch of presets, but none of
the parameter values are set in stone, so feel free to change them as
needed. The length of time required for rendering will vary according to
the format selected — a lossless format will take considerably more time
than a base-quality YouTube target, and of course the file size will
reflect its quality. Given a possibly lengthy render time, you might want to
render draft-quality work in a lower-quality format and reserve the higher
resolution for your later revisions.
Outro
I hope you've enjoyed this rather random ramble through Kdenlive. Of course there's much more to the program than I've been able to describe here. My use case is basic, and I've yet to explore many of Kdenlive's other interesting features. However, for my purposes Kdenlive meets and exceeds my expectations from a non-linear editor/digital video workstation. Call it a non-linear editor or a digital video workstation, in my opinion Kdenlive is an excellent environment for Linux desktop video production.
Brief items
Quote of the week
Cinnamon 1.6 released
Version 1.6 of the Cinnamon desktop has been released. It includes a number of workspace improvements, a new window "quick-list," better notification tracking, an improved sound applet, and more. "Cinnamon will eventually handle all visible layers of the Gnome desktop and provide an integrated experience, not only in terms of window and workspace management, but also in terms of file browsing, configuration and desktop presentation. Cinnamon 1.6 comes with tight integration for Nemo and a brand new backgrounds selection screen."
FFADO 2.1.0 released
FFADO is a set of user-space drivers for FireWire-attached audio devices. The newly-announced 2.1.0 release adds better support for the current Linux FireWire stack, better JACK integration, udev support, and, of course, support for a lot of new devices.
Newsletters and articles
Development newsletters from the last week
- Caml Weekly News (September 18)
- What's cooking in git.git (September 14)
- What's cooking in git.git (September 17)
- Mozilla Hacks Weekly (September 13)
- OpenStack Community Newsletter (September 14)
- Perl Weekly (September 17)
- PostgreSQL Weekly News (September 16)
- Ruby Weekly (September 13)
Experimental animation and video techniques in Linux (Linux Journal)
The Linux Journal reviews various interesting video animation tools. "So, why tell you about a bizarre-looking application that hasn't been updated in years when there are plenty of other video editors for Linux? Well, for all ZS4's graphical quirks, it can accomplish some very interesting compositing effects."
An update on the KDE-powered Vivaldi tablet
Aaron Seigo posted an update on the Vivaldi tablet project, with good news on the long search for a hardware provider that will comply with the GPL, despite several setbacks. "I dug more and the combination of seeing that the tablet space is still very much open (with all sorts of speculation about Android's position in it, Apple's ability to keep a death grip on the space, the rise of Amazons and others, etc..) and the reaffirmation that if we don't make open devices who will, I feel it is more important than ever to keep going.
" Pau Garcia i Quiles has a different take on the news, asking why KDE needs to base the product on an alternative Linux stack at all — when it could be adapted to run directly on Android instead.
Refactoring KWin's OpenGL support
Martin Graesslin has posted a detailed account of his recent work on KWin's OpenGL compositor, including separating OpenGL 1.0 and OpenGL 2.0 support, and a refactor that can use EGL as the backend on X, rather than GLX. "The change also nicely grouped all the OpenGL 1 code into one area which will be easier to remove once we decide that the End of Life is reached. Removing code is not as easy as one might expect and that is actually quite a project.
"
Page editor: Nathan Willis
Next page:
Announcements>>