Skip to main content
pytgcalls logo

A Native Implementation of Telegram Calls in a seamless way.
Examples • Documentation • PyPi • npm • crates.io • Maven Central • Releases • Channel • Chat

NTgCalls Release PyPI - Downloads npm - Downloads Crates.io - Downloads

NTgCalls is a lightweight open-source library for media streaming in Telegram calls. Built from scratch in C++ with WebRTC & Boost, it prioritizes accessibility to developers and resource efficiency.

Powerful Simple Light
Fast Logo
Built from scratch in C++ using Boost and libwebrtc
Simple Logo
Simple Python, Node.js, Rust, GO, C Bindings and Java for Android SDK
Light logo
We removed anything that could burden the library, keeping every binding a thin layer over the same native core

Build Status

Architecture Windows Linux MacOS
x86_64 BUILD BUILD BUILD
ARM64 BUILD BUILD BUILD

Features

  • Pre-built binaries for macOS (arm64-v8a), Linux (x86_64, arm64-v8a), Windows (x86_64), and Android (x86, 86_64, arm64-v8a, armv7)
  • Call flexibility: Group and private call support
  • Media controls: pause/resume and mute/unmute
  • Codec compatibility: H.264, HEVC (H.265), VP8, VP9, AV1, AAC, MP3, Opus
  • Content sharing: Screen streaming, Microphone and Camera streaming
  • Pre-built wheels for Python, npm packages for Node.js, crates for Rust & AAR SDK library for Android

Installing

Prebuilt packages are published for every supported language, so most users never need to compile anything.

Language Package Install
Python ntgcalls pip install ntgcalls
Node.js ntgcalls npm install ntgcalls
Rust ntgcalls cargo add ntgcalls
Java (Android) io.github.pytgcalls:ntgcalls Gradle dependency
C, C++ and Go Release archives Download the shared or static zip

Building from source

Prerequisites are listed in the Build Guide. All commands are run from the root of the repository.

Target Command Output
Python python3 setup.py install Installed in the current environment
Node.js python3 setup.py build_lib --target=node targets/node/build/Release/ntgcalls.node
C and C++ python3 setup.py build_lib shared-output and static-output

The C target builds both the shared and the static library in a single run. Each output directory also contains an include folder with the headers to add to your project.

The Rust bindings do not build the native library: the ntgcalls-sys build script downloads the matching static libraries from the GitHub release for your platform. Set NTGCALLS_RELEASE_BASE to build against a local release instead.

Using the library from Go

Go consumes the C bindings through an example project in ./examples/go/:

  1. Download the shared or static release from the Releases page
  2. Copy ntgcalls.h into ./examples/go/ntgcalls/
  3. Copy the remaining files into ./examples/go/
    • ntgcalls.dll or ntgcalls.lib on Windows amd64
    • libntgcalls.so or libntgcalls.a on Linux amd64
    • libntgcalls.dylib or libntgcalls.a on macOS
  4. Run go build or go run . with CGO_ENABLED=1
    • $env:CGO_ENABLED=1; go run . on Windows PowerShell
    • CGO_ENABLED=1 go run . on UNIX

Key Contributors

  • @Laky-64 (DevOps Engineer, Software Architect, Porting Engineer):
    • Played a crucial role in developing NTgCalls.
    • Created the Python Bindings that made the library accessible to Python developers.
    • Developed the C Bindings, enabling the library's use in various environments.
  • @dadadani (Senior C++ Developer, Performance engineer):
    • Contributed to setting up CMakeLists and integrating with pybind11, greatly simplifying the library's usage for C++ developers.
  • @kuogi (Senior UI/UX designer, Documenter):
    • As a Senior UI/UX Designer, Kuogi has significantly improved the user interface of our documentation, making it more visually appealing and user-friendly.
    • It Has also played a key role in writing and structuring our documentation, ensuring that it is clear, informative, and accessible to all users.
  • @vrumger (Mid-level NodeJS Developer):
    • Avrumy has made important fixes and enhancements to the WebRTC component of the library, improving its stability and performance.
  • @ankit-chaubey (Rust Developer):
    • Authored the first Rust bindings for NTgCalls and generously transferred the ntgcalls crate to the official project.

Junior Developers

  • @TuriOG (Junior Python Developer):
    • Currently working on integrating NTgCalls into PyTgCalls, an important step in expanding the functionality and usability of the library.
  • @doggyhaha (Junior DevOps, Tester):
    • Performs testing of NTgCalls on Linux to ensure its reliability and compatibility.
    • Specializes in creating and maintaining GitHub Actions, focusing on automation tasks.
  • @tappo03 (Junior Go Developer, Tester):
    • Performs testing of NTgCalls on Windows to ensure its reliability and compatibility.
    • It Is in the process of integrating NTgCalls into a Go wrapper, further enhancing the library's versatility and accessibility.

