Skip to main content

pytgcalls logo
A simple and elegant client that allows you to make group voice calls quickly and easily.
Examples • Documentation • PyPi • Channel • Chat

PyTgCalls

pre-commit.ci status PyPI PyPI - Python Version GitHub OS Node Version Architectures Downloads

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

Metadata

Release files for py-tgcalls-kaizoku 0.9.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for py-tgcalls-kaizoku 0.9.5
File
py_tgcalls_kaizoku-0.9.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
py_tgcalls_kaizoku-0.9.5-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
py_tgcalls_kaizoku-0.9.5-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
py_tgcalls_kaizoku-0.9.5-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
py_tgcalls_kaizoku-0.9.5-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details

Total release size: 86.9 MB

Release files / py_tgcalls_kaizoku-0.9.5-cp311-cp311-win_amd64.whl

Download URL py_tgcalls_kaizoku-0.9.5-cp311-cp311-win_amd64.whl
Size 17.4 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5d0f703931e6ce85e0fc198468505c3d7fae8e27b22e7a747808d00bb7df1068
BLAKE2b-256 checksum
How to use checksums
8c4e213faf24ba6ec069176c880e51cd8bbdc1f7e3d172c4b4aa98d355fdab19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / py_tgcalls_kaizoku-0.9.5-cp310-cp310-win_amd64.whl

Download URL py_tgcalls_kaizoku-0.9.5-cp310-cp310-win_amd64.whl
Size 17.4 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
1d56bc195b98ac35d307e383322e4aabf7881c00e3396d07be143f64526946ef
BLAKE2b-256 checksum
How to use checksums
843b8f2b103c5cfb2c79565a4f43ab0721135bfcd3bd9d37ceb0a195958dc774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / py_tgcalls_kaizoku-0.9.5-cp39-cp39-win_amd64.whl

Download URL py_tgcalls_kaizoku-0.9.5-cp39-cp39-win_amd64.whl
Size 17.4 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
06612d0dc480b7a087142570d30e03a6d232b77d60e6882ca9acb34456de230b
BLAKE2b-256 checksum
How to use checksums
561485c9f93ac2269f3419cb6288198f95a34b8f2b1d24e18f6564e411c16278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / py_tgcalls_kaizoku-0.9.5-cp38-cp38-win_amd64.whl

Download URL py_tgcalls_kaizoku-0.9.5-cp38-cp38-win_amd64.whl
Size 17.4 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
07fa319dfeb6c6725cca298d281dbec9d3dabd26f44749680dc302a8bdd308fe
BLAKE2b-256 checksum
How to use checksums
531466dd6cb1115cb232395f40d992667d26e33899f607cef32f30df8803fb33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / py_tgcalls_kaizoku-0.9.5-cp37-cp37m-win_amd64.whl

Download URL py_tgcalls_kaizoku-0.9.5-cp37-cp37m-win_amd64.whl
Size 17.4 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
5b555a33f343a1bb7a57fcdb9aa57c6568af90cd883db2a846db69511d6e93b1
BLAKE2b-256 checksum
How to use checksums
e7ce1013c78545bd946908bb05b7e8a4a970d383441543c42a1532c1b3fea808
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.9.5 This release

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page