Frames-Per-Second Not Preserved for GIFs During Render

I have a 120-frame 8fps GIF (120,347 bytes, less than 128K limit) that runs for the expected fifteen seconds. Using the Image widget to load it, though, pixlet render produces a WebP that fully displays in 6 seconds, or 20fps.


(Apologies for not embedding the images. Discourse limits new users.)

pixlet render reports a delay of 130ms on the GIF, which is a little high – the actual value should be 125ms, close enough – but then produces a WebP with a 50ms delay per frame average.

Am I missing something, or does pixlet render produce WebPs that do not respect the frame delay data in the GIFs? Other converters I’ve tried produce the right frame-rate.

An update: Using pixlet render to create a GIF instead of a WebP produces a result with a 6-second duration, instead of the original 15. This is also a 20ms delay per frame.

Another update: No matter what the frame-rate of the original is (4fps, 8fps, 16fps), I’m seeing a 120-frame GIF drawn by pixlet render with 20ms delays per frame, making it always 6 seconds.

You can set a delay in render.Root to slow or speed up the base animation. But when playing on the device you may see it fast or slow depending on your speed set in the settings too.

edit: It may not solve your issue, but it may help fix it if you set a delay value.I know when I was creating a gif I had set delay=100 (in msec) and I got 150 frames each 10cs. It is a long animation, but you may get consistent results setting that if it isn’t set? Just a thought though

Ah! That helps a lot. This isn’t perfect, but it’s much, much better.

response = http.get("https://.../animation.gif")

children = [
    render.Image(src = response.body())

# Add more children...

    delay = children[0].delay,
    child = render.Stack(children = children)

Thank you!