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

Stabilize (transcode) option maxangle

Tags: None
(comma "," separated)
ellocogato
Registered Member
Posts
2
Karma
0
I am experimenting with the "Stabilize" feature for my video clips. In one particular clip, an active foreground subject causes the stabilization to incorrectly rotate the picture (a lot), so I would like to restrict the amount of rotation in the stabilization.

I'm using the "Videostab (transcode)" option, and on the resulting dialog I am experimenting with the "maxangle" option. However, either it is buggy or I do not understand how it is supposed to work. A value of "0" results in a stabilization that has no rotation whatsoever, which is what I would expect. However, the next possible value, "1", appears to have no effect on the amount of rotation (I cannot tell the difference between videos resulting from maxangle of -1 or 1).

Now, here's where I think the problem is. The hover text in this dialog states "max anglen [sic] to rotate (in rad)". If this value indeed is in radians, then the control should allow a decimal value from 0 to about 3.1 (for 180 degrees). In this dialog, the allowed value is an integer from 1 to 1000. Something is not right here.

Any insight?

Note: I tested this on 0.9.2, and also "master" from git.
User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS
Not exactly sure on this but my exp from other kdenlive to melt interfaces is that where the unit melt takes is degrees then you fill in a value in 10 ths of degrees. So maybe stabilise is using 10ths of radians
User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS
rotation in the Affine transition is in units of 10ths of a degree http://userbase.kde.org/Kdenlive/Manual/Transitions/Affine

But rotation in the Alpha shapes http://userbase.kde.org/Kdenlive/Manual/Effects/Alpha_manipulation/Alpha_shapes is in 1000ths of a full circle.

So maybe 1000 in transcode stablilize is one full circle.

Pretty sure the -1 means no limit on the rotation.
I wrote up what doco I could glean on this functionality here http://userbase.kde.org/Kdenlive/Manual/Project_Menu/Stabilize

It is quite possible that there is a defect with Kdenlive's call to transcode with respect to the range the GUI offers up. You would think the max range in this would be 360 degrees (or 2 x 3.142 radians) = 6.28.
I think there is a built in restriction in the kdenlive gui that means you can't have decimal places in the sliders of Kdenlive. Which is why they use 10ths of a degree or 1000th of a circle for units in some. (Edit: Which is obviously wrong because I just noticed sliders with values of 0.8 and 0.3 so never mind this stupid comment)

I guess we need to hear from a developer on this who could look in the code and give us a defnitive answer.

B.T.W. ellocogato - does stabilize - transcode crash on you? Because for me at the moment it crashes my kdenlive

http://www.kdenlive.org/mantis/view.php?id=2924 and http://www.kdenlive.org/mantis/view.php?id=2900

kdenlive 0.9.3+git20130117.91ea0353-0ubuntu0~sunab~precise1
mlt 0.8.7+git20130109.ba392dac-0ubuntu0~sunab~precise1
frei0r 1.3.0+git20130119.c3fdd674-0ubuntu0~sunab~precise1
User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS
Ok I have just raised this in mantis - http://www.kdenlive.org/mantis/view.php?id=2955 - Stabilize transcode - maxangle parameter - crazy max value allowed

Suggested we make the units degrees or 10ths of degrees.
ellocogato
Registered Member
Posts
2
Karma
0
OK, I discovered this documentation for MLT: http://www.mltframework.org/bin/view/MLT/FilterVideostab2, which has the same description (including what I guess is a typo) and specifies the maxangle parameter to be a float value with min -1 and max 1000. Which still doesn't make sense to me, but oh well.

I actually tested this out with the melt command line tool, and I don't understand it there, either. As far as I can tell, 0.99 is the same as 0, in other words no rotation whatsoever. But again, 1 looks the same as -1, in other words no apparent limit on rotation.

I obviously lack an understanding of how this is supposed to work.
User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS
The fact that MLT wants -1 to 1000 suggests that maybe MLT is stuffed with respect to the parameter then. Because as you say 1000 radians is stupid. Maybe you raise a MLT defect http://sourceforge.net/p/mlt/bugs/
User avatar
ttguy
Moderator
Posts
1152
Karma
6
OS
So I figured that this is a issue on the MLT side.
And apparently Dan Dennedy has fixed this on http://sourceforge.net/p/mlt/bugs/189/ git commit 41d044a so that the max angle is 3.142 radians.

This will probably mean the Kdenlive GUI for this will need to be changed to reflect the new max value of 3.142 radians (rather than the 1000 that is the max in the kdenlive GUI at the moment)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kde-naveen, Sogou [Bot]