SevenTV / image-processor

The image processor which handles emote uploads
Other
4 stars 1 forks source link

Delay between frames for a webp is off after upload. #85

Closed Matthew-Grayson closed 1 year ago

Matthew-Grayson commented 1 year ago

An uploaded webp has delay times between frames that are significantly longer than specified in the original file. The original file has delays set individually for each frame ranging from 17ms to 450ms. The shorter delays seem to have been lengthened.

Here is a webp before upload.

And here is a link to the resulting emote on 7tv.

Excellify commented 1 year ago

Im assuming this is a result of the way gif timings are rendered in browsers where any delay below 20ms(?) gets rounded up. The processor does some stuff to work with this limitation, which might be causing you issues.

brian6932 commented 1 year ago

To circumvent GitHub image processing, all files are href-ed to their original versions, there is no way to bypass GitHub image cache unfortunately

Can confirm, 7TV breaks frametimes that exceed the gif spec (50 fps (20ms frametime)), instead of breaking the frametimes, it should really just not create a gif version of the emote.

In my case, this animation has fps too high to be a gif

source file
webp encoded
avif encoded
gif encoded
Matthew-Grayson commented 1 year ago

Thank you for the response. I was actually able to fix the issue by changing the 17ms delays to 20ms.Sent from my iPhoneOn Dec 9, 2022, at 4:46 AM, Excellify @.***> wrote: Im assuming this is a result of the way gif timings are rendered in browsers where any delay below 20ms(?) gets rounded up. The processor does some stuff to work with this limitation, which might be causing you issues.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>