Skip to content

iijake/pylibtgvoip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pylibtgvoip

Almost exact port of php-libtgvoip and MadelineProto VoIP module

Interfaces are similiar to MadelineProto PhoneCall (= _tgvoip.VoIP)

Usage docs: https://docs.madelineproto.xyz/docs/CALLS.html

Method names are transformed to snake_case, check end of the _tgvoip.cpp for full list.

Building

Requires libcrypto, libssl, libopus and libboost-python headers installed

$ mkdir build
$ cd build
$ cmake ..
$ make

Running examples

Examples require tweaking (set app_id and app_hash, change usernames)

Requires installed Pyrogram v0.11.0+

$ cd examples
$ cp ../build/_tgvoip.so _tgvoip.so
$ wget https://github.com/danog/MadelineProto/raw/master/input.raw  # download sample stream to play
$ python make_call.py  # or receive_calls.py, prank.py

Encoding audio streams

$ ffmpeg -i input.mp3 -f s16le -ac 1 -ar 48000 -acodec pcm_s16le input.raw  # encode
$ ffmpeg -f s16le -ac 1 -ar 48000 -acodec pcm_s16le -i output.raw output.mp3  # decode

About

Proof-of-concept for Telegram calls in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors