"Proxy" Clips for HD editing

Hi,

I'm using Kdenlive with clips in 1080P from my camcorder, but previewing is very slow (frames drop, etc.).

So I was wondering if it was possible to use a "proxy" clip (very downscaled), and tell Kdenlive to use it for editing, but keep the 1080P original file for export.

Just an idea ...

 

Cheers.

Hi everyone!

This is my first post in these forums. I've just registered.

I'm planning to use Kdenlive in Ubuntu for video editing (I've been using Vegas Video 9 trial for a month, but I prefer to use open source).

I just want to express my agreement with this statement. Proxy editing is a nice feature for HD video editing. Blender uses it in the Video Sequence Editor, and it works fine.

Greetings!

I would also like to see this feature, especialy because of AVCHD.

I would also like to see proxy editing in Kdenlive.

I'm using 1920-x1080 png-sequences.  I do animation so there's no reason to go to compressed low quality intermediate format. But the downside to this is that Kdenlive is quite slow in handling the files.

Using proxy editing would be a great help here.

I need a proxy too! Actually I have about 50 hours of AVCHD material, which I need to edit "yesterday". Please consider adding a proxy as soon as possible, so I will be able to switch over from "Paymere". I asume you are already working on it right now, so I feel free to thank you in advance for releasing this unpayable feature! Keep up the good work!

Any official word about whether this is gonna be implemented?

Thanks in advance!

For now, you can help by making some attempts or tests. Transcode your clips keeping a file-namimg rule or pattern. Then, edit with the transcoded clips. When done editing, save it as a westley XML file. Next, edit the XML file in a text editor to point to all of the original files. Finally, add the XML file as a clip, put it on the timeline, and and render. Please report your results for others. I expect there will be issues with the positioning in composites.

Hello,

Thanks a lot for the above tip. I used it with a slightly different purpose. I made a project with AVCHD source files. When rendered, there were some issues due to (I think) problems in AVCHD handling in kdenlive. Namely some black frames between clips and some clips replaced by gray screens.

So I batch converted all my AVCHD files to high bitrate MPEG4 files as an intermediate format and I used the procedure you described to re-render my project, which worked great.

Now I want to go further and be able to continue editing the project. In other words, I would like to open the altered XML file for editing in kdenlive and be able to rearrange clips, etc. instead of inserting the XML file as a clip into a new top-level project, which makes it a single big uneditable block.

When I tried to do that, kdenlive crashed. Is it possible to do some more modifications to the XML file to make this happen? I see that it has codec information per clip, and since my clip's codecs changed, I suspect that's what kdenlive is not handling very well...

Eduardo

 Kdenlive can not open MLT XML as a project - that is too raw for its liking at the moment. Instead of saving as a .westley file as I described above, you should try copying/editing the .kdenlive file. I merely suggested using .westley because that is a more concise format - less to edit.

I actually did edit the .kdenlive file. I thought that was what you referred to as a westley file, since it's all in a "westley" html tag.

Do you think it would work if I just remove the codec format tags?

> Do you think it would work if I just remove the codec format tags?

No. I do not know what went wrong. You'd have to try to look at this further and see if you overlooked something. I am sorry, I can not take the time to look at this right now.

I would also be very interested in this. I have Core i7 and a Geforce that supports VDPAU. Without VDPAU seeking an MTS file from my camcorder takes about 5secs. With VDPAU it takes about 4 secs. I even tried to move a test clip to my 4xraid0 array, but that didn't help. I currently have VDPAU enabled and even a bigger problem is that frame-by-frame seeking shows a blank frame after I seek a few frames, so editing is just about impossible. I'll try without VDPAU later if it helps with the "blank frames" problem.

I tried creating symbolic links so that when I edit I have the link pointing to a low quality clip and when rendering it points to the high quality clip, but when I saved the project first with the high quality clips and then tried to load it with low quality clips, kdenlive crashed.

Proxy clips is a very useful feature, and seemingly a seriously needed one for HD editing in kdenlive.

Perhaps there could also be some performance to be gained if kdenlive allowed for a lower resolution preview of HD files?
I know it's not the same but if the bottleneck is on the video card data processing, perhaps it'd help to send less data to it (i.e. lower resolution data of the HD video) for previewing purposes.

Just an idea...

We are currently preparing Kdenlive 0.7.8, so no big changes in the next weeks, but editing with proxy clips is one of the important features I want to implement for Kdenlive 0.8.

good news!
thanks for sharing them with us :)

In the meantime, don't forget to always transcode your AVCHD files to DNxHD. It will take up a lot of disc space (and the time to transcode...), but it edits really fine on a farily recent computer.

The problem with HD video editing isn't so much the high resolution and bitrate, but is mostly just AVCHD decoding issues...

Yes, also interested in this. Subscribing!

