GithubHelp home page GithubHelp logo

doggyhaha / pytgcalls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pytgcalls/pytgcalls

0.0 0.0 0.0 80.47 MB

Async client API for the Telegram Group Calls

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

License: GNU Lesser General Public License v3.0

Shell 0.09% Python 77.50% TypeScript 22.04% Dockerfile 0.37%

pytgcalls's Introduction

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

pytgcalls's People

Contributors

doggyhaha avatar laky-64 avatar null-nick avatar odysseusmax avatar pranav-saraswat avatar pre-commit-ci[bot] avatar roj1512 avatar sunda001 avatar tappo03 avatar vrumger avatar

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.