rainyskye / signal-tgstickers

Small tool to grab and convert a Telegram Sticker pack to be ready to import into Signal Messenger
MIT License
19 stars 1 forks source link

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

Open tonischumacher1337 opened 1 year ago

tonischumacher1337 commented 1 year ago

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 commented 1 year ago

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

rainyskye commented 1 year ago

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 commented 1 year ago

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

i.e: ~/ (home directory)

rainyskye commented 1 year ago

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
pmnlla commented 1 year ago

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'tgit 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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

So essentially it‘s not my system/configuration, but I just had bad luck with my sticker choice?

rainyskye commented 1 year ago

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

panzerchris commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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