Animation Rendering Problem

When rendering small-sized animations (i.e. Pixel art). The resulting GIF image becomes garbled.
Here are the sample animations that I made: [Drive Link]

OS: Manjaro KDE
Linux Kernel: 5.10
Krita Version: 4.4.5

What FFMpeg version? For GIFs it is better to use 4.4+

ffmpeg version is 2:4.4-4.

That’s how it is displayed in the package manager.

With transparent BG, pixel distortion also occurs regardles of canvas size.

Are you using partial transparency then? Do note that GIFs only support 100% transparency or 0% transparency. So if you need partial transparency, you should use APNG or WEBP.

I suggest that you try this version of ffmpeg:
which is Release 4.4 Static build

No partial transparency that I know of. I make the background transparent by removing the visibility of all Background layers and I don’t fiddle with layer opacity when dealing with pixel art.

Try it with a fully opaque background to see if that improves or affects the problems you’re having.

I usually use an opaque background when rendering animation in Krita. My current issue is when rendering a small-sized pixel art, the resulting GIF is garbled even with opaque background. See my sample gifs in the link, you need an image viewer that does not blur pixels when zoomed to see.

If you Render with Export: Image Sequence and Image Location as a desktop folder (to keep the rendered .png frames neatly packaged in a folder), do you get the garbled result in the .png rendered frames?

No. Only when rendering to GIF.

So, this is a problem with ffmpeg. I’ve no idea exactly what.
Can you post a link to log_encode_gif.log (or use a pastebin) ?
That may contain a clue.

I also have a feeling that there may be problems with small .gif images but I can’t remember why I have that feeling.

Edit:Add Can you scale up your animation to make it much larger, use Nearest Neighbour filtering to maintain pixel art look, 256 x 256 or 512 x 512 and render that to .gif to see if it’s still garbled?

You mean the little pink stuff that appear at the edges? and that distort the N?

Would you be willing to share the KRA file so we can test it on our end?

Added .kra files and logs to the drive link.

Tried it, there are no distortion occurring on enlarged animations. It currently occurs on small/tiny canvases. I added the .kra files and logs in the drive link.

The problem seems to be that when you export with a width of 55 pixels, it changes it to 56 pixels. A 1 pixel change isn’t a problem in a large image, but can cause consequences in a small image. Changing it to 56 pixels for your canvas would fix the issue. Or you need a smarter autoresize which will be an option in 5.0

Tried rendering with it, still same result.

Changing the size in the render won’t work until 5.0.

What you should do is change your canvas size to even. So Image->resize canvas, then set to 56 width and 84 height.

Then render it, and you should get this:

Mihono Bourbon_show

Even-numbered canvas size, that worked! Thing is, I haven’t experienced this problem until recently. Pixel distortion still occurs with transparent background though.
This Luigi, made last year, is 21 x 36 in size.
Luigi Walking

It is a matter of luck. Cause it does a resize internally from 55 to 56, and with a resize, things can be unpredictable. So sometimes it can be fine, but sometimes that can happen. Stick to even sizes cause it is going to be resized to even anyways, just a matter of if you control it or not.

As for transparent, I removed the bg and here is what I got:
Mihono Bourbon_show3
You mean that pink dot?

Yup. That problem has been in Krita since, if memory serves me right.