Special Thanks

  • @shiguredo: We extend our special thanks to 時雨堂 (shiguredo) for their invaluable assistance in integrating the WebRTC component. Their contributions, using the Sora C++ SDK, have been instrumental in enhancing the functionality of our library.

  • @evgeny-nadymov: A heartfelt thank you to Evgeny Nadymov for graciously allowing us to use their code from telegram-react. His contribution has been pivotal to the success of this project.

  • @morethanwords: We extend our special thanks to morethanwords for their invaluable help in integrating the connection to WebRTC with Telegram Web K. Their assistance has been instrumental in enhancing the functionality of our library.

  • @MarshalX: for their generous assistance in answering questions and providing insights regarding WebRTC. The first version of the wrtc module (August 2023) was based on python-webrtc (BSD-3-Clause, © 2022 Il'ya (Marshal)), itself based on node-webrtc (BSD, © 2019 The node-webrtc project authors). wrtc has since been completely rewritten.

  • @LyzCoote: for providing an ARM64 Server and allowing us to build an image with clang-18 preinstalled on manylinux2014 arm64.

We would like to extend a special thanks to @null-nick and @branchscope for their valuable contributions to the testing phase of the library and to @SadLuffy for his assistance as a copywriter. Their dedication to testing and optimizing the library has been instrumental in its success.

Additionally, we extend our gratitude to all contributors for their exceptional work in making this project a reality.

Metadata

Release files for stefano-ntgcalls 3.0.7

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 stefano-ntgcalls 3.0.7
File Actions
stefano_ntgcalls-3.0.7-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details for stefano_ntgcalls-3.0.7-cp314-cp314-musllinux_1_2_x86_64.whl
stefano_ntgcalls-3.0.7-cp314-cp314-musllinux_1_2_aarch64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ ARM64 Details for stefano_ntgcalls-3.0.7-cp314-cp314-musllinux_1_2_aarch64.whl
stefano_ntgcalls-3.0.7-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details for stefano_ntgcalls-3.0.7-cp313-cp313-musllinux_1_2_x86_64.whl
stefano_ntgcalls-3.0.7-cp313-cp313-musllinux_1_2_aarch64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ ARM64 Details for stefano_ntgcalls-3.0.7-cp313-cp313-musllinux_1_2_aarch64.whl

Total release size: 165.9 MB

Release files / stefano_ntgcalls-3.0.7-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL stefano_ntgcalls-3.0.7-cp314-cp314-musllinux_1_2_x86_64.whl
Size 43.6 MB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
82ceeafb25743871f0b597bb24d2e755f2789765b3358bbaeabac59d6c5bef3d
BLAKE2b-256 checksum
How to use checksums
20b5cbf4e0d684b6e0060912b796d40dfd94486be12850cb4be628c487441a86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stefano_ntgcalls-3.0.7-cp314-cp314-musllinux_1_2_aarch64.whl

Download URL stefano_ntgcalls-3.0.7-cp314-cp314-musllinux_1_2_aarch64.whl
Size 39.4 MB
Tags CPython 3.14 Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
f83c693a7fd8457d6d03c561414045222b31bb55a18fcd83055e850d893e0054
BLAKE2b-256 checksum
How to use checksums
d155ab357239e42c4dcff5f882518239506f03e4bd0d1d2be0be80b8278551d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stefano_ntgcalls-3.0.7-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL stefano_ntgcalls-3.0.7-cp313-cp313-musllinux_1_2_x86_64.whl
Size 43.6 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
994a49c88bbd3f4d9ab4fbfc32b168b3f05a91fe93a62b3b475d6b2288b60161
BLAKE2b-256 checksum
How to use checksums
e6ff26b498028228c10c4625ecb4a53998021d67a2b0435b83d0b94fafa3ea00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / stefano_ntgcalls-3.0.7-cp313-cp313-musllinux_1_2_aarch64.whl

Download URL stefano_ntgcalls-3.0.7-cp313-cp313-musllinux_1_2_aarch64.whl
Size 39.4 MB
Tags CPython 3.13 Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
1b65ce5bfff703e740943ee1a583dd39883be3b67ee5960b34d3bb2fd2d8d356
BLAKE2b-256 checksum
How to use checksums
ce287f3ac90c3f9427f87635146b165766680cf5d1590fa742c461a693ac2706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for stefano-ntgcalls 3.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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