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

Open
wants to merge 19 commits into
base: master
from

Conversation

@Eramde
Copy link
Contributor

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).

Randall Lawrence and others added 11 commits Sep 20, 2019
XXX: there is the bug in tgs lib, it crashes on some tgs files.
Also cairo svg2png need to be called not from tgs.exporters because there is no option to set image size
…h supports resize.

XXX: videos don't want to be played by riot, i don't know why...
Randall Lawrence
Copy link
Owner

left a comment

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
Eramde and others added 8 commits Sep 29, 2019
Co-Authored-By: Tulir Asokan <tulir@maunium.net>
Deleted autogenerated header and set licence
@tulir

This comment has been minimized.

Copy link
Owner

commented Oct 17, 2019

@Eramde is this ready?

@tulir tulir self-requested a review Oct 17, 2019
@Eramde

This comment has been minimized.

Copy link
Contributor Author

commented Oct 17, 2019

@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

This comment has been minimized.

Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.