You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
framerate and framerate2 should be the same? Instead framerate = 29.97 (correct) and framerate2 = 29.0 (incorrent)
Screenshots
timeline settings
project settings
the two variables
Desktop (please complete the following information):
OS: Windows 10
Python Version: 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]
Davinci Resolve Version: 18.0.1 Build 3
Additional context
Same can be reproduced with framerates of 59.94 & probably any other which isn't a whole number.
So it probably has something to do with type casting or conversion.
A project & timeline framerate of 60 works as expected. Both return 60.0
The text was updated successfully, but these errors were encountered:
So for example, for using the original API, when you get the framerate it returns a float, and you can only set it as a str.
Besides that, attached is a showcase of how weird changing timeline framerates in Davinci is.
Resolve_fADG2oHLBm.mp4
There's definitely something funky going on with type conversions, probably the pydantic backend. I spend some time trying to figure it out but couldn't really find it. For some reason when pydantic parses it it rounds down the float. I tried using decimal and the same thing happened.
I'll leave this issue open for now because there's something in the code, but I'd also advise not really using the framerate option specially when there's media in the timeline, since for some reason Davinci doesn't let you change the framerate of the timeline when there's media in it, and also you need to enable/disable custom settings as shown in the MP4 above.
Best practice for now would be to do your settings before adding any media to the timeline using
Otherwise even if pydavinci was fully functioning in that aspect, you would need to do the dance of enabling/disabling custom settings as shown above. Just some Resolve quirks.
Describe the bug
timeline.settings.frame_rate & project.get_setting("timelineFrameRate") don't return the same value.
To Reproduce
In Davinci Resolve set the following setttings
Timeline framerate 29.97
Project framerate 29.97
Use the following code:
Expected behavior
framerate and framerate2 should be the same? Instead framerate = 29.97 (correct) and framerate2 = 29.0 (incorrent)
Screenshots
![image](https://user-images.githubusercontent.com/15384834/181645325-59b1009c-f217-47dc-8d1d-0afadc0135bb.png)
timeline settings
project settings
![image](https://user-images.githubusercontent.com/15384834/181645463-5445117a-73d5-42b7-bb06-a1a4ee8f5df7.png)
the two variables
![image](https://user-images.githubusercontent.com/15384834/181645557-e1f813b7-a41f-439e-a7be-bb0bacbd9d69.png)
Desktop (please complete the following information):
Additional context
Same can be reproduced with framerates of 59.94 & probably any other which isn't a whole number.
So it probably has something to do with type casting or conversion.
A project & timeline framerate of 60 works as expected. Both return 60.0
The text was updated successfully, but these errors were encountered: