Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken Animation #96

Closed
yarodevuci opened this issue Aug 20, 2024 · 30 comments
Closed

Broken Animation #96

yarodevuci opened this issue Aug 20, 2024 · 30 comments
Labels
bug Something isn't working

Comments

@yarodevuci
Copy link

TwisterDog_AgADWgADTlzSKQ.tgs.zip

Broken animation for this sticker

@yarodevuci yarodevuci added the bug Something isn't working label Aug 20, 2024
@ed-asriyan
Copy link
Owner

I didn't find any errors or incorrect conversion for any of the supported formats. Could you please specify which command you use and a screenshot of what you expect to get after conversion?

@yarodevuci
Copy link
Author

there is no errors, @ed-asriyan just the animation is wrong

@ed-asriyan
Copy link
Owner

could you provide a screenshot of the converted animation that demonstrates the defect, and provide command you used to convert the animation?

@yarodevuci
Copy link
Author

yes, working on it

@yarodevuci
Copy link
Author

docker run --rm -e HEIGHT=256 -e WIDTH=256 -e QUALITY=100 -v /FunkyGoose:/source edasriyan/lottie-to-gif

@yarodevuci
Copy link
Author

yarodevuci commented Sep 4, 2024

FunkyGoose_AgADRgADUomRIw tgs
here is another example
Artifacts on screen reflections

@yarodevuci
Copy link
Author

TwisterDog_AgADWgADTlzSKQ tgs
do you see artifact on top ?

@yarodevuci
Copy link
Author

not sure if you are able to improve such behavior

@yarodevuci
Copy link
Author

I can provide Telegram Sticker packs URLs if you want to see how it looks there @ed-asriyan

@ed-asriyan
Copy link
Owner

FunkyGoose_AgADRgADUomRIw tgs
here is another example Artifacts on screen reflections

this is how "transparency" is imitated in non-transparent GIFs. this is expected behavior

TwisterDog_AgADWgADTlzSKQ tgs
do you see artifact on top ?

hmm, it seems to be gifski bug which is fixed in the latest version. please wait for a fix with upgraded gifski inside

@yarodevuci
Copy link
Author

@ed-asriyan Thanks! will my docker automatically picks up the update? How do i know when it's ready?

@ed-asriyan
Copy link
Owner

ed-asriyan commented Sep 4, 2024

it will be available in a few minutes. I'll let you know with instructions

@yarodevuci
Copy link
Author

@ed-asriyan I just pulled the latest, artifact issue on balloon dog is gone, but goose monitor reflection is not :(
many other animated stickers have that similar issue too. Any ideas what that could be and how to get rid of it?

@yarodevuci
Copy link
Author

FunkyGoose_AgADoRgAApWxgUg tgs
here is another example

@yarodevuci
Copy link
Author

I think most premium stickers have these in common

@ed-asriyan
Copy link
Owner

these “shadows” are partially transparent. GIF does not support alpha channel (transparent), so you see these rare dots simulating transparency. for better quality, choose other formats that support alpha channel, such as apng, webp, or webm

@yarodevuci
Copy link
Author

these “shadows” are partially transparent. GIF does not support alpha channel (transparent), so you see these rare dots simulating transparency. for better quality, choose other formats that support alpha channel, such as apng, webp, or webm

hm, and then convert any of those formats to gif?

@yarodevuci
Copy link
Author

possible to add webp or webm to gif?

@yarodevuci
Copy link
Author

yarodevuci commented Sep 4, 2024

most of the webp animation is broken/wrong loop speed/ripped pieces of image frames ;((

@ed-asriyan
Copy link
Owner

ed-asriyan commented Sep 4, 2024

hm, and then convert any of those formats to gif?

no. gif doesn't have support of alpha channel so information about transparency "level" is lost in gif regardless what it was converted from

possible to add webp or webm to gif?

no they are different formats. try to use these commands

most of the webp animation is broken/wrong loop speed ;((

it's expected. absolute value of FPS may vary slightly on different formats, as different formats use different ways of defining “speed”: some use FPS, others use “frame duration”. could you provide examples where you've had this problem?

@yarodevuci
Copy link
Author

yarodevuci commented Sep 4, 2024

Yea, unfortunately apng is no go for me, since size for it is huge, 2.5+3+ MB, compared to GIF 1MB, webm also won't work for me on iOS devices.

I can't attach WebP but I am attaching tgs zip file instead that you can run tests with...

TGSFiles.zip

@ed-asriyan
Copy link
Owner

ed-asriyan commented Sep 4, 2024

I converted the files to webp and opened them in Chrome. I don't see any ripped out chunks of image frames. As expected, there is a slight difference in FPS that can be seen after a few animation cycles. Could you please clarify exactly what you see, or attach a zip file of the webp files?

@yarodevuci
Copy link
Author

I converted the files to webp and opened them in Chrome. I don't see any ripped out chunks of image frames. As expected, there is a slight difference in FPS that can be seen after a few animation cycles. Could you please clarify exactly what you see, or attach a zip file of the webp files?

You are correct, on the Mac Preview app they look broken, but in Chrome they look fine, either way I tried on iOS and animations is similarly broken there as well.. I guess it depends on the preprocessor that is been used.

Possible to code partial transparency to be fully transparent instead? I have seen Telegram bot does that actually.

@yarodevuci
Copy link
Author

TwisterDog_AgADWQADTlzSKQ tgs
TwisterDog_AgADWwADTlzSKQ tgs
few animations are still broken unfortunately ... @ed-asriyan

@yarodevuci
Copy link
Author

1
TwisterDog_AgADWwADTlzSKQ-ezgif com-resize
Here are they should be

@ed-asriyan
Copy link
Owner

ed-asriyan commented Sep 6, 2024

Possible to code partial transparency to be fully transparent instead? I have seen Telegram bot does that actuall

Technically it's possible and looks like an enhancement. Here is an issue to make it in future: #98

few animations are still broken unfortunately ... @ed-asriyan

could you please send animations here or provide a link to the stickers?

Here are they should be

how did you generate these gifs?

@yarodevuci
Copy link
Author

yarodevuci commented Sep 6, 2024

TwisterDog.tgs.zip
@ed-asriyan here is the zip
docker run --rm -e HEIGHT=256 -e WIDTH=256 -e QUALITY=60 -v /Twister:/source edasriyan/lottie-to-gif

I appreciate a lot for your time to check this.

@yarodevuci
Copy link
Author

@ed-asriyan hi there, any updates on this?

@ed-asriyan
Copy link
Owner

not yet. I'll take a look later when will have free time. Most likely in a few weeks

@yarodevuci
Copy link
Author

@ed-asriyan have you had a chance to take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants