itsagramlive
1.5.5
Ini adalah Gram Live adalah skrip Python yang membuat Instagram Live dan memberi Anda server RTMP dan streaming kunci streaming menggunakan sofware seperti Obs-Studio atau Xsplit Broadcaster.
pip install ItsAGramLive from ItsAGramLive import ItsAGramLive
live = ItsAGramLive ()
# or if you want to pre-define the username and password without args
# live = ItsAGramLive(
# username='foo',
# password='bar'
# )
live . start ()python3 live_broadcast.py -u yourInstagramUsername -p yourPassword -proxy user:password@ip:portOutput akan memberi Anda alamat server RTMP dan tombol stream (secara otomatis disalin ke papan klip Anda)
Catatan: Tidak mungkin menggunakan perintah seperti chat atau wave dengan skrip ini. Live akan selesai saat file menyelesaikan streaming.
import argparse
import subprocess
from ItsAGramLive import ItsAGramLive
parser = argparse . ArgumentParser ( add_help = True )
parser . add_argument ( "-u" , "--username" , type = str , help = "username" , required = True )
parser . add_argument ( "-p" , "--password" , type = str , help = "password" , required = True )
parser . add_argument ( "-f" , "--file" , type = str , help = "File" , required = True )
args = parser . parse_args ()
live = ItsAGramLive ( username = args . username , password = args . password )
if live . login ():
print ( "You'r logged in" )
if live . create_broadcast ():
if live . start_broadcast ():
ffmpeg_cmd = "ffmpeg "
"-rtbufsize 256M "
"-re "
"-i '{file}' "
"-acodec libmp3lame "
"-ar 44100 "
"-b:a 128k "
"-pix_fmt yuv420p "
"-profile:v baseline "
"-s 720x1280 "
"-bufsize 6000k "
"-vb 400k "
"-maxrate 1500k "
"-deinterlace "
"-vcodec libx264 "
"-preset veryfast "
"-g 30 -r 30 "
"-f flv '{stream_server}{stream_key}'" . format (
file = args . file ,
stream_server = live . stream_server ,
stream_key = live . stream_key
)
print ( 'CTRL+C to quit.' )
try :
subprocess . call ( ffmpeg_cmd , shell = True )
except KeyboardInterrupt :
pass
except Exception as error :
print ( error )
live . end_broadcast ()
live . end_broadcast ()python3 live_broadcast_ffmpeg.py -u yourInstagramUsername -p yourPassword -f /path/to/video/file.mp4Permintaan tarik dipersilakan. Untuk perubahan besar, buka masalah terlebih dahulu untuk membahas apa yang ingin Anda ubah.
Pastikan untuk memperbarui tes yang sesuai.
GNU GPLV3
Periksa bot Instagram saya: Burbnbot