modern_lisp-machine/.config/mpv/scripts/force-fps.lua

11 lines
294 B
Lua
Raw Permalink Normal View History

2024-06-01 05:00:40 +00:00
local target_fps = 23
mp.add_periodic_timer(1, function()
local fps = mp.get_property_native("estimated-vf-fps")
if fps and math.abs(fps - target_fps) > 0.1 then
mp.set_property_native("speed", fps / target_fps)
else
mp.set_property_native("speed", 1)
end
end)