Kdenlive Part 2: Advanced Editing Technique

No readers like this yet.
open source button on keyboard


In the previous article in this series, we reviewed the different methods of importing footage into Kdenlive, best practises in organizing project files, and the layout and tools provided by Kdenlive. In this article, we will discuss advanced editing techniques and review most of the tools you'll be using on a day to day basis as a video editor.

Read the other parts in this series: Part 1: Introduction to Kdenlive
Part 3: Effects and transitions
Part 4: Coior correction
Part 5: All about audio
Part 6: Workflow and conclusion

A Brief History of the Editing Workflow

The initial edit of a movie is called a "Rough Assembly", and it literally consists of each take of each scene, from "Action!" to "Cut", lined up in a row on the timeline, in scripted order, one after another. The rough assembly might last for hours and is really just a good way to review all the footage available.

After this basic edit, a new cut is created, and it is called, simply, the "first cut". It's usually based around the master shot; a wide shot that encompasses all of the action of the scene as it appears in the screenplay. Close-ups, two-shots, and cut-aways are then added to a higher video track so that the end result is one continuous scene, with insert shots of more detailed actions and reactions. This edit is revised into a second cut, and the process continues from first cut to an editor's cut, a director's cut, and a producer's (or "final") cut.

This model might not be imposed on you, depending on your industry but its logic still applies and can help you organize the sometimes monumental task of making hours upon hours of footage into presentable content that people will appreciate sitting through.

The Rough Assembly is often done as described in the previous article; add a clip to the Project Tree, load the clip into the Clip Monitor, mark an In and Out point, and then add the clip to the timeline. Rinse and repeat.

This same technique may be used for the first cut, but after that many people find it impractical to work out of the clip monitor and choose instead to refine their edits in the timeline directly.

Editing in the Timeline

After your shots are all lined up in the timeline, you will find the need to adjust their in and out points. This can be done in three different ways:

The best way to refine an edit point of a clip in Kdenlive is to place your playhead on the frame you wish to cut in or out on. For instance, if a character is blinking in their close-up just as you cut away from them but the next shot has their eyes wide open, then you'll probably want to trim off a few frames before you cut. That is, you'll cut out earlier, such that their eyes are open before and after the cut. It's basic continuity.

