No project description provided
Project description
A simple and elegant client that allows you to make group voice calls quickly and easily.
Examples
•
Documentation
•
PyPi
•
Channel
•
Chat
PyTgCalls
This project allows making Telegram group call using MtProto and WebRTC, this is possible thanks to the power of NTgCalls library and @evgeny-nadymov
What are the supported clients?
The supported clients for now are Pyrogram, Telethon and Hydrogram, 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
Many thanks to @evgeny-nadymov for graciously permitting us to utilize their code from telegram-react. Additionally, we extend our gratitude to @alemidev for their invaluable assistance in reconstructing this library, and to @TuriOG for implementing NTgCalls within the library.
This library is based on tgcallsjs developed @AndrewLaneX and pyservercall by @Laky-64
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for py_tgcalls-1.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 269592ab494309edc7df6a06d342ad807b9071c1859ecd44c79fa7833097ce90 |
|
MD5 | c1e855c7432ec9a5acbefbaf1cfb8bc7 |
|
BLAKE2b-256 | 5b62962f379f4dd69bd9434f9610cb049637cd9ec7a822dee5341228f10abe70 |