Bug 449387 - Unable to set negative parameter value for Edge Crop "Center Balance" parameter
Summary: Unable to set negative parameter value for Edge Crop "Center Balance" parameter
Status: RESOLVED NOT A BUG
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Effects & Transitions (other bugs)
Version First Reported In: 21.12.1
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-30 19:37 UTC by Stephen
Modified: 2026-01-27 20:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen 2022-01-30 19:37:50 UTC
SUMMARY

When adding an Edge Crop to a clip, I'm unable to set the "center balance" to a negative value.

In XML, this parameter is defined as:
	<parameter type="constant" name="center_bias" max="%maxWidth" min="-%maxWidth" default="0">
		<name>Center balance</name>
	</parameter>

If I change the value of min to a numeric constant, i.e. -1000, then I can set negative values. This suggests that the token replacement isn't working properly.

STEPS TO REPRODUCE
1.  Add video clip to timeline
2. Add "Edge Crop" effect
3. Attempt to set "Center balance" value to a negative value

OBSERVED RESULT

Center balance value is bounded to 0 on the low end.

EXPECTED RESULT

Center balance value is bounded to -%maxWidth

SOFTWARE/OS VERSIONS
Windows: Windows 11 Pro 21H2
Kdenlive: 21.12.1, also master-1009 nightly

ADDITIONAL INFORMATION

If I change the parameter type from "constant" to "animated", I seem to get the full expected value range
Comment 1 luzpaz 2026-01-26 15:42:00 UTC
Note: the docs[1] page say

> As of this writing and in version 23.04 this effect still behaves strangely. The parameter
> values seem to interfere with each other and it is not possible to have all four sides 
> being cropped. It is either top/bottom or left/right and only the last value entered is applied 
> (and then on both sides). Until this is fixed it is recommended to use the
> Crop, Scale and Tilt effect.

[^1]: https://docs.kdenlive.org/en/effects_and_filters/video_effects/transform_distort_perspective/edge_crop.html
Comment 2 Bernd 2026-01-27 20:13:17 UTC
Edge Crop in 25.12.0 Flatpak on Pop!_OS allows to use the slider for Center Balance from negative to positive values (bound by the width of the project resolution).

However, Edge Crop in Kdenlive works differently than in Shotcut (the latter being the editor developed for the MLT Framework). The Center Balance parameter is only available when Automatic Center-crop is enabled. At the same time all other parameters are disabled. So it's one or the other: Automatic center crop with adjustable center balance, or manually cropping the edges. In addition, automatic center crop is used to "automatically crop whatever is needed to fill the output frame and prevent padding" (see MLT documentation). Not sure what this really does.

In manual mode, the pixel values of opposite parameters (top-bottom, left-right) are always added so that you cannot specify a value for top and a different value for bottom. This is set in the effect and outside of Kdenlive's control.

Therefore, it's highly recommended to use the Crop, Scale, and Tilt effect instead as it offers better control.