Working in 1080p is very unresponsive

Sorry for the long post, but I fear I cannot describe it shorter :)

I am running kdenlive 0.9.5-git20130403 on a 64bit ubuntu 12.04, AMD quadcore @ 2.7 Ghz and 8GB of RAM.

In my current project I use stills ( 8MP up to 18MP ) and movie clips (1080p and 1080i) to create a movie of my last trip to new zealand. I have appx. 1000 stills and 250 movie clips to be added to the final edit. The project setting is for output to 1080p @ 25fps.

With this setup I have several problems:

1.) I have now added ~200 stills/movie clips and kdenlive will constantly use up my memory after a while of editing ( > 5.6 GB after 1 hr work) which will cause the system to swap once I start rendering out ( melt using up to 3 GB) in my current setting. Also the loading time for the project is already very long. I am forced to split the project into several sub projects and do a final edit from the parts, which is not really very convenient.
Are there any tips on how to tackle this problem ?

2.) This is the one which bothers me most: When working with the setting of 1080p@25fps the playback is slow. For the clips and stills alone without any effects it is at ~ 15fps but as soon as transistions and effects ( most notably pan and zoom) are used the frame rate drops to 1-3 fps and sometimes even below that. Even with the realtime setting checked I do not get any usable feedback about the timing and needed editing of the movie. It is mostly guesswork and the turnaorund cycles via rendering are very long.

If I reduce the project settings to 1/4 (480x270@25fps) I manage to get a realtime display almost throughout the project. Working with this setting helps tremendously.

Now the problem is, that I cannot simply switch the project back to 1080p, as all the effects with transformations or cropping are using absolute values, thus ruining all my hard work in setting up the correct transformations (still image clipping, Ken-Burns Effects etc).

I tried all sorts of approaches but never got any settings which gave me a fast playback and a FullHD output.
Right now I have hacked together a dirty program which adjusts the effect settings to the proper values for either the 1080p or the 1/4 settings. This works astongishly well, but directly manipulating the .kdenlive project files is not a good way to deal with this.

Have I overlooked something obvious or is there no support from kdenlive to edit in a low resolution and render it out in a high one ?

Any thoughts and ideas are highly appreciated.

you need to go to the project settings and check the use proxy clips option. then every clip you want to proxy you right click on the clip in the project tree and check use proxy. then wait for it to render.

Proxy clips only work with movie clips and not with still images. And for the most part I have still images to process.

And it seems that not the input format is the main culprit here, but the target resolution. For a test I tried reducing the resolution of some of the source stills and clips ( this mimicks the proxy part) but it didn't get me a real advantage. And as a side effect I lost resolution in the stills, which I sometimes need for very small crops.

I may be wrong, but as I understand it, the source material is brought to the final output resolution and this image data is then fed into the pipeline for the effects and transitions. So even if I use a proxy the final result during editing is still 1080p ?

I have now edited 15 minutes with my hack (reduced project settings and project file directly changed for all the transformation effects) and working with this is very smooth and has increased my productivity hugely.

Wouldn't it be an advantge to work/edit in a reduced resolution and activate the full resolution only for rendering ?

Can you share your 'quick and dirty' hack?
I experience exactly the same problems. I'm working with proxies, but once effects, still images, pan+zoom etc are included I'm essentially editing in the dark, with painfully dragging playback - I have no idea how cuts are flowing, how the music fits, if audio is in sync, and it means I miss lots of simple errors. The only way to know for sure is by rendering out the project/parts of a project which is a huge amount of time to waste when you just want to know if everything's in sync.

Kdenlive 0.9.4
64-bit Ubuntu Studio 12.10
2.4 GHz Core 2 Duo (3.8GB RAM)

No problem sharing the hack. I will do so in the evening once I am back at my compter at home.

The hack is essentially a small c program which reads in a kdenlive project file, searches for each geometry.transformation property of the 'pan and zoom' effect and applies a supplied factor to the x,y,w,h values of all the keyframes. The changed file is output on the console.

I will post the code and some example later, but I really would favour something more 'official'.

As promised, here is the little hack I use to work in a reduced resolution and path the project file's transition effects for the high resolution.

Again, this is an ugly hack !

To build the program just use:

First you should rename the attached file doscale.txt to doscale.c. Then issue the command:

gcc doscale.c -o doscale

which will produce the executable doscale.
usage is: doscale [kdenlive project file] [scale factor]

Create a working project with reduced resolution ( e.g. 480x270 ) and create your edit. Once done use the little tool:

doscale lowres.kdenlive 4 > highres.kdenlive

This will create a new project file 'highres.kdenlive' with 1920x1080.

Or if you already have a highres project do the following:

doscale 0.25 > lowres.kdenlive

which will reduce the project's resolution by 1/4.

!!! Reminder !!! : always backup the original files to prevent any data loss.

thank you very much! I'll try it out.

This sounds like a feature request could be made on Mantis along the lines of "proxy clips for still images". I would think there would be a good chance such a request would get up since higher resolution is what it is all about these days.

I have to correct me about not being able to create proxies for still images. I tried the latest version (0.9.6) and it let me create proxies for these stills as well. Maybe I did something wrong the first times, but now it is definitely working.

The issue with the slow playback still remains though.

As far as I'm aware image proxies has been available for many releases probably back to when video proxies were introduced not just recent builds. The problem as ttguy has mentioned appears to be no control over resolution, putting in 4k stills gives project resolution output in a quick simple test which at 1920x1080 is not ideal although they play fine here.

Feature request really, probably a simple job. As proxy generation already exists.

@mlubich - "Slow playback" - this is in the kdenlive preview right? But your hack fixes it right? So maybe the still image proxies is not really working ?

Image proxies are generated. However putting 4k stills off a DSLR into a 1920x1080 project, 1920x1080 proxies are created. But putting a 1920x1080 image into a 1920x1080 project an image proxy is generated but again it's the full 1920x1080 image, not scaled down lower than project resolution.

So the ability to create proxies at 25%, 50% and 75% of project resolution would be useful.

@yellow: I think the way you describe the proxies is not the way it is in reality :)

The proxies are generated at a reduced size ( the default one is 480x270). You can even change the trancoding command line to fit your needs.

The problem as I see it is that while the proxy is small in resolution and allows for fast seeking and positioning, the extracted frames are scaled according the the project's target resolution. So if you are using 1080p the internal pipeline seems to work with 1080p. This is fine for final rendering, but in my view overkill for internal preview playback.

Just try to use proxies as input in a project set for 1080p. And then stack 3 pan/zoom effects just to have a good slowdown in the preview (in my case I only get ~ 4 fps) . Once you change the projects target resolution to lets say 480/270 I have to adjust the pan/zoom parameters to fit for the new resolution, but then I have 25fps and can even stack more effects on top without losing any framerate.

So the feature request would be to allow for reduced resolution in the _whole_ workflow pipeline for editing and preview and switch to the target resolution only for final rendering or proof viewing.

Does that make any sense ?

I've been using kdenlive for over 4 yrs, you arrive this month and tell me proxies don't work like I think they do? :-)

I'm more than aware of what proxies are and how they are impmemented, I've made numerous posts about making sure one uses proxies for decent playback and that that custom profiles can be made.

So back to my previous post, I'm describing what I see, if I add a 4k image to a 1920x1080 project, create proxies set in project settings and I look in ~/kdenlive/proxies folder then I see a project resolution png proxy of the DSLR 4k image, if I add a 1920x1080 image to the project and generate a proxy I see same 1920x1080 png in the proxy folder. As I said this is not very helpful.

Conclusion, proxies for images appear to go no smaller than project resolution and therefore a feature request for reduced size smaller than project size proxies for images would be good, similar to video proxies where we can set a resolution reduction in a CUSTOM PROXY PROFILE.

Now do I still misunderstand?

Sorry if I offended you in any way, that was by no means my intention.

And I stand corrected about proxies for still images. With these it is the way you described it.

What I was referring at in my previous post was my observation, that my proxies in the proxy folder for video clips were all at 480x270.

And I agree that an option for a custom image proxy profile would be beneficial.

Anyway, my point is not the generation of proxies (anymore), but the used resolution during editing and realtime playback which seems to be the target resolution for the project. And that is what slows down the editing workflow regardless if you are using proxies or not.

The above statement is borne out of my observation with my current projects :). It may be ( and I would welcome it) if my conclusion to my observation is wrong and I just had to activate some settings unknown to me.

Right then, so a feature request for custom size proxies for images is the way to go, as the mechanism in code for image proxies already exists it shouldn't be too time consuming for a dev to implement, which I mentioned previously.

You say that its not proxy generation anymore that is the issue but size of proxies being equal to project resolution, which is funny as that's what I said previously, twice. :-)

As an aside, stacking multiple pan and zooms I'd hazard a guess will still cause issues with playback with proxies. Not sure if the code for pan and zoom is OpenGL but we'll have to wait a while longer for movit GLSL code in MLT to be transferred to kdenlive, then proxies probably won't be needed at all on a reasonable spec'd machine.

Good luck and I hope you can realize your project with kdenlive.

>You say that its not proxy generation anymore that is the issue but size of proxies being equal to project resolution

You understood me wrong, that was not what I was ment to say.

What I was saying is, that I find it a problem that kdenlive seems to process the whole effect pipeline for a frame in the project's target resolution, making no distinction between final render or 'realtime' preview editing work. This results in stuttering preview. And this is done regardless if you are using proxies as input or not. At least that is my obervation.
And that is what my dirty hack is providing for me: working in a reduced resolution and rendering out in the final one.

>Good luck and I hope you can realize your project with kdenlive.
Thank you :). I think I have found a way to tackle this beast of a project and I am now on a good way to finish it sucessfully.

" ...What I was saying is, that I find it a problem that kdenlive seems to process the whole effect pipeline for a frame in the project's target resolution, making no distinction between final render or 'realtime' preview editing work. ..."

That's why proxies exist and why we can playback h264 video sources in realtime because in fact we aren't we're playing back a proxy of it, whether that be mpeg2, mjpeg etc and at half or quarter size. BUT as I mentioned image proxies do exist, are generated but no smaller than project resolution, that's not what you originally said. :-)

Kdenlive also now has settings in the monitor preview to use lower quality interpolation.

In kdenlives config have you chosen to playback using OpenGL, if not you could try that, also if you're not using a proprietary graphics driver you could try it with that addition, it may help.

"....This results in stuttering preview. And this is done regardless if you are using proxies as input or not. At least that is my obervation. And that is what my dirty hack is providing for me: working in a reduced resolution and rendering out in the final one...."

On my old machine I can add DSLR images of 4k resolution, generate 1080P proxies due to project resolution and playback without stuttering, they wouldn't play at full size, its only when adding effects to the project size proxies that stuttering starts.

So for both images and video proxies are created and used for preview playback including when effects are added and only at render time are the full resolution used, this ia all based on project profile that proxies are enabled for anyone else reading.

So to say no kdenlive makes no differation between rendering output and realtime preview based on your stuttering playback observations is the wrong conclusion, its just that image proxies are TOO BIG. :-)

Yes your hack is a work around, but a simple feature request to achieve the same within kdenlive is the way to go, you don't appear to have got on Mantis and done that?

The time we're bickering over this nonesense a dev could probably implemented it. Its laughable. :-)