[GH-ISSUE #765] Neural Network Encoder for .gif is extreme bad for certain situation #618

Open
opened 2026-02-26 09:32:05 +03:00 by kerem · 1 comment
Owner

Originally created by @byzod on GitHub (Dec 9, 2020).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/765

For gifs that have high saturation, many colors or small area of bright pixels, Neural Network can hardly make it

I just found a practical example when I was about to share a game recording to friend

Original video: https://www.reddit.com/r/noita/comments/k735yn/is_that_a_new_dragon_ball_attack_from_anonymous/

Original recording project: bug1.zip

Output with Neural Network (sampling 1, use global color table):
A2

Output with Neural Network (sampling 1, don't use global color table):
A1

With global color table, the result overall color is dim (in situation like this, it's basically white&black), but no visible banding

Without global color table, the color looks better, but there're heavy banding problem

Thus, Neural Network is unable to handle gif like this, there's no way to encode it correctly currently

Originally created by @byzod on GitHub (Dec 9, 2020). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/765 For gifs that have high saturation, many colors or small area of bright pixels, Neural Network can hardly make it I just found a practical example when I was about to share a game recording to friend Original video: https://www.reddit.com/r/noita/comments/k735yn/is_that_a_new_dragon_ball_attack_from_anonymous/ Original recording project: [bug1.zip](https://github.com/NickeManarin/ScreenToGif/files/5665843/bug1.zip) Output with Neural Network (sampling 1, use global color table): ![A2](https://user-images.githubusercontent.com/848607/101630338-bb14bc80-3a5d-11eb-89b8-3240ac6b766b.gif) Output with Neural Network (sampling 1, don't use global color table): ![A1](https://user-images.githubusercontent.com/848607/101630327-b7813580-3a5d-11eb-9206-8e1bf99bd8a0.gif) With global color table, the result overall color is dim (in situation like this, it's basically white&black), but no visible banding Without global color table, the color looks better, but there're heavy banding problem Thus, Neural Network is unable to handle gif like this, there's no way to encode it correctly currently
Author
Owner

@NickeManarin commented on GitHub (Feb 22, 2021):

The issue here is that the color quantizer is only using the parts of the image that changes between frames to calculate the colors.

I need to execute the quantizer before cropping/removing unchanged frames.
This will reduce the color quality for gifs with many colors, but it will improve the color consistency of the bar,

<!-- gh-comment-id:782958726 --> @NickeManarin commented on GitHub (Feb 22, 2021): The issue here is that the color quantizer is only using the parts of the image that changes between frames to calculate the colors. I need to execute the quantizer before cropping/removing unchanged frames. This will reduce the color quality for gifs with many colors, but it will improve the color consistency of the bar,
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#618
No description provided.