Ok, I found this thread today because I was looking to a solution for proxy-editing, too.

I got a simple and maybe foolish idea:

1) right now i am converting three avchd test-files to an mpeg2video stream with high bitrtate

2) Then I will convert them again into the same format bit with very reduced bitrate.

[I will give them the same nametags, saved in different folders]

3) Then i will edit the proxy files, save the project, change the name of the proxy directory, so kdenlive is gonna loose the linking

4) Then I will restore the linking by linking them highbitrate files to the project.

Lets see...

Ok, I can't believe it!

It worked.

Proxyediting test succeded!

With audio- and video-fades and cuts and everything :D

I worked it over a little bit and I have to say: It's the greatest solution for editing on Linux I discovered by now. I am very excited about that.

For my Proxys I chose the following ffmpeg options:

ffmpeg -i test.m2ts -f avi -acodec libmp3lame -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -r 25 -deinterlace -s 480x270 -b 2k test.avi

My "high quality" stream - if you can say so as the original is avchd - looks like:

ffmpeg -i test.m2ts -f avi -acodec libmp3lame -ab 256k -ar 48000 -vcodec mpeg2video -g 5 -r 25 -deinterlace -s 1920x1080 -b 25000k test.avi

As you can see the proxy has lower bitrates and lower resolution providing a really fast editing performance.

To Link the "high quality"-files to the project all you got to do is change the name of the folder you got them saved in into the name of the proxyfolder (same path, so you have got to change the name of the proxyfolder too)

Then render the project!

done

have questions? ask!

btw.:

I just finished editing and rendering a complete Project(37min) many cuts, transitions, etc using above described method and working with proxyfiles.

Besides a little problem with the speed-effect(witch I don't think came from the proxys) I didn't experience any problems.

greetz to all of you.

I tried this, really works :)
Thanks for the howto.

Hi,

That sounds interesting. Thanks also for the settings.

A few questions from a newbie...

Why did you choose mpeg2video codec? (I presume this is best choice).
How big are the HQ files created with this compared to the original AVCHD files?

Gary.

I have 2 remarks :
- DNxHD 36 files are intended to be used as proxies (lower bitrate and quality, but faster loading and decoding). You can replace them by DNxHD 185 (for instance) before rendering. Quality loss should be lower than with mpeg2 files.
- ffmpeg's '-deinterlace' is a very basic deinterlacing filter. It's fast, but is apt to blur video. There are much better ones in other programs (eg. mplayer's yadif+mcdeint). The deinterlace filter has a noticeable impact on video quality.

Good to see a proxy work flow is possible with kdenlive. Thanks OpenHawk.

However I also have a few comments:

The above conversion options I'd suggest are not applicable to all formats. So best that people don't just blindly copy them. Just apply OpenHawks principle.

Why deinterlace, why scale, why transcode original to supposed high quality, is it simply due to the wish to deinterlace?

Take care if anyone adopting this if you have a Canon 5DmkII, 7D or 550D / T2i they actually capture 1088 lines, so applying a scale 1920 1080 will invoke unnecessary scaling, cropbottom -8 should be used instead. The current kdenlive DNxHD transcode options all suffer that. There other minor things that are lost when transcoding, even at high quality, lossless operations,

I have a P4 laptop I'd like to be able to edit on when not at main desktop but even 36mb DNxHD is too much and DNxHD does not allow use of 4:3 PAR sources such as HDV unless scaling is applied, whether that be nearest neighbour, biliner, bicubic, lanczos which on top of deinterlacing is yet another degrading of the original source :-)

So maybe a DV route for HDV material.

@yellow
- Some people want to work with 1280x720 video (proxy or high quality) from 1920x1080 footage ; for them deinterlacing is mandatory. 1080 can be either interlaced or progressive, but 720 is always progressive. So people transcoding their AVCHD footage to DNxHD 90 or 60 (for instance) before editing have to use a deinterlacing filter.
- When working with 1080i footage, it's better IMHO to keep interlacing, and deinterlace only after rendering if it's really needed. If you intend to create a 1080 bluray disc, video has to be interlaced anyway (except for 24 and 23.976 fps).
- You're right that DNxHD is not well suited for 4:3 HDV, since it's designed only for 16:9 DAR with 1:1 PAR. But AFAIK HDV can be edited directly in most editors (unlike AVCHD) so you usually don't have to transcode it before editing. Unless you have to work with old/weak hardware (like your P4 laptop or a netbook), there's usually not a great benefit to use a proxy for HDV.
- DV standard defines a picture size of 720x576 (PAL) or 720x480 (NTSC), it's a SD only format. But if you downsize a video clip from HD to SD, I suppose that you cannot use it as a proxy anymore (it seems to me that proxies must have the same dimensions as the clips used for rendering). So in case you're working with HD footage, DV is not an option, you'd better use DNxHD if your video has 16:9 DAR and your hardware is recent enough, or at worst mjpeg (which is very close to DV compression BTW).

I think one should not loose too much time agonizing how to compress/downscale the proxies, since this has ABSOLUTELY NO INFLUENCE on the quality of the final rendering, which is done from the original clips.

So, just squeeze enough for a fast workflow (DV would be a good choice, for example). Interlaced or not, does not matter. The final render will be done from the original clips anyway.

I you need to do some fine tuning of an effect, which requires high resolution, you can do it in the end, after doing 99% of the edinting on the proxies, just before render, on the original resolution clips.

"- Some people want to work with 1280x720 video (proxy or high quality) from 1920x1080 footage ; for them deinterlacing is mandatory. 1080 can be either interlaced or progressive, but 720 is always progressive. So people transcoding their AVCHD footage to DNxHD 90 or 60 (for instance) before editing have to use a deinterlacing filter."

Exception not the rule. Deinterlace if you have to, so many seem to think interlaced material is somehow defective and that it MUST be deinterlaced, shoot interlaced for slowmo maybe, but otherwise shoot at the delivery size. If 720 is the output then shoot 720 and for something like a DSLR have the option of 60fps progressive, save resources, disk space, back up drive space and ease the NLE realtime effort. :-) But each to their own, it wasn't the purpose of my reply.

