{"id":13611034,"url":"https://github.com/harrypython/itsagramlive","last_synced_at":"2025-04-13T01:34:18.089Z","repository":{"id":38395612,"uuid":"252792042","full_name":"harrypython/itsagramlive","owner":"harrypython","description":"It's A Gram Live is a Python script that create a Instagram Live and provide you a rtmp server and stream key to streaming using sofwares like OBS-Studio.","archived":true,"fork":false,"pushed_at":"2022-07-30T01:11:29.000Z","size":88,"stargazers_count":175,"open_issues_count":16,"forks_count":52,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-03-14T19:06:01.787Z","etag":null,"topics":["help-wanted","instagram","instagram-live","needs-work","obs-studio","python-script"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harrypython.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://www.buymeacoffee.com/harrypython"}},"created_at":"2020-04-03T17:04:32.000Z","updated_at":"2024-03-12T12:37:41.000Z","dependencies_parsed_at":"2022-08-09T03:16:31.252Z","dependency_job_id":null,"html_url":"https://github.com/harrypython/itsagramlive","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrypython%2Fitsagramlive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrypython%2Fitsagramlive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrypython%2Fitsagramlive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrypython%2Fitsagramlive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harrypython","download_url":"https://codeload.github.com/harrypython/itsagramlive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558488,"owners_count":17165140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["help-wanted","instagram","instagram-live","needs-work","obs-studio","python-script"],"created_at":"2024-08-01T19:01:51.096Z","updated_at":"2024-11-07T17:31:13.639Z","avatar_url":"https://github.com/harrypython.png","language":"Python","readme":"![GitHub](https://img.shields.io/github/license/harrypython/itsagramlive)\n![PyPI](https://img.shields.io/pypi/v/itsagramlive)\n![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/harrypython/itsagramlive?label=Version)\n\n# It's A Gram Live\n\nIt's A Gram Live is a Python script that create a Instagram Live and provide you a rtmp server and stream key to streaming using sofwares like [OBS-Studio](https://obsproject.com/) or [XSplit Broadcaster](https://www.xsplit.com/).\n\n## Installation\n\n```bash\npip install ItsAGramLive\n```\n\n## Usage\n\n```python\nfrom ItsAGramLive import ItsAGramLive\n\nlive = ItsAGramLive()\n\n# or if you want to pre-define the username and password without args\n# live = ItsAGramLive(\n#    username='foo',\n#    password='bar'\n# )\n\nlive.start()\n```\n\n```bash\npython3 live_broadcast.py -u yourInstagramUsername -p yourPassword -proxy user:password@ip:port\n```\n\nThe output will give you the RTMP Server address and the Stream key (automatically copied to your clipboard)\n\n###  Usage with FFMPEG\nNote: It is not possible use commands like ```chat``` or ```wave``` with this script.\nThe live will be finish when the file finish the streaming.\n```python  \nimport argparse  \nimport subprocess  \nfrom ItsAGramLive import ItsAGramLive  \n  \nparser = argparse.ArgumentParser(add_help=True)  \nparser.add_argument(\"-u\", \"--username\", type=str, help=\"username\", required=True)  \nparser.add_argument(\"-p\", \"--password\", type=str, help=\"password\", required=True)  \nparser.add_argument(\"-f\", \"--file\", type=str, help=\"File\", required=True)  \nargs = parser.parse_args()  \n  \nlive = ItsAGramLive(username=args.username, password=args.password)  \n  \nif live.login():  \n    print(\"You'r logged in\")  \n  \n    if live.create_broadcast():  \n  \n        if live.start_broadcast():  \n            ffmpeg_cmd = \"ffmpeg \" \\  \n                         \"-rtbufsize 256M \" \\  \n                         \"-re \" \\  \n                         \"-i '{file}' \" \\  \n                         \"-acodec libmp3lame \" \\  \n                         \"-ar 44100 \" \\  \n                         \"-b:a 128k \" \\  \n                         \"-pix_fmt yuv420p \" \\  \n                         \"-profile:v baseline \" \\  \n                         \"-s 720x1280 \" \\  \n                         \"-bufsize 6000k \" \\  \n                         \"-vb 400k \" \\  \n                         \"-maxrate 1500k \" \\  \n                         \"-deinterlace \" \\  \n                         \"-vcodec libx264 \" \\  \n                         \"-preset veryfast \" \\  \n                         \"-g 30 -r 30 \" \\  \n                         \"-f flv '{stream_server}{stream_key}'\".format(\n\t\t\t\t\t\t                       file=args.file,\n                                                                       stream_server=live.stream_server,\n                                                                       stream_key=live.stream_key\n                                                                       )  \n  \n            print('CTRL+C to quit.')  \n            try:  \n                subprocess.call(ffmpeg_cmd, shell=True)  \n            except KeyboardInterrupt:  \n                pass  \n            except Exception as error:  \n                print(error)  \n                live.end_broadcast()  \n  \n            live.end_broadcast()\n```\n\n```bash\npython3 live_broadcast_ffmpeg.py -u yourInstagramUsername -p yourPassword -f /path/to/video/file.mp4\n```\n  \n## Commands\n\n- **info**\n  Show details about the broadcast\n- **mute comments**\n  Prevent viewers from commenting\n- **unmute comments**\n  Allow viewers do comments\n- **viewers**\n  List viewers\n- **chat**\n  Send a comment\n- **pin**\n  Send a comment and pin it\n- **unpin**\n  Remove a pinned comment\n- **comments**\n  Get the list of comments\n- **wave**\n  Wave to a viewer\n- **stop**\n  Terminate broadcast\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[ GNU GPLv3 ](https://choosealicense.com/licenses/gpl-3.0/)\n\n## Buy me a coffee\n\n\u003ca href=\"https://www.buymeacoffee.com/harrypython\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" style=\"height: 37px !important;\" \u003e\u003c/a\u003e\n\n## Instagram Bot\nCheck my Instagram Bot: [BurbnBot](https://github.com/harrypython/BurbnBot)\n","funding_links":["https://www.buymeacoffee.com/harrypython"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrypython%2Fitsagramlive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharrypython%2Fitsagramlive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrypython%2Fitsagramlive/lists"}