[Kdenlive-devel] Pixel aspect ratio as fraction
simon.eu at gmail.com
Wed Jan 28 15:40:09 UTC 2009
I think we should do it for the next release (after 0.7.2), using
aspect_ratio_num and …_den. Certainly one would have to go through the
code everywhere. But what is necessary has to be done ;) I would do it
directly, without the workaround.
By the way, isn't there also something with PAR and DAR? Perhaps only
one thing displayed in the properties dialog? (I atm don't have
kdenlive here, working)
2009/1/25 Dan Dennedy <dan at dennedy.org>:
> On Fri, Jan 23, 2009 at 5:27 AM, jb <jb at kdenlive.org> wrote:
>> On Friday 23 January 2009 08.32:15 Simon Eugster wrote:
>>> Hi together,
>>> In the IRC madsdyd and me have been discussing about the Clip
>>> properties dialog. The pixel aspect ratio is given as float here, but
>>> in the Profiles manager the user has to set a fraction. I tried to
>>> understand where the value for the PAR comes from, but I couldn't find
>>> the source o.O
>>> Where is it? I'd like to make it displaying a fraction as exercise to
>>> get used to kdenlive and C++.
>> The clip properties are fetched when a clip is inserted by:
>> void Render::getFileProperties(const QDomElement &xml, const QString &clipId)
>> in file renderer.cpp
>> Here we build a QMap <QString, QString> which lists all the clip properties
>> At line 571, you can see:
>> filePropertyMap["aspect_ratio"] = frame->get("aspect_ratio");
>> frame is the MLT frame for the clip, which has an "aspect_ratio" property.
>> Not sure we can get the info from MLT as a fraction here...
> It should be a fraction aka rational. Part of the problem was that
> there is not rational property type. We were too lazy and lacking
> foresight to add it in the beginning of MLT. Now, this "aspect_ratio"
> property is used in a lot of places through MLT. Recursively grep the
> source for it (inlcuding double quotes) to see what I mean. I could
> change this to aspect_ratio_num and aspect_ratio_den much like the
> profile does. However, I am hesitant to heap a half-ass solution onto
> something that was half-ass to begin with (in hindsight). If I have to
> touch this much code, I may as well introduce a proper rational type
> and property. I have just added this to the MLT ToDo list.
> Perhaps a simple workaround for the GUI exists in the meantime. It is
> not too difficult to convert between fractions and float. The less
> trivial is float-to-rational if you want the most reduced form. See
> this FFmpeg code:
> The inverse is a simple matter of casting and dividing.
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> Kdenlive-devel mailing list
> Kdenlive-devel at lists.sourceforge.net
More information about the Kdenlive