Discord stopped properly displaying GIF animations with overall loop lengths longer than about 2000–4000× the length of their shortest frame(s)
This is partly a summary of bug report 10747914, submitted by me on December 27, 2020 & handled by Erwin since.
Sometime on or around December 25, 2020, certain GIF animations (& animated emojis) stopped rendering on Discord. Their peculiarity is that they have very long loop durations (relative to the time duration of their shortest frames) and at least one ridiculously-long final frame (again relative to the shortest frames within their animation loops). For example, this GIF that was an actual emoji at some server:
https://support.discord.com/attachments/token/zvCTg6whO4bhFEWtcdFSr5Y5L/?name=eyestare_306.84s-looping.gif
has 80ms duration for its shortest frames and a nearly-5-minute-long final frame, resulting in an overall loop duration of a little more than 5 minutes. On a browser tab, it renders & plays just fine, and it used to render & play just fine on Discord until December 25 (even as an uploaded emoji); since then, it stopped rendering, unless its final frame was shortened such that the overall loop was reduced to just 5 minutes like this:
https://support.discord.com/attachments/token/R7sujsaMECP8TApID1MWmtZdy/?name=eyestare_300s-looping.gif
This fail-to-render behavior happened on all three Windows desktop clients (stable, Ptb, & Canary) as well as the Microsoft Edge browser client & the Android mobile client. This is a screen recording on YouTube demonstrating the issue in action:
https://youtu.be/EJGCFMduVzw
I retested this issue with another GIF animation that was edited for various loop durations. While this GIF (shortest frame lasts for 100ms; overall duration is almost 6 min) renders fine everywhere:
https://cdn.discordapp.com/attachments/735364108723159112/794030030828208138/cookie235s.gif
this slightly-longer variant (only the last frame was stretched in time so that overall it loops for almost 6:08 m:s) fails to render:
https://cdn.discordapp.com/attachments/735364108723159112/794030175935397888/cookie245s.gif
Speeding up or down the GIFs seemed to affect the duration threshold upon which the render bug would start to trigger, leading me to theorize that the bug is dependent not on the overall duration of the loop (whether more than 5 minutes or more than 6), but rather on how long that loop is relative to the duration of the shortest frame. Apparently, if the GIF overall loops for more than about 2000× to 4000× the length of the shortest frame (depending on the GIF), then the GIF does not render.
-
I can confirm that (some?) GIFs are being truncated to 2000 frames. Uploading https://cdn.discordapp.com/attachments/619887085943521290/805007073002782720/badapple.gif results in the media.discordapp.net transcoding of it cutting it to 2000 frames: https://media.discordapp.net/attachments/619887085943521290/805007073002782720/badapple.gif
This also affects animated profile pictures.
0 -
This seems to be intended behaviour: see https://github.com/discord/lilliput/pull/66 and https://github.com/discord/lilliput/pull/79.
The frame limit is definitely 2000, and I assume that the length limit is 5 minutes (or 30000 GIF "frame delays").
0
Please sign in to leave a comment.
Comments
2 comments