linebender / interpoli

Apache License 2.0
15 stars 6 forks source link

Add functionality for graceful re-timing of animations for different display refresh rates. #18

Open xorgy opened 2 months ago

xorgy commented 2 months ago

Many animations are not highly sensitive to timing, and would look better if the sequence was subtly adjusted to match the display device. We should add functions to coalesce and stretch sequences. e.g. an animation with a fixed 24fps time base, rendering to a display device at 119.880 Hz (1000/1001 × 120 Hz) should actually be rendered at the equivalent 23.976 rate; or an animation with a fixed 29.97 fps (1000/1001 × 30 Hz) time base rendered to a 90Hz display device should be played 1‰ faster.

waywardmonkeys commented 2 months ago

That might be tricky since I'm not sure we even have that info all the time / everywhere.

cc: @DJMcNab

xorgy commented 2 months ago

This is applicable to environments with managed time (e.g. a broadcast compositor like OBS) in its basic form; but yes, we would need more functionality to do adjustment for unstable/variable/uncertain output devices like we tend to have on desktop (to correctly adjust partial sequences).