Update tgs_converter to match updated lottieconverter (#694)

This commit is contained in:
SOT-TECH
2021-11-16 02:07:13 +03:00
committed by GitHub
parent 2cc439853f
commit b4d4f84161
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -64,10 +64,10 @@ if lottieconverter:
return ConvertedSticker("application/gzip", file)
async def tgs_to_gif(file: bytes, width: int, height: int, background: str = "202020",
async def tgs_to_gif(file: bytes, width: int, height: int, fps: int = 25,
**_: Any) -> ConvertedSticker:
proc = await asyncio.create_subprocess_exec(lottieconverter, "-", "-", "gif",
f"{width}x{height}", f"0x{background}",
f"{width}x{height}", str(fps),
stdout=asyncio.subprocess.PIPE,
stdin=asyncio.subprocess.PIPE)
stdout, stderr = await proc.communicate(file)