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

TGS animation support #366

Merged
merged 22 commits into from Oct 27, 2019
Merged

TGS animation support #366

merged 22 commits into from Oct 27, 2019

Conversation

sot-tech
Copy link
Contributor

@sot-tech sot-tech commented Sep 29, 2019

Fixes #340

Added tgs file converter.
Converts animations using external utility, which uses Samsung/rlottie library.
So to get it work, utility and libraries are also needed in the system or in venv.

I tried to use tgs library but it generates very... strange images (with a lot of artifacts).

Copy link
Member

@tulir tulir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks great. The performance is a bit of a concern (see third thread comment), but it should be solvable

mautrix_telegram/portal/telegram.py Outdated Show resolved Hide resolved
mautrix_telegram/util/tgs_converter.py Outdated Show resolved Hide resolved
mautrix_telegram/util/tgs_converter.py Outdated Show resolved Hide resolved
@tulir
Copy link
Member

tulir commented Oct 17, 2019

@Eramde is this ready?

@tulir tulir self-requested a review October 17, 2019 13:07
@sot-tech
Copy link
Contributor Author

@Eramde is this ready?

@tulir Sorry forgot about notification. Yep, i fixed propblematic places and utility can now export to png sequence with defined framerate, so there won't any problems with animation speed when ffmpeg is used. I discarded using bash script and call ffmpeg process from python, i thing this is better.

@tulir
Copy link
Member

tulir commented Oct 17, 2019

Yeah, the script is only needed if it needs 100 calls. If it's just one or two, it's better to do from python

@tulir tulir merged commit 8acc511 into mautrix:master Oct 27, 2019
Copy link
Contributor Author

@sot-tech sot-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little changes to build converter script (using release conf) (see here)

@tulir
Copy link
Member

tulir commented Oct 27, 2019

@Eramde building with the release conf seems to make the webm conversion fail with a lottieconverter error and exit code -11

@sot-tech
Copy link
Contributor Author

@Eramde building with the release conf seems to make the webm conversion fail with a lottieconverter error and exit code -11

Sounds strange, because Debug and Release builds differs only g++ build keys (-g vs -O2), and memtest does not show any possible problems (-11 exit code is probably segfault). Could you, please provide input file to check?

@bendschs
Copy link

bendschs commented Jan 4, 2021

is there a guide somewhere how to use this?
cheers
bendsch

@sot-tech
Copy link
Contributor Author

sot-tech commented Jan 4, 2021

is there a guide somewhere how to use this?
cheers
bendsch

Hello. Just build utility, place it into one of $PATH's folder (i.e. /usr/bin) or python's venv/bin and set configuration. I don't exactly know if @tulir 's docker image already has utility...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Bridge Telegram animated stickers
3 participants