Convert images to Telegram WebM stickers.
Project description
Telegram WebM Converter
This project started off as a shell script for my own personal needs , so please do expect some rough edges.
If you find any bugs or have suggestions, please open an issue. Thank you for your feedback!
Convert images to Telegram WebM stickers.
Features
- Convert an image to 100x100 WebM icon (max 32KB)
- Convert images to 512x512 WebM stickers (max 256KB)
- Batch processing support
- Automatic size optimization
Requirements
- Python 3.8+
- FFmpeg
This application requires FFmpeg to be installed on your system. FFmpeg is open-source software licensed under the LGPLv2.1/GPLv2 (or later). Please refer to the FFmpeg website for more details on its licensing.
Installation
pip install tg-webm-converter
Usage
# Convert all images in current directory
tg-webm-converter
# Convert specific file to icon, others to stickers
tg-webm-converter -i icon.png
# Convert only one file to sticker
tg-webm-converter -f image.jpg
# Convert only one file to icon
tg-webm-converter --icon-file icon.png
Build from Source
Prerequisites
- Python 3.8+
- Poetry:
curl -sSL https://install.python-poetry.org | python3 - - FFmpeg: As mentioned above, FFmpeg is a core dependency. Ensure it's installed and accessible in your system's PATH.
Setup
-
Clone the repository
git clone https://github.com/7591yj/tg-webm-converter.git cd tg-webm-converter
-
Install Dependencies with Poetry
Poetry will automatically create a virtual environment for the project and install all required dependencies.
poetry install
Running from Source
Once the development environment is set up, you can run the tg-webm-converter command directly using Poetry's run command:
# Run the application (same as `tg-webm-converter` if installed via pip)
poetry run tg-webm-converter
# Example: Convert all images in current directory
poetry run tg-webm-converter
# Example: Convert specific file to icon
poetry run tg-webm-converter --icon-file icon.png
# Run tests
poetry run pytest
Future Plans
- Consider a GUI version for easier use.
- Optimize performance for large batch conversions.
- Explore options for even smaller file sizes.
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tg_webm_converter-0.1.1.tar.gz.
File metadata
- Download URL: tg_webm_converter-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f6925d520aca3acb44f7245037744c5184cfca84bc8860b1593a0b37ef13bef
|
|
| MD5 |
3e4cc74f26f54fd671bb2634989c0f78
|
|
| BLAKE2b-256 |
cb2282e61e91c7d639928f76a1c0d357e9598852bf710a6938001db50d156f20
|
File details
Details for the file tg_webm_converter-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tg_webm_converter-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53ac2c05bd6f4de2531e5fabb9a46377e428cf2225b309ad196509e31b9b3b81
|
|
| MD5 |
32ac67c90cf4438aa25438f14718551d
|
|
| BLAKE2b-256 |
3b6c2abcdcbb84d8dd3212531630664e42f8e9dbd0d9f68262d129695e1d9917
|