-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timeline.settings.frame_rate not working correctly with framerates that have a decimal #20
Comments
Hey @Jarnovat, This is indeed a bug, mentioned in the test cases. Davinci is really, really finnicky for changing timeline settings. I even described some of the things I encountered here: So for example, for using the original API, when you Besides that, attached is a showcase of how weird changing timeline framerates in Davinci is. Resolve_fADG2oHLBm.mp4There'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 timeline.custom_settings(True)
timeline.set_setting("timelineFrameRate", "59.94") 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
timeline settings
project settings
the two variables
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: