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.2-cp312-cp312-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e6a93bbdcd23fbf6465cca75dd83422d79f675002fa59623f5f8892353568d1 |
|
MD5 | 8e41e244e8a78c01f73c2b26bd3308bf |
|
BLAKE2b-256 | 6c07bb0235de217d50ae5814f3ce05c35997c3769499b390fae0fdc7c2871b6d |
Hashes for tgcall-0.0.2-cp311-cp311-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 219fcb29b07a55a3baafcedeb495eadf76287e90662504b222dd3f96d92cc6b7 |
|
MD5 | d3e005f9b1b8c75b079bf9e3aab1a918 |
|
BLAKE2b-256 | 788fd04d0a6b810f62b3cbe81c62087c84a28c48961576e4650e084d9d2d5e6b |
Hashes for tgcall-0.0.2-cp310-cp310-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da117c0a5170d10066a763d195907102e8e095a601fb9a83d012e0e3f3c2aed8 |
|
MD5 | 08058ec050e447620c037bd1796b2aa1 |
|
BLAKE2b-256 | 8ecb3e6101b73a5f64cd27e7fce690a05d3931b564d373e09ec2b70070290d84 |
Hashes for tgcall-0.0.2-cp39-cp39-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7c6f91e241d1122cc7ad640a558b6aa3172aefe154cb489a246c9f01dccc90f |
|
MD5 | 5a62c1bceb96c50234364103aa7e4ef1 |
|
BLAKE2b-256 | 4ffc7ee406bd239dbafaf5551006761057c92f2cff6f17de518852f9c1ee03a9 |
Hashes for tgcall-0.0.2-cp38-cp38-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd36ee7581c2c7cc02bd258601773cd6d0123c7fe8b1066ded8a112edeae27de |
|
MD5 | 2e56c3a2546b409c648f69a9082d2035 |
|
BLAKE2b-256 | 22db28d2afa007bae60d2cff39b56730094ea699a3cb913fdc65d0a5d8e589fc |
Hashes for tgcall-0.0.2-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae0931b28e770b1a588955f4a26c8cb44a8eb7af22a1e7551660d0ca78483029 |
|
MD5 | 437db72f3c0f7d0ebeb69639625489b3 |
|
BLAKE2b-256 | b6f204b48c22121cd62a4c8ba1b1578feeec493b96d4ad17fa4cddcd4bfc3492 |