Place your playhead on a frame where the characters eye's are open, and then make sure that Snapping is On (Timeline Menu > Snapping). Snapping, like in any graphic program, causes edges of objects to "magnetically" pull toward one another. Snapping is a feature that you'll find yourself turning on and off very frequently, so I generally assign it a handy keyboard shortcut. I use the completely arbitrary Control-D, simply because I find that my left hand is always on the keyboard as I edit with the mouse in my right hand. But you can choose anything (the n key seems a popular choice with graphic apps and other video editors, but that's never seemed convenient to me). Assign the shortcut by going to the Setting Menu > Configure Shortcuts.

With the Select Tool (s) roll over the nearest edge of the video region. It should highlight itself with a flashing green arrow. Click and drag this video region to the left, and you've just adjusted the out point of your edit with frame-precision. A more efficient variation on this is to place the playhead on a frame and then use Shift-R to place a splice in the region. Then select the excess footage and delete it as desired. And one more step toward maximum efficiency is doing the same action with two clicks and one keypress only: position the playhead on a frame, select the clip, and hit the "1" key on your keyboard and the in point of that clip will be sent to the position of the playhead. Alternately, you can hit "2" for the out point to be repoisitioned at the playhead. It's a very convenient and fast way to adjust the ends of your clips and is one of my favourite features in Kdenlive.

modifying in and out points in the timeline

If it's not frame-precision that you need, you can opt to use the Razor Tool, which currently does not respect snapping. This makes the Razor Tool good for initial cutting, when you know that you like a shot but need it to be, more or less, half as long; grab the Razor Tool (x) and click on the video region at the point you wish to slice. A splice mark should appear and new thumbnails will be generated on the video region to demonstrate that it has been divided into two sections.

The final way of adjusting the length of a video region is precise but inelegant. If you double-click on a video region, you'll get a pop-up dialog box allowing you to modify the clip's position in the timeline, the clip's in and out points, and so on. Not only should you not require a dialog box for this action, there is also no way to quickly input the new values; you must select each portion of the SMPTE timecode, type in the new values, move to the next field, and so on. If you absolutely need to cut off, for instance, 6 frames from the beginning of a clip, then this might be a nice and exact way to do that, but aside from that it's impractical and clunky.

Keep in mind that the workspace resolution counts a lot when seeking frame precision. If you're zoomed out from your timeline so far that it is only able to account for every 10 frames or so, then any tool is going to snap to the nearest 10th frame. When you're so deep into your edit that every frame counts, zoom in on the region you're about to cut, and make sure you're cutting on the frames you think you're cutting on.

Audio Splits and Grouping Clips

Since most modern video devices also incidentally capture sound, most of the video clips you import into a project will have an audio stream in them. By default, Kdenlive displays this audio stream as a part of the video stream; you'll see a video region with its thumbnails overlaid with thumbnail representations of the audio stream's soundwaves.

If you've recorded to a separate audio device, you can keep the audio embedded in the video as reference sound, and you can turn it off by clicking the Mute Track button in the track label on the left.

muting audio

If this is your primary audio track, on the other hand, you might want to separate it from the video region so that you can manipulate it separately. To do this, you can do one of two things:

  1. Right-click on the video region and select Split Audio.

    separate audio streams from video streams with a click!

  2. Set this as a default action by clicking the "Separate Audio and Video Automatically" button on the lower right of the bottom timeline control panel.

    automagically split audio and video streams

After you split the audio from the video region, you have regions on two tracks now: a Video Track and an Audio Track. The two regions are grouped together (indicated by yellow clip colour with blue space spanning any extra tracks between them). This means that if you shorten or lengthen one, then the other will also be shortened or lengthened. If you move one, the other moves, and so on.

Sometimes that's exactly what you want. Other times, you want to manipulate them separately; a classic example would be when doing the classic over-the-shoulder conversation scene; a close-up on one character intercut with the close-up coverage of the other. One each character's close-up, you want to use the audio associated with that clip, but if at one point you want to do an insert shot of a character's silent reaction, then you wouldn't want to cut their audio track, but allow the other character to continue talking offscreen even though the focus is on the silent character.

using audio from one clip under the video of another

For this to work, you'll need to ungroup the clips. You can do this by right-clicking on the clip and selecting Ungroup, or using the keyboard shortcut (Control-Shift-G). This removes the invisible link between the audio and video, allowing you to, for example, cut and remove a piece of the video without affecting the audio.

You can always group clips together by selecting clips (use the Select Tool while holding down the Control key to add to your seletion) and right-click on them or use Control-G to choose Group Clips.

Basic Navigation in the Timeline

If you're spending your weeks in the timeline, you'll want to know a more efficient way of navigating it. There are all the usual video editing conventions in Kdenlive, albeit with some variation in keyboard assignments.

The now classic and ubiquitous "jkl" keyboard sequence is also present in Kdenlive. To play your timeline, you may press "l" once for standard speed, "ll" for double speed, "lll" for triple speed. "K" stops playback. Press "j" for reverse playback, "jj" for double speed reverse, and "jjj" for triple speed reverse.

You can also move by frame or by second. The left or right arrow will advance or rewind by one frame; shift-leftArrow or shift-rightArrow will move forward or back by one second.

To move your playhead to the beginning of a video region, use the Home key; for the end of the region, use End.

To move along the timeline by splices, use Alt-leftArrow or Alt-rightArrow. And finally, you can jump to the beginning or end of the Timeline with control-Home or control-End.

By using these navigational tools, you'll find that for very long stretches of video editing, you won't need to bother with your mouse, which, as any Unix guru knows, is the real key to efficiency.

Notes on Video Formats

Video editing is a fairly intensive process, so for best results you will want to have a nice, powerful video editing computer with plenty of CPU cores, plenty of RAM, and a nice GPU with a robust and reliable video driver. That said, it is possible to edit on even a modest laptop, mostly depending on what kind of footage you're trying to edit.

Regardless of what you're editing, consider the format of the video you're using. If you've just imported a muxed video file then more than likely you'll want to transcode it for editing. My main workstation at the studio where I work can easily handle HD footage yet I continually run into stuttered playback when I import muxed footage. If i transcode it to a high-quality lossless matroska file or to something similar, I can edit it smoothly and quickly.

The opposite end of the spectrum sometimes has the same issues, in an odd way. Some phones and portable devices record video in such a highly compressed format that Kdenlive is forced to spends far too much energy decoding it to something that can be played back at a normal frame rate. I avoid this the same way; transcoding early in the project's life and leaving the compressed or muxed footage as backup source files.

To do this, go to the File Menu and select Transcode Clips. Select the clip you want to transcode, choose what profile you wish to transcode into (Lossless Matroska is quite nice although depending on the source footage it may be overkill). Make sure the "Add to Project" box is checked, and then commence with transcoding. Note that for the transcoding process, an ffmpeg command is provided; if you have hours and hours of transcoding to do, feel free to steal the ffmpeg command and do the transcoding as a BASH script in a terminal.

transcode video as needed and automatically add it to your project tree

For example, to transcode a folder of .MTS muxed video to something more easily managed by Kdenlive, open a terminal and navigate to the folder containing the source files. You may issue your command as:

$ for i in *.MTS; do $(ffmpeg paste-the-kdenlive-command-here); done

This will cycle through each MTS file in the directory, run it through the ffmpeg command, and save it in the same directory without affecting the original file. To safeguard against even accidental file clobbering, you could establish a folder called "transcoded" and make sure that the final argument in the Kdenlive ffmpeg script is ./transcoded/%1.mov rather than its default of just %1.mov

What codec you use when transcoding will depend on the project and its intended destination. If you require full quality for maximum output potential, then you should probably transcode to Lossless Matroska. If you feel confident that the video is destined for a limited distribution at a fixed maximum resolution, you might choose to transcode to DNxHD 720p or whatever resolution would be appropriate for the destination. Never transcode to something that will lose information before you edit; leave that for the final render and compression.

To further reduce strain on the computer system, Kdenlive has a built-in proxy (or "offline" in traditional editing terminology) system but I have found it unreliable so far. In theory, you should be able to establish proxy clips by enabling proxies in the Project Settings, and then by right-clicking on the clip in the Project Tree and setting it to generate and use a proxy. Unforunately, the proxy generation has crashed every time I've tried it, so I've been unable to utilize this feature as yet.

Keep in mind that whatever footage you place in your timeline is occupying RAM. If you attempt to edit a one-track 30 minute project, then you'll find that your computer (provided it can handle the video format itself) will perform quite well. Start adding new tracks, compositing, two hours of footage in the timeline, and your computer will start to feel like it's working harder. Keep this in mind when constructing your projects. Don't hesitate to split a very complex project into separate Kdenlive project files, and edit on a scene by scene basis until you're ready to string your project together into a complete piece. This technique will be detailed in the final article of this series.


Kdenlive's editing tools provide functional and efficient editing options, as well as flexibility to suit your individual workstyle. Feel free to modify and customize your environment as much as you want, and try out the different tools to see what provides you with the most precise and satisfactory results.

Seth Kenlon
Seth Kenlon is a UNIX geek, free culture advocate, independent multimedia artist, and D&D nerd. He has worked in the film and computing industry, often at the same time.


Wow! this is a great series. THANK YOU, so helpful :D

Thanks! stay tuned for the following four articles!

Agreed. Nice to see a Linux editor used and discussed in detail by someone who knows what they are doing.

Hang on now, I didn't say I knew what I was doing ;^)

Any idea if Kendlive will handle a .mod codec? My school has a bunch of Cannon FS200 cameras that shoot a .mod codec with a .moi info file. It seems to crash every editing program I've tried with the exception of imovie and final cut. Most of our machines are pc, so the cameras are a bit useless.

I don't have access to a Canon FS200 but as far as I know, .mod files are just mpeg2 files. I've had good experiences with Ffmpeg and MLT and Mpeg2, so I would give it a go. I'd love to hear back if you find that it does or does not work.

I have found that most of the cameras are very particular about how you get the files from the media to the computer. So my advice is to take the entire directory structure from the camera when moving your files to the computer. Then open up Kdenlive and either use Add Clips to try to add one of the video files to the project, or failing that, try using File > Transcode and get the clip into an uncompressed .mkv file (I use huffYUV+PCM with really good results).

Let me know how it goes!

Thanks for the article. I'm still learning video editing, this helps a lot.

Thanks, Sarah. The more you practise, the easier it gets (and better the results, usually). Just keep telling yourself "Mistakes = levelup"

Do you have any knowledge of how to get around the following situation:

I've created some slideshow sequences in Imagination which I export as Ogg Theora at 640x480, but there's no control over the frame rate so they come out at 30fps. I mix them into my Kdenlive project, where the other files are mostly digital camera clips at 640x480 25fps. Problem is that on rendering the entire project at 25fps, the frame rate reduction seems to merely clip every n/th frame and leaves the slideshow sequences looking stuttered.

I've tried transcoding the files in Kdenlive to MKV, and had a look at doing it separately in Avidemux, but that won't successfully import either Ogg or FLV files exported from Imagination. Is there another third party tool or a process within Kdenlive that can solve the issue?

And I'd echo the previous comment: "Nice to see a Linux editor used and discussed in detail by someone who knows what they are doing."

I don't do many slideshows, but I threw a quick test together in Imagination and exported it as Theora, and while I can't swear I saw exactly what you were seeing (but then, my test slideshow was a quick, thrown-together mess of a slideshow; quite possibly I didn't notice the stuttered playback because it only took me 15 seconds to throw it together), I think you should try this:

1. Open a terminal.
2. Where "myGreatSlideshow.ogv" is the slideshow in question:

ffmpeg -i /path/to/myGreatSlideshow.ogv -r 25 /path/to/myGreatSlide25fps.ogv

3. Import the new slideshow into kdenlive and see if that makes a difference.

Like I said, I couldn't really tell one way or the other, at least from my initial tests. I might try to do some frame counting later today and see if I can see what you are seeing. In the meantime, try the above ffmpeg fix and see what happens. Please do let me know!

Thanks for replying. I tried what you suggested but unfortunately I can only describe the ffmpeg output file as ghastly! Horribly pixelated for one thing but moreover it seems to have clipped every n/th frame, only in a much more severe way than Kdenlive does internally. I had tried Avidemux before because I read that it employed a blending technique for the frame reduction.

I received a friendly response from the Imagination developer who says that an option for 25fps export has been added to the SVN version, but all my attempts to obtain and install this version have failed. It requires some libraries as dependencies that appear to be unavailable for my distro.

You might not notice the jumpiness on your own slideshow in Imagination according to the exact content and options employed. I previously did other slideshows for a Kdenlive project which didn't come out too bad, seemingly because the pan/zoom speed and transitions chosen were slower.

One thing I haven't experimented with is rendering the whole video at 30fps instead, though I suspect that'll cause similar issues on the footage that was at 25fps originally. Will try that next.

Proxies should work now in 0.8.2, so in most cases you don't have to transcode (and therefore loose quality) anymore.
Also got to second that: "Nice to see a Linux editor used and discussed in detail by someone who knows what they are doing."
Great articles so far!

Great news, thanks!

Another great write up. Would just like to mention that using transcoding from h264 AVC in mov containers to lossless matoska ie: huffyuv in an mkv is not a lossless operation. Due to ffmpegs mishandling of the mov container. Best to either use proxies or remux mov to mkv then transcode.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License.