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.6

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.6
File Actions
stefano_ntgcalls-3.0.6-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.6-cp314-cp314-musllinux_1_2_x86_64.whl
stefano_ntgcalls-3.0.6-cp314-cp314-musllinux_1_2_aarch64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ ARM64 Details for stefano_ntgcalls-3.0.6-cp314-cp314-musllinux_1_2_aarch64.whl
stefano_ntgcalls-3.0.6-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.6-cp313-cp313-musllinux_1_2_x86_64.whl
stefano_ntgcalls-3.0.6-cp313-cp313-musllinux_1_2_aarch64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ ARM64 Details for stefano_ntgcalls-3.0.6-cp313-cp313-musllinux_1_2_aarch64.whl

Total release size: 165.9 MB

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

Download URL stefano_ntgcalls-3.0.6-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
6aed7ccec9d1f8d9f17ea2a2da91ce62f2feb82bb06d62da7c03b41f05cd473f
BLAKE2b-256 checksum
How to use checksums
97f045d5e3744047d883b3ea86b60db6b0f7fd64f0fc2a1e24ffb6614c188973
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.6-cp314-cp314-musllinux_1_2_aarch64.whl

Download URL stefano_ntgcalls-3.0.6-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
48c496492543b5026fc15586d35d54a88b6d3555102532d8f9bbcd7945899946
BLAKE2b-256 checksum
How to use checksums
a14527d7d46453526da19b92d99a1a3dd935406c93cf166b1c2d21ee7e5e3d9c
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.6-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL stefano_ntgcalls-3.0.6-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
0b32098d4995cf8b4713f043064e44d23aeec09630cfd71ef5dbaf19fe3abe56
BLAKE2b-256 checksum
How to use checksums
62ba9dce3ce59c25d4f8e7a6e9d3fc744347d7bede3dab3dd52814b600388312
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.6-cp313-cp313-musllinux_1_2_aarch64.whl

Download URL stefano_ntgcalls-3.0.6-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
a2910890d31a392defa9b9f74be8bdec359ca39983008509388158eeafcac3ad
BLAKE2b-256 checksum
How to use checksums
d22e9701dc3983553c56456afa7e12a956fd11afc1197e161a1d20e394b557be
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.6

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