Telegram video call stream with python

185 views Asked by At

I want to record telegram video call from one channel and retranslate to another. But I can't find any normal docs Or maybe I'm not strong enough to think about this. I will be glad for any help.

I tried this:

from asyncio import run
from os import getenv

from dotenv import load_dotenv
from pyrogram import Client
from pyrogram.raw.functions.phone import JoinGroupCall
from pyrogram.raw.types import DataJSON, InputPeerSelf

from utils import get_input_group_call

load_dotenv()


async def main():
    async with Client(
        'account', api_id=getenv('API_ID'), api_hash=getenv('API_HASH')
    ) as client:
        group_call = await get_input_group_call(client, 'channel')

        r = await client.invoke(
            JoinGroupCall(
                call=group_call,
                join_as=InputPeerSelf(),
                params=DataJSON()
            )
        )
        print(r)


if __name__ == "__main__":
    run(main())
0

There are 0 answers