Coder Social home page Coder Social logo

pytgcalls / ntgcalls Goto Github PK

View Code? Open in Web Editor NEW
39.0 3.0 8.0 115.58 MB

A Native Implementation of Telegram Calls in a seamless way.

Home Page: https://pytgcalls.github.io

License: GNU Lesser General Public License v3.0

CMake 6.86% Python 3.23% C++ 87.53% C 2.17% Dockerfile 0.21%
audio calls cpp ffmpeg group-chat lib library nadymov py-tgcalls pytgcalls

ntgcalls's Introduction

pytgcalls logo

A Native Implementation of Telegram Calls in a seamless way.
Examples Documentation PyPi Releases Channel Chat

NativeTgCalls PyPI - Version Downloads

Welcome to NativeTgCalls, an innovative open-source project. NativeTgCalls represents the next evolution in Telegram calling, building on the foundation laid by PyTgCalls.

Powerful Simple Light
Fast Logo
Built from scratch in C++ using Boost and libwebrtc
Simple Logo
Simple Python, GO and C Bindings
Light logo
We removed anything that could burden the library, including NodeJS

...and more, without even rewriting your code that uses PyTgCalls!

Overview

NativeTgCalls, often referred to as NTgCalls, is an exciting open-source venture. This project redefines the Telegram calling experience and introduces innovative features while preserving the legacy of PyTgCalls.

Build Status

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

Key Features

Experimentation and Customization

NativeTgCalls is a playground for experimentation. We understand the importance of customization for developers, empowering you to tailor your Telegram calling solutions to your precise requirements.

Advancing with PyTgCalls

Building upon the success of PyTgCalls, NativeTgCalls provides a natural progression for developers familiar with its predecessor. This evolution streamlines the development process and extends the capabilities of Telegram calling.

Importantly, PyTgCalls will seamlessly integrate the new core (NTgCalls) to ensure backward compatibility.

Compiling

Python Bindings

NativeTgCalls offers Py Bindings, enabling seamless integration with Python. Follow these steps to compile NativeTgCalls with Python Bindings:

  1. Ensure you are in the root directory of the NativeTgCalls project.

  2. Run the following command to install the Py Bindings:

    python3 setup.py install

C Bindings

For developers looking to use NativeTgCalls with C and C++, we provide C Bindings. Follow these steps to compile NativeTgCalls with C Bindings:

  1. Ensure you are in the root directory of the NativeTgCalls project.
  2. Run the following command to generate the shared libs:
    python3 setup.py build_shared
  3. Upon successful execution, a shared library will be generated in the "shared-output" directory. You can now use this library to develop applications with NativeTgCalls.
  4. To include the necessary headers in your C/C++ projects, you will find the "include" folder in the root of the project. Utilize this folder for including the required header files.

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.

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, utilizing 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.

  • @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. 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.

ntgcalls's People

Contributors

dadadani avatar doggyhaha avatar laky-64 avatar null-nick avatar roj1512 avatar turiog avatar yumiko-bots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ntgcalls's Issues

cannot Generate the CPP bindings

Describe the bug
as the docs says I ran this command:

python3 setup.py build_shared

in the root directory ofc,
got this error:

[ 97%] Building CXX object ntgcalls/CMakeFiles/ntgcalls.dir/utils/dispatch_queue.cpp.o
[100%] Linking CXX shared library libntgcalls.so

/usr/bin/ld: cannot find -lX11: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [ntgcalls/CMakeFiles/ntgcalls.dir/build.make:293: ntgcalls/libntgcalls.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:176: ntgcalls/CMakeFiles/ntgcalls.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2
Traceback (most recent call last):
  File "Projects/ntgcalls/setup.py", line 232, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 1233, in run_command
    super().run_command(command)
  File "/usr/lib/python3/dist-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "Projects/ntgcalls/setup.py", line 198, in run
    subprocess.run(
  File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '-j8']' returned non-zero exit status 2.

running on Debian latest build

segmentation fault

Code runs well then suddenly stops:

PyTgCalls v1.0.5 powered by NTgCalls v1.0.0.dev24, Copyright (C) 2021-2023 Laky-64 https://github.com/Laky-64
Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)

zsh: segmentation fault python3 video.py

31352 Aborted?

Bug
The processes automatically get aborted after 5 to 6 hours.

Expected behavior
It was expected to run without any errors. 😩

Environment

  • OS: Ubuntu 20.04
  • Branch: dev
  • NTgCalls Version: 1.0.0.dev23
  • Python Version: 3.10.12

Additional context

# Fatal error in: ../../../../_source/ubuntu-20.04_x86_64/webrtc/src/rtc_base/task_queue_libevent.cc, line 158

# last system error: 24
# Check failed: pipe(fds) == 0

# start: line 1: 31352 Aborted  |   (core dumped) python3 -m Modules

Relay Server Connection Issues with Telegram API

Before of all

This document describes a known issue encountered when using the library with Telegram. It's important to note that this is not a limitation of the library itself, but rather a problem inherent to the Telegram API.

Description

  • There can be occasional connection failures between the Relay server and the user's Telegram client when P2P is disabled, this can cause API calls to fail unexpectedly.
  • This issue has already been reported to Telegram for them to investigate and fix, unfortunately, there is no current solution available from their side.

Impact

Users might experience occasional API call failures due to these connection issues.

Workaround (if applicable):

Unfortunately, there is no current workaround available due to the nature of the issue residing within the Telegram API.

Additional Notes

We will continue to monitor the situation and update this document when a fix is implemented by Telegram.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.