No project description provided
Project description
A simple and elegant client that allows you to make group voice calls quickly and easily.
Examples
•
Documentation
•
PyPi
•
Channel
•
Chat
PyTgCalls
This project allows making Telegram group call using MtProto and WebRTC, this is possible thanks to the power of NodeJS's WebRTC library and @evgeny-nadymov
What are the supported clients?
The supported clients for now are Pyrogram and Telethon, but we accept other clients too, you can open a pull request with the edits
How to install?
Here's how to install the PyTgCalls lib, the commands are given below:
# With Git
pip install git+https://github.com/pytgcalls/pytgcalls -U
# With PyPi (Recommended)
pip install py-tgcalls-kaizoku -U
Conversion command (Video)
From file to raw video
ffmpeg -i {INPUT_FILE} -f rawvideo -pix_fmt yuv420p -vf scale=640:-1 {OUTPUT_FILE}
From H264/VP8/VP9 to Audio and Video
ffmpeg -i {INPUT_FILE} -f s16le -ac 1 -ar {BITRATE} {OUTPUT_AUDIO_FILE} -f rawvideo -r {FRAMERATE} -pix_fmt yuv420p -vf scale={SCALING}:-1 {OUTPUT_VIDEO_FILE}
From YouTube video/live-stream to Audio and Video
ffmpeg -i "$(youtube-dl -x -g "{YOUTUBE_LINK}")" -f s16le -ac 1 -ar {BITRATE} {OUTPUT_AUDIO_FILE} -f rawvideo -r {FRAMERATE} -pix_fmt yuv420p -vf scale={SCALING}:-1 {OUTPUT_VIDEO_FILE}
From YouTube Live stream to Video
Important!
The max resolution allowed by Telegram is of 720p at 30 fps Here also listed the scaling format
- 360p = 640
- 480p = 854
- 720p = 1280
If you have any problem with green screen or un-synchronized video, it can be one of these problems:
- Invalid FFMPEG command
- The video quality specified to convert is higher than the original video one
- Invalid PyTgCalls video parameters
- If you're using fifo, the Fifo max buffer size is too low and this cause the lag problem.
Conversion commands
From file to raw format
ffmpeg -i {INPUT_FILE} -f s16le -ac 1 -ar {BITRATE} {OUTPUT_FILE}
From stream link to raw format
ffmpeg -y -i {STREAM_LINK} -f s16le -ac 1 -ar {BITRATE} {OUTPUT_FILE}
From YouTube video/live-stream to raw format
ffmpeg -i "$(youtube-dl -x -g "{YOUTUBE_LINK}")" -f s16le -ac 1 -ar {BITRATE} {OUTPUT_FILE}
Credits
Big thanks to @evgeny-nadymov for allowing us to use their code from telegram-react, and thanks to alemidev for helping to rebuild this library
This library is based on tgcallsjs developed @AndrewLaneX and pyservercall by @Laky-64
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 Distributions
Built Distributions
Hashes for py_tgcalls_kaizoku-0.9.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d0f703931e6ce85e0fc198468505c3d7fae8e27b22e7a747808d00bb7df1068 |
|
MD5 | ecee24fb6012bc218d84b86a6f50dcb2 |
|
BLAKE2b-256 | 8c4e213faf24ba6ec069176c880e51cd8bbdc1f7e3d172c4b4aa98d355fdab19 |
Hashes for py_tgcalls_kaizoku-0.9.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d56bc195b98ac35d307e383322e4aabf7881c00e3396d07be143f64526946ef |
|
MD5 | a54fa30ab3071c42306209b51751c633 |
|
BLAKE2b-256 | 843b8f2b103c5cfb2c79565a4f43ab0721135bfcd3bd9d37ceb0a195958dc774 |
Hashes for py_tgcalls_kaizoku-0.9.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06612d0dc480b7a087142570d30e03a6d232b77d60e6882ca9acb34456de230b |
|
MD5 | 6c9774a028c3dd939ac3fd9afe525f5b |
|
BLAKE2b-256 | 561485c9f93ac2269f3419cb6288198f95a34b8f2b1d24e18f6564e411c16278 |
Hashes for py_tgcalls_kaizoku-0.9.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07fa319dfeb6c6725cca298d281dbec9d3dabd26f44749680dc302a8bdd308fe |
|
MD5 | 5ce1f823a69ecc189658047b80c21da7 |
|
BLAKE2b-256 | 531466dd6cb1115cb232395f40d992667d26e33899f607cef32f30df8803fb33 |
Hashes for py_tgcalls_kaizoku-0.9.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b555a33f343a1bb7a57fcdb9aa57c6568af90cd883db2a846db69511d6e93b1 |
|
MD5 | 86cb486ccd117cf6c75927bdf7363918 |
|
BLAKE2b-256 | e7ce1013c78545bd946908bb05b7e8a4a970d383441543c42a1532c1b3fea808 |