Bug 422647 - wrong conversion of integers to floats from project file
Summary: wrong conversion of integers to floats from project file
Status: RESOLVED UPSTREAM
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (show other bugs)
Version: 20.04.1
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-08 18:33 UTC by Robert Riemann
Modified: 2023-11-07 14:04 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Riemann 2020-06-08 18:33:55 UTC
Dear all,

I have a very unusual use case. I create with a number of scripts from a json file with image paths and their durations a half-broken minimal kdenlive file to get a slideshow in sync with a webcam+audio stream.

As I do not know precisely which elements in the kdenlive file are necessary or not, it is a bit complicated.

On my way to make it working somehow, I noticed that conversion from seconds to "HH:mm:ss" format only works properly if seconds are a float type and it does not work for integers.

My template:

   <entry producer="producer${library[slide]}" in="00:00:00.000" out="00:00:${value['duration']}">
    <property name="kdenlive:id">${library[slide]}</property>
   </entry>`

If value[duration] is lets say 125, the value is not picked up. If it is "125.00", it is correctly converted.

I fixed this problem for me with an explicit conversion to use two decimal digits with .toFixed(2).

Thanks for making kdenlive.
Comment 1 Vincent PINON 2021-03-14 17:37:17 UTC
timecode is supposed to be either Hours:Minutes(<60):Seconds(<60).frames(<fps) or only frames.
I believe the code is in MLT, and I've heard that this code was indeed a bit briken in the edges (from OTIO contributor who studied that particular aspect)