Kdenlive 0.9.2: Some Idle Thoughts

I'm putting together a video that is intended to be an assembly of short clips pasted one after the other. Basically, this is going to be an exercise in categorization and re-ordering. As a result of the work I've done so far, I have some comments.

My raw footage is taken with a stationary camera pointed at a scene where events happen (I'm being intentionally vague here because I'm still not sure if it's going to be worth uploading to the net or not). I want to reorder those events according to their type so that events of a similar type are edited together.

My work flow so far has been as follows: I add the raw video as a clip to the project tree. I play the video and watch it. As events happen, I press the '*' (asterisk) key to drop a Quick Marker on the clip monitor. Once the entire video has played out, I go back to the beginning and, using ALT-Left-arrow and ALT-Right-arrow, seek to each marker, decide what type of event just happened, then give the marker a proper name that describes the type of event ("Collision", "Explosion", "Oh The Humanity", etc.). Once all the markers are categorized, I'll sort them by type and then append them to the timeline to create the final video.

And it's here that I've got some comments.

First of all, when I press the '*' to drop a Quick Marker, the marker is actually dropped at a point about 1.5 seconds in the future, rather than at the frame appearing at that moment. You can even see the little red marker appear ahead of the seek arrow as the clip is playing. I've been working around this, but it's rather annoying (although it does lead one to want a feature of the form, "Drop Quick Marker at Current Position +- Some Time Constant." (My raw footage is 720p MP4/H.264 files from a consumer-grade Samsung camera.)

The other, rather larger annoyance is that I can't search on marker text. In fact, I can't quite work out what the search feature (keystroke '/') actually does at all. I'm planning on working around this by opening the .kdenlive file in an editor and doing the search in there (yuck!). In an ideal universe, I would be able to search markers for particular text, have all the matching results show up in a pane or window, and be able to click on the matching entries which will take me to that position in the corresponding clip. Once there, I could set In and Out points to create a Zone, and append that Zone to the timeline.

Finally, the program seems to leak memory. My machine has "only" 2 GiB of RAM, and as I use the program, I see gkrellm's memory meter creeping up and up until the program starts getting a little flaky. Most of my activity so far has been seeking around inside the clip preview window, skipping forward and backward a lot, and creating and deleting markers.

This will be the second time I've used Kdenlive for a non-trivial project. It comported itself relatively well the last time (far better than Cinelerra), so I'm interested in seeing it continue to improve.

Hi ewhac,

I've actually never used markers before, but your point about 1.5 seconds approx added to the end seems to also apply to a selected zone in the timeline. I often render out sections of a clip for stabilizing and I seem to have an unselected second or so added to the end.

I also have a problem with memory usage, like you. The other day, it wiped out 8GB + 2 GB swap and closing down Kdenlive replaced it. I've had an update of Kdenlive recently but haven't checked that out yet.

I did an experiment this evening to see how cut zones were represented in the .kdenlive file. I was considering writing a quickie Perl script to parse out all the markers and generate a series of cut zones, each one second in duration, starting at marker point. So I created two cut zones, saved the project back out, and found this:

<kdenlive_producer audio_max="1" id="3" pix_fmt="yuv420p" default_video="0" cutzones="342-426-Glance;450-477-Basket" fps="59.940060" name="HDV_0036.MP4" zone_out="477" colorspace="709" videocodec="H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10" resource="/vidwork/ewhac/vids/HDV_0036.MP4" default_audio="1" audiocodec="Advanced Audio Coding" duration="16980" file_hash="3ee125a29a9bd48a2471d4d10178fa3b" aspect_ratio="1.000000" channels="2" frequency="48000" video_max="0" progressive="1" type="3" zone_in="450" frame_size="1280x720" file_size="858587136"/>

ZOMFG, this is awful! Why did you choose to bury this inside the kdenlive_producer element, rather than breaking it out into a sub-element? I am by no means an XML expert, but wouldn't it have made more sense to do something like this:

<kdenlive_producer ...>
  <zone name="Glance" start="342" length="84"/>
  <zone name="Basket" start="450" length="27"/>

Or, if you wanted to be more pedantic:

<kdenlive_producer ...>
  <zone units="frames">
  <zone units="frames">

Just thinking out loud...

Okay, more comments. This one is easy enough that you can follow along at home.

I want to synchronize events in the video to beat points in the music. Given that I'm all marker-happy just now, my idea was to drop markers where the beat points are in the music, and align the video clips to those. However, given my previous experience with markers landing in the wrong place, I ran a couple of experiments.

I created a new project and added a single MP3 as a clip. This particular tune has a very regular beat that you can see in the waveform thumbnail. In the clip monitor, I set the music playing, and started tapping regularly on the '*' key in time to the music. It was immediately obvious that this wasn't going to work, as the markers kept getting placed about a 1.5 seconds in the future on the clip time bar.

"Okay," thinks I, "Maybe the clip bar is too coarse, and I have to use Guides on the timeline." I dragged the MP3 to the timeline and watched the waveform thumbnail appear. I then set the music playing and started tapping on the '*' key again to drop Guides in the timeline.

At first, it looked like this worked -- the Guides were appearing exactly at the cursor location. However, on closer inspection, the guides were not lining up with the beat points in the waveform. I wondered if the UI updates were lagging "reality" and ran a few more experiments.

As near as I can figure out, when you begin dropping Guides in this way, the Guides land almost exactly on the beat points in the waveform for the first few seconds, but then the Guides and the waveform start to drift. To verify this, I laid down guides for about a minute in time to the music. Then I seeked back to about 20 seconds from the beginning, restarted the tune from there, and laid down guides again. The new guides landed in different locations from the first set. If everything was in sync, the new guide should have landed on or very near to the original set. Instead, they were almost exactly 180 degrees out of phase. (The new guides closely lined up with the waveform at that point.)

If the guides were landing in the wrong location by a fixed amount, then I could just slide the audio track until the waveform matched up with the guides. This, on the other hand makes guides useless after the first few seconds. So either the waveform thumbnail is lying, or the cursor is not actually moving in sync to the music. Where's Kdenlive getting its timing data from? What is it I'm actually seeing here?