from pyrogram import Client from pytgcalls import idle from pytgcalls import PyTgCalls from pytgcalls import StreamType from pytgcalls.types.input_stream import AudioPiped app = Client( 'py-tgcalls', api_id=12345, api_hash='0123456789abcdef0123456789abcdef', ) call_py = PyTgCalls(app) chat_id = -1001234567890 call_py.start() audio_file = 'http://docs.evostream.com/sample_content/assets/sintel1m720p.mp4' call_py.join_group_call( chat_id, AudioPiped(audio_file, ), stream_type=StreamType().pulse_stream, ) idle()
from pyrogram import Client from pytgcalls import idle from pytgcalls import PyTgCalls from pytgcalls import StreamType from pytgcalls.media_devices import MediaDevices from pytgcalls.types import CaptureAudioDevice app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() call_py.join_group_call( -1001234567890, CaptureAudioDevice(MediaDevices.get_audio_devices()[0], ), stream_type=StreamType().pulse_stream, ) idle()
from pytgcalls import idle from pytgcalls import PyTgCalls from pytgcalls import StreamType from pytgcalls.types.input_stream import AudioVideoPiped from pytgcalls.types.input_stream.quality import HighQualityAudio from pytgcalls.types.input_stream.quality import HighQualityVideo app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() remote = 'http://docs.evostream.com/sample_content/assets/sintel1m720p.mp4' call_py.join_group_call( -1001234567890, AudioVideoPiped( remote, HighQualityAudio(), HighQualityVideo(), additional_ffmpeg_parameters='EVERYTHING BEFORE THE INPUT (-i) ' '-atend ' 'EVERYTHING AFTER ALL ARGUMENTS', ), stream_type=StreamType().pulse_stream, ) idle()
import os import time from pyrogram import Client from pytgcalls import idle from pytgcalls import PyTgCalls from pytgcalls import StreamType from pytgcalls.types.input_stream import InputAudioStream from pytgcalls.types.input_stream import InputStream app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() file = '../input.raw' while not os.path.exists(file): time.sleep(0.125) call_py.join_group_call( -1001234567890, InputStream(InputAudioStream(file, ), ), stream_type=StreamType().local_stream, ) idle()
from pyrogram import Client from pytgcalls import idle from pytgcalls import PyTgCalls from pytgcalls import StreamType from pytgcalls.types.input_stream import AudioPiped app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() audio_file = 'input.webm' call_py.join_group_call( -1001234567890, AudioPiped(audio_file, ), stream_type=StreamType().pulse_stream, ) idle()
from pytgcalls.types.input_stream.quality import HighQualityAudio from pytgcalls.types.input_stream.quality import HighQualityVideo app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() remote = 'http://docs.evostream.com/sample_content/assets/sintel1m720p.mp4' call_py.join_group_call( -1001234567890, AudioVideoPiped( remote, HighQualityAudio(), HighQualityVideo(), # You can add --video or --audio to the ffmpeg # command line to specify to what you want to add these parameters additional_ffmpeg_parameters='EVERYTHING BEFORE THE INPUT (-i) ' '-atmid ' 'EVERYTHING AFTER THE INPUT (-i) ' '-atend ' 'EVERYTHING AFTER ALL ARGUMENTS', ), stream_type=StreamType().pulse_stream, ) idle()
from pytgcalls import idle from pytgcalls import PyTgCalls from pytgcalls import StreamType from pytgcalls.types import Browsers from pytgcalls.types.input_stream import AudioVideoPiped from pytgcalls.types.input_stream.quality import HighQualityAudio from pytgcalls.types.input_stream.quality import HighQualityVideo app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() remote = 'http://docs.evostream.com/sample_content/assets/sintel1m720p.mp4' call_py.join_group_call( -1001234567890, AudioVideoPiped( remote, HighQualityAudio(), HighQualityVideo(), headers={ 'User-Agent': Browsers().chrome_windows, }, ), stream_type=StreamType().pulse_stream, ) idle()
api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() audio_file = 'audio.raw' video_file = 'video.raw' while not os.path.exists(audio_file) or \ not os.path.exists(video_file): time.sleep(0.125) call_py.join_group_call( -1001234567890, InputStream( InputAudioStream( audio_file, AudioParameters(bitrate=48000, ), ), InputVideoStream( video_file, VideoParameters( width=640, height=360, frame_rate=24, ), ), ), stream_type=StreamType().local_stream, ) idle()
from pyrogram import Client from pytgcalls import idle from pytgcalls import PyTgCalls from pytgcalls import StreamType from pytgcalls.media_devices import MediaDevices from pytgcalls.types import CaptureVideoDesktop app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() call_py.join_group_call( -1001234567890, CaptureVideoDesktop( MediaDevices.get_screen_devices()[0], ), stream_type=StreamType().pulse_stream, ) idle()
from pyrogram import Client from pytgcalls import idle from pytgcalls import PyTgCalls from pytgcalls import StreamType from pytgcalls.types.input_stream import AudioImagePiped from pytgcalls.types.input_stream.quality import HighQualityVideo app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() audio_file = 'input.webm' call_py.join_group_call( -1001234567890, AudioImagePiped( audio_file, 'test.png', video_parameters=HighQualityVideo(), ), stream_type=StreamType().pulse_stream, ) idle()
# CHANGE THIS BASED ON WHAT YOU WANT 'best[height<=?720][width<=?1280]', 'https://www.youtube.com/watch?v=msiLgFkXvD8', stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, ) stdout, stderr = await proc.communicate() return stdout.decode().split('\n')[0] return asyncio.get_event_loop().run_until_complete(run_async()) app = Client( 'py-tgcalls', api_id=123456789, api_hash='abcdef12345', ) call_py = PyTgCalls(app) call_py.start() remote = get_youtube_stream() call_py.join_group_call( -1001234567890, AudioVideoPiped( remote, HighQualityAudio(), HighQualityVideo(), ), stream_type=StreamType().pulse_stream, ) idle()