This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Processing in higher resolution than the output

Tags: None
(comma "," separated)
msundman
Registered Member
Posts
24
Karma
0
Let's say I have a 4K clip, and I want to filter it (Denoiser + Lift/gamma/gain + Transform) and then resize it to 720p and then sharpen it and encode the result. How do I do that?
I guess my project resolution needs to be 720p, because Rendering->Rescale won't apply any sharpening after resizing so it becomes very fuzzy.
However, if my project resolution is 720p then will those 2160p clips still be processed in 2160p, or will they get converted to 720p before the filters are applied?
User avatar
Stetsbequem
Registered Member
Posts
137
Karma
-2
OS
viewtopic.php?f=265&t=150556

:-)

I would work through all steps in full resolution and only reduce them at the very end.

(* Addendum: This only applies to Kdenlive. Otherwise, and although unnecessary, because these restrictions do not exist, more like this: Open 4K, cut, filter, effect, filter; render to pipe (rgb24) | ffmpeg -f rawvideo -pixel_format rgb24 -video_size $IN -framerate $IN path/to/renderpipe -sws_flags bicubic -vf scale=-1:720, unsharp=luma_msize_x=5:luma_msize_y=5:luma_amount=0.5:chroma_msize_x=3:chroma_msize_y=3:chroma_amount=0.0 -c:v libx26[45] … -pix_fmt yuv420p out720.mkv. But that's not helping. Unless you export lossless and then apply ffmpeg to it.)


The Social Credit System is a credit rating and blacklist being developed by the the ruling Chinese Communist Party. The goal is total control of the population by awarding points for desirable behavior, or withdrawing them for negative behavior.
msundman
Registered Member
Posts
24
Karma
0
Stetsbequem wrote: viewtopic.php?f=265&t=150556

That's about different aspect ratios. I don't see an answer to my question in that topic (which I read through already before, by the way).

Stetsbequem wrote:I would work through all steps in full resolution and only reduce them at the very end.

Yes, that's what I want to do in kdenlive (possibly together with other programs). My question is: How?
User avatar
Stetsbequem
Registered Member
Posts
137
Karma
-2
OS
There is already a little more described and if you have exact ideas, then the subtleties should interest you.

>> "a 4K clip, and I want to filter it (Denoiser + Lift/gamma/gain + Transform) and then resize it to 720p and then sharpen it and encode the result."
> "work through all steps in full resolution and only reduce them at the very end":
    a 4K project, and I want to filter it (Denoiser + Lift/gamma/gain + Transform) and then sharpen it and then render and encode it to 720p.
Now you see the difference?

If you want it to be complex: "export lossless and then apply ffmpeg". The question is whether the effort is worth it (720p!). If not, it may be easier (and faster) to calculate and work with the material down to 720p before importing it.
 
 


The Social Credit System is a credit rating and blacklist being developed by the the ruling Chinese Communist Party. The goal is total control of the population by awarding points for desirable behavior, or withdrawing them for negative behavior.
msundman
Registered Member
Posts
24
Karma
0
Stetsbequem wrote:There is already a little more described and if you have exact ideas, then the subtleties should interest you.

>> "a 4K clip, and I want to filter it (Denoiser + Lift/gamma/gain + Transform) and then resize it to 720p and then sharpen it and encode the result."
> "work through all steps in full resolution and only reduce them at the very end":
    a 4K project, and I want to filter it (Denoiser + Lift/gamma/gain + Transform) and then sharpen it and then render and encode it to 720p.
Now you see the difference?

I see the difference, yes, but I don't understand you. I don't want to resize after the sharpening. The sharpening must always be done in the final resolution.

Stetsbequem wrote:If you want it to be complex: "export lossless and then apply ffmpeg". The question is whether the effort is worth it (720p!). If not, it may be easier (and faster) to calculate and work with the material down to 720p before importing it.

Are you saying it's impossible to have a sensible multi-res workflow in kdenlive without rendering twice? If so, is there some good lossless codec for the intermediate format? Something that wouldn't reduce the chroma res either. (I assume kdenlive works in 4:4:4, but maybe I'm wrong?)
User avatar
Stetsbequem
Registered Member
Posts
137
Karma
-2
OS
First of all, I find it very courteous of you to give me the opportunity to do something for my forum karma.

The project specifies the resolution. Within this resolution, you are free to adjust the material. Of course, a video can be scaled to 1280x720 in a 4K* project. The result is letter- and pillarbox. Furthermore, effects/filters are processed sequentially.

With Kdenlive you have several lossless codecs at your disposal. The most important are Prores and Dnxhd, both optically lossless to at least the seventh re-compression. I myself use FFV1 for such tasks because it is completely lossless and fast.

*Why 4K, or in full resolution? Because we work by eye. This means that all effects/filters/cuts are used according to this impression, which we get through the compositor. The quality of the reproduction is therefore decisive. (This also applies to proxy editing. Example: The weaker the proxy image, the more likely it is to be cut to close-up.) See pitfall automatic (down) scaling: viewtopic.php?f=265&t=142890

 
 


The Social Credit System is a credit rating and blacklist being developed by the the ruling Chinese Communist Party. The goal is total control of the population by awarding points for desirable behavior, or withdrawing them for negative behavior.
msundman
Registered Member
Posts
24
Karma
0
Stetsbequem wrote:The project specifies the resolution. Within this resolution, you are free to adjust the material.

Sorry, this does not answer the question. If I add a 2160p file to a 1080p project and run some filter on it, will the filter process 2160p data or 1080p data? E.g., if I zoom 200% into the 2160p file using Transform, will I get 1080p worth of pixel data from the 2160p, or will it first downsample the 2160p to 1080p and then zoom 200% into that file (essentially cropping a 540p portion from it)?

Stetsbequem wrote:Of course, a video can be scaled to 1280x720 in a 4K* project. The result is letter- and pillarbox.

OK, but can that 1280x720 crop then be encoded without those borders?

Stetsbequem wrote:With Kdenlive you have several lossless codecs at your disposal. The most important are Prores and Dnxhd, both optically lossless to at least the seventh re-compression. I myself use FFV1 for such tasks because it is completely lossless and fast.

I know FFV1 can do chroma subsampling, and kdenlive doesn't support any settings for it, so I don't know if it's doing the chroma subsampling or not.
(And I have neither prores nor dnxhd in my kdenlive.)
msundman
Registered Member
Posts
24
Karma
0
msundman wrote:Let's say I have a 4K clip, and I want to filter it (Denoiser + Lift/gamma/gain + Transform) and then resize it to 720p and then sharpen it and encode the result. How do I do that?
I guess my project resolution needs to be 720p, because Rendering->Rescale won't apply any sharpening after resizing so it becomes very fuzzy.
However, if my project resolution is 720p then will those 2160p clips still be processed in 2160p, or will they get converted to 720p before the filters are applied?

I just spent many hours testing various video/picture/project resolutions and filter orders.

Conclusion:
Filters on a clip (or an image) in 2160p will process in 2160p even if the project resolution is 720p.

Still not sure about the filter parameters, though. It seems like they are adjusted to match the resolution of the source, but I'm not 100% sure. My guess is that, say, a blur of 100 on a 2160p clip in a 720p project is similar to a blur of 300 on the same clip in a 2160p project, on the clip's pixel level.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]