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 Version 0.9.7
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 -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 tgcall-0.0.3-cp312-cp312-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d7c47469b1a234e194416abd51191e6df6af8697f7c68fa723cc9c2b878b2f3 |
|
MD5 | 58b8d2b8c27c8c2fdf9d7f18ee3c80f2 |
|
BLAKE2b-256 | 808e840e00744d36deb40f02653e8f276cebffb5d0b9b366b7d89b7d99b4e7bc |
Hashes for tgcall-0.0.3-cp311-cp311-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f4a92b96080e588709e1f64c1975774c8e3cd6750572909ab3127189315fc03 |
|
MD5 | 99cc36037145a703cdde744d042d164d |
|
BLAKE2b-256 | efccd09ab4cc974b81038bbb5be6df9fee91bd01c155a32101306bf20a10a43e |
Hashes for tgcall-0.0.3-cp310-cp310-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1212c0680dec9a845559844fea801db3538c510a22b17aa3b91958911a69b03 |
|
MD5 | edca916d896ecf990443fede6573a61f |
|
BLAKE2b-256 | 7b5aca5d8ed7bb8aac809e7b51ec650921a55f15321149fd11f7f3e93b8bc80e |
Hashes for tgcall-0.0.3-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6406585ec2d6f51cce1380ec98b4c926264f5d92656081eaa9705fda90f473e |
|
MD5 | 1ec2f2af1a7f161ec6cbfbf43e9c94ae |
|
BLAKE2b-256 | 1aa355903f043159472c244c613d68df972df72927cf99b4fee3d69c791b3799 |
Hashes for tgcall-0.0.3-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e41efdfa9c397ce97c76147a8e313701b1d500241d474ee100ad67328c7e53cc |
|
MD5 | c21e478673032e720a01cc98ff62e0b6 |
|
BLAKE2b-256 | 707d9afa726d2e98037c61f030fa38c112274cd24ac195ee138ab820af94534d |
Hashes for tgcall-0.0.3-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c40ec4e6a61e118106eff7166b240488dfc84ca23ee896dcfbc6b8ceca1a38c |
|
MD5 | 63a49c1daee89e6b9750354275aa3341 |
|
BLAKE2b-256 | 61a5ba2e60599af6f8aa3cbf73e335ae330fa8b1d135c15f548d50fc35d78523 |