" But AFAIK HDV can be edited directly in most editors (unlike AVCHD) so you usually don't have to transcode it before editing. Unless you have to work with old/weak hardware (like your P4 laptop or a netbook), there's usually not a great benefit to use a proxy for HDV."

Depends on the NLE, I struggle to get kdenlive realtime with HDV and a few effects on a dual Xeon, 8GB NVidia 210GT 1GB and a dedicated 7200 h/d. :-)

@marko, no ones talking about deinterlacing / quality in proxy generation :-) Just supposed deinterlaced 'high quality' from original source rather than using the original source, with reference to OpenHawk. So "original source is used anyway" as you say is NOT the case in his case and all I was refering to, not proxys workflow in general :-)

Just saying anyone reading OpenHawks process not blindly copy CLI options that's all. :-)

Sorry, did not detect that the debate went off topic, to pre-processing...

Since I think Kdenlive uses ffmpeg for the final render/encode, what is the point of doing a ffmpeg re-code before it?
Or is it not possible to give Kdenlive arbitrary ffmpeg switches?

Hi!

Just to let you know, I started to implement proxy editing in Kdenlive. The first steps are now committed to svn. In the Kdenlive settings dialog, under "Project defaults", you can enable proxy clips".
Then, when adding a clip to a project, Kdenlive will automatically create a proxy clip in the background (I used OpenHawk's parameters to create the proxy). This proxy clip will be used for editing in Kdenlive, and in the rendering dialog you now have an option to render using proxy clips or original clips.

Some work is still needed, for example to create / load proxy clips for existing projects, and correctly update the project if proxies are enabled / disabled, but if some of you want to test...

hello j-b-m,

nica to know. thanks for the work.

maybe this might help? (saw it on cinelerra-cv mailing list)

http://code.google.com/p/hdffxvrt/

cheers :D

Hi j-b-m!

Always good to hear about progress from one who takes the initiative to make something better *thumbs up*

BTW: my settings weren't meant to be standardized. They just seemed to be fitting for my project. I didn't try your new added feature yet. Is it possible to change the ffmpeg format options used for proxy-rendereing via a dialogue integrated in kdenlive? That would be nice.

greetings,
Benjamin

...perhaps using some of the same presets used for rendering?
or some presets created just for proxy use.

Perhaps it would make sense to use relative sizes, like 1/4 of the original video size? (To avoid 240p footage being scaled up for example :P)

OpenHawk, I don't understand why you transcode your high quality material using a bitrate of 25mb for high quality. This bitrate is used on HDV records, but HDV is 1440x1080i resolution. If I use a 1920x1080i, I have a 33% more pixels. I think I will need a 33,25mb bitrate for this records. Original format is AVCHD 17mb. I need near double bitrate when I recode using an mpeg2 encoder.

If I get my clips at 1920x1080 50p, I have double frames per second. For this, I will need double bitrate (66,50 bitrate), but using last rule, if clips are recorded using AVCHD format whith a 28mb bitrate, I will need double bitrate to recode in mpeg2. In this case, a 56mb bitrate mpeg2 will be sufficent.

Is this right?

- Originals 1920x1080 50p/60p: 56mb on mpeg2 encoder (fron 28mb avchd)
- Originals 1920x1080 25p/30p/24p: 34mb on mpeg2 encoder (from 17mb avchd).
- Originals 1920x1080 50i / 60i: 34mb on mpeg2 encoder (from 17mb avchd).
- Originals 1440x1080 50i /60i: 24mb on mpeg2 encoder (from 12mb avchd).

@ Granjow: it makes sense to me.

New svn proxy commits are great, but would it be possible to have different ffmpeg proxy generating parameters for different project profiles and choice whether to use proxies on a project profile basis? As well as or rather than a single default one for all profiles?

I love the new proxy clips. This is a HUGE help to me. It still needs some tweeking, but I am loving the first step.
Thanks JBM!

I'd really suggest transcoding to a low-complexity, intraframe only, intermediate, codec instead. You can make it encode almost losslessly. See one of the first topics for more details.

Hey all, just giving the proxy editing a crack, looks great. Think I must be doing something wrong through, as I cannot get projects to render with original clips?!

Have added a load of AVCHD clips into a proxy enabled project, default proxy settings. Proxy clips are all rendered great in my home folder (original clips are stored on external drive).

So I dragged a clip on and added a couple of effects, then went to render. I left "Render using proxy clips" unchecked and chose to output to MPEG4 25000k 2 pass.

But, the clip I get is low quality, assuming the proxy clip is being used. I tried checking the "Render using proxy clips" box and rendering again. The resulting file is identical to the first, same size etc.

So, is there something I am doing wrong? Thanks for any help, very much looking forward to this feature, so much quicker than DNxHD conversion etc

Thanks

ahh thankyou sunab, will keep an eye on that report then

I think for a more powerful PC the default proxy encoding settings are of too low quality. I can see plenty of box artifacts and image noise from the original clip is hardly visible any more, which makes adjustment of denoise filtering pretty much impossible.

For all of you who encounter the same, you might want to use this proxy setting (or even increase the bitrate further):

-f mpegts -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -r 25 -deinterlace -s 640x360 -b 1536k

Many thanks for that pml. So much clearer and still very smooth. Cheers.

I would like to add that this only works on new Projects as the encoding is built into the .kdenlive project file.

Being halfway through a project, I thought, what the heck and deleted all the proxies, edited the .kdenlive file with the new parameters and saved. Loaded Kdenlive with my Project and re-generated the proxies. All works great!

Please note, I did all this with a copy!

First of all, thanks for the proxy-opportunity.
Loving it with my AVCHD-camcorder.

I have two problems, one of them probably not proxy-related.
When I render to H.264 and the YT-render-profile the sound sounds mechanic, sort of robocop'ish.
I just tried this: http://ubuntuforums.org/showthread.php?t=786095
And had to reinstall kdenlive, though it didn't reinstall all of kdenlive as some was remebered and my settings were remembered on startup.

To the proxy-related question.
I'm used to use the crop-effect on my clips, to kind of zoom in to a part of the clip.
Now, when I do it in the proxy-clips it is difficult not to get a black line either in the top/bottom or the sides.
I guess it is because 'crop' crops pixels, and in the proxy-clip I have fewer pixels? (and therefor fewer chances of hitting a 1280x1920 compatible cropping)
Is there any way to do zoom in to a part of the original video in another way without using crop?

PS. To those of you out there with a powerfull computer I can recommend the proxy-settings made by pml a couple of post above.

First of all, thanks for the proxy-opportunity.
Loving it with my AVCHD-camcorder.

I have two problems, one of them probably not proxy-related.
When I render to H.264 and the YT-render-profile the sound sounds mechanic, sort of robocop'ish.
I just tried this: http://ubuntuforums.org/showthread.php?t=786095
And had to reinstall kdenlive, though it didn't reinstall all of kdenlive as some was remebered and my settings were remembered on startup.

To the proxy-related question.
I'm used to use the crop-effect on my clips, to kind of zoom in to a part of the clip.
Now, when I do it in the proxy-clips it is difficult not to get a black line either in the top/bottom or the sides.
I guess it is because 'crop' crops pixels, and in the proxy-clip I have fewer pixels? (and therefor fewer chances of hitting a 1280x1920 compatible cropping)
Is there any way to do zoom in to a part of the original video in another way without using crop?

PS. To those of you out there with a powerfull computer I can recommend the proxy-settings made by pml a couple of post above.

I'm having the same sort of issue encoding to h264, the sound is definitely tinged with a robotic 'edge' to it.

For proxies yes there are a number of places that proxies seem to take precedence, including histogram and waveform.

The proxy is only there to enable real time editing and playback. When not playing back really it would be better to see a full resolution frame to work on. And with regard to histogram / waveform it really should be with reference to the 'real' source frame not proxy.

But like you, I'm very pleased to have the proxy option at all and no doubt there will be further improvements depending on priorities and developers available.

i had also experineced the robotic edge to the sound and solved it by changing the project settings - kdenlive insisted i had 50p clips, but they were 25p

I'll have a look, but don't think there's any problem with framerate, 25P in 25P out.

Pages