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' Animated stickers don't work #3

Open
tonischumacher1337 opened this issue Apr 22, 2023 · 12 comments
Open

'.tgs' Animated stickers don't work #3

tonischumacher1337 opened this issue Apr 22, 2023 · 12 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@tonischumacher1337
Copy link

Hey thanks for your work first of all.

I cloned the repository, installed dependencies all according to your guide here.
Static stickers get converted.
However for animated stickers I get the following output:

/tmp/tmpjzm7gq94.webm: Invalid data found when processing input

It results in no files being added to the output directory.

I'm using ubuntu if that matters.

Cheers

@rainyskye
Copy link
Owner

Hm okay that's definitely odd, can you send me the sticker pack you were trying to convert?

@rainyskye
Copy link
Owner

Just as a test, I loaded up an Ubuntu container and did the bare essentials

sudo apt install python3 python3-pip
pip3 install -r requirements.txt
sudo apt install ffmpeg

Seems to be working okay, I would say you might not have ffmpeg installed or something but I doubt it's that since it'll error a lot harder.
Screenshot 2023-04-23 at 1 20 37 pm

@rainyskye
Copy link
Owner

It seems like you're writing to /tmp/, have you tried another directory?

i.e: ~/ (home directory)

@rainyskye
Copy link
Owner

As a test, I also made it output to /tmp/, I just realized it doesn't seem to be creating a subfolder?
You can try using this pack https://t.me/addstickers/LANI_Kurumi_chan_ENG
And it should say something like:

The directory /tmp/LANI_Kurumi_chan_ENG does not exist.
Do you want to create the directory /tmp/LANI_Kurumi_chan_ENG? (y/n) 

Screenshot 2023-04-23 at 1 27 25 pm

@rainyskye rainyskye added the bug Something isn't working label Apr 23, 2023
@rainyskye rainyskye self-assigned this Apr 23, 2023
@pmnlla
Copy link

pmnlla commented Apr 23, 2023

heyo! figured i should pop in to suggest a few things.

  1. please pull all the changes from the master branch and try to recreate the issue. git stash and git pull|, don't git pop`, and put the bot token in the configuration file.
  2. please let us know:
    i) where are you running the script from?
    ii) what's the output directory set to in the configuration file?
  3. can you post the full logs from when you run the script until it terminates?

im half asleep and it's 12 am so i may be a bit slow to respond since im heading to bed lol, but please look your configuration over

@tonischumacher1337
Copy link
Author

Okay. So I have ffmpeg installed. I need it for another service that I have running and it's working fine there. So I don't think that there is generally anything wrong with it.

I'm working within my home directory. /home/user/stickerconverter
I didn't change the default output. So it just outputs to ./out.

I didn't specify your program to use the tmp folder anywhere. I don't know how you handle ffmpeg. Maybe it is my ffmpeg configuration that is set up to make conversions in that folder.

I just tried the sticker pack you suggested and it actually worked fine. Animations are converted just like i would expect them to.

This one here doesn't work and it spits out the exception from above: https://t.me/addstickers/LilPuppy

So it seems to depend on what sticker pack I use. But I tried about 10 different animated packs and the one that you suggested is the only one that worked so far.

@rainyskye
Copy link
Owner

Okay yeah the /tmp thing might be a weird issue with your ffmpeg config, but that's fine it seems to be working properly, having a look at the sticker pack you sent and realized it's in another format .tgs

I'll figure out how I can implement this :)

@tonischumacher1337
Copy link
Author

tonischumacher1337 commented Apr 23, 2023 via email

@rainyskye
Copy link
Owner

You're all good, It's an oversight in my code, I'm working on .tgs support at the moment :)

@rainyskye rainyskye changed the title Animated stickers don't work '.tgs' Animated stickers don't work Apr 23, 2023
@rainyskye rainyskye added this to the 1.0.0 milestone Apr 25, 2023
@panzerchris
Copy link

panzerchris commented Jul 24, 2023

I found your code super easy to use and pull down stickers - thanks for the hard work! For tgs support, would you be able to make use of this Lottie framework? Link: https://pypi.org/project/lottie/

@rainyskye
Copy link
Owner

I found your code super easy to use and pull down stickers - thanks for the hard work! For tgs support, would you be able to make use of this Lottie framework? Link: https://pypi.org/project/lottie/

I think I did try using that, I'm not too sure on why I didn't end up implementing it, I'll have another look at it using that package. :)

@rainyskye
Copy link
Owner

Trying to understand my own code is hurting my brain lmfao, support is still planned but I might rewrite some other stuff too, moving to #4

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

4 participants