{"id":17477824,"url":"https://github.com/samfun75/samfunstreamerbot","last_synced_at":"2025-04-10T09:26:55.705Z","repository":{"id":42450251,"uuid":"473220235","full_name":"Samfun75/SamfunStreamerBot","owner":"Samfun75","description":"Simple telegram bot to manage telegram's rtmps livestreams","archived":false,"fork":false,"pushed_at":"2022-04-19T18:24:43.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T23:19:25.444Z","etag":null,"topics":["bot","ffmpeg","rtmp","telegram"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Samfun75.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-23T14:18:09.000Z","updated_at":"2023-03-27T10:51:05.000Z","dependencies_parsed_at":"2022-09-10T06:00:18.337Z","dependency_job_id":null,"html_url":"https://github.com/Samfun75/SamfunStreamerBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samfun75%2FSamfunStreamerBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samfun75%2FSamfunStreamerBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samfun75%2FSamfunStreamerBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samfun75%2FSamfunStreamerBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samfun75","download_url":"https://codeload.github.com/Samfun75/SamfunStreamerBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190884,"owners_count":21062363,"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":["bot","ffmpeg","rtmp","telegram"],"created_at":"2024-10-18T20:09:49.075Z","updated_at":"2025-04-10T09:26:55.683Z","avatar_url":"https://github.com/Samfun75.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Samfun Streamer Bot\n\nThis is a simple telegram bot to manage rtmps livestreams of telegram groups and channels.\n\n## Requirments\n\n- Pyrogram [View](https://github.com/pyrogram/pyrogram) - Telegram Client\n- Pymongo - Mongodb for python\n- FFmpeg - Audio/Video processor\n- python-ffmpeg [View](https://github.com/jonghwanhyeon/python-ffmpeg) - FFmpeg python wrapper\n\n## Installation\n\n### Docker\n\nGuide for installation using docker:\n\n\u003ca href=\"docker/\" target=\"_blank\" rel=\"noreferrer\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/devicons/devicon/master/icons/docker/docker-original-wordmark.svg\" alt=\"Docker Instructions\" width=\"80\" height=\"80\"/\u003e \u003c/a\u003e\n\n### Heroku\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/Samfun75/SamfunStreamerBot)\n\u003cbr\u003e\n\n### Other systems\n\n**Clone repository**\n\n```bash\ngit clone https://github.com/Samfun75/SamfunStreamerBot\n```\n\n**Install FFmpeg**\n\nGo to [FFmpeg.org](https://ffmpeg.org/download.html)\n\n- For Windows install builds from gyan.dev\n- For Linux and Mac install the static builds\n\n**Change to repository directory**\n\n```bash\ncd SamfunStreamerBot\n```\n\n**Install requirements and dependencies**\n\n```python\npip3 install -r requirements.txt\n```\n\n**Create `config.ini`**\n\nUsing the sample available at `streamer/working_dir/config.ini.sample` create `streamer/working_dir/config.ini`.\n\n```ini\n# Here is a sample of config file and what it should include:\n\n# More info on API_ID and API_HASH can be found here: https://docs.pyrogram.org/intro/setup#api-keys\n\n[pyrogram]\napi_id = 1234567\napi_hash = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\napp_version = 1.0\ndevice_model = PC\nsystem_version = Windows\n\n# Where pyrogram plugins are located\n\n[plugins]\nroot = streamer/telegram/plugins\n\n\n# More info on Bot API Key/token can be found here: https://core.telegram.org/bots#6-botfather\n\n[bot-configuration]\nbot_token = 123456789:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nuser_session = BADGIDHwLxMhh8_q9xxxxxxxxxxxxxxxxxxxx # A user session string run the example here and input the result: https://docs.pyrogram.org/api/methods/export_session_string\nsession = StreamerBot\ndustbin = -100xxxxxxxxx # Used to store uploaded book. id of a channel where the bot is admin\nallowed_users = [123456789, 987654321] # Telegram id of users allowed to use the bot. If the bot is open to all put empty array like this []\n\n# Mongodb Credentials\n\n[database]\ndb_host = xxxxxxxxxx.xxxxx.mongodb.net or localhost # In this section db_host is the address of the machine where the MongoDB is running, with port number\ndb_username = username\ndb_password = password\ndb_name = BookdlBot\ndb_type = Mongo_Atlas (or Mongo_Community)\n\n```\n\n**Run bot with:**\n\n`python -m streamer`\n\nstop with \u003ckbd\u003eCTRL\u003c/kbd\u003e+\u003ckbd\u003eC\u003c/kbd\u003e\n\n## Usage\n\n- Send /start to start the bot\n- Send /help to see all the available commands\n\nNote: bot only works in private mode\n\n## Known Issue\n\n~~When bot is closed it might raise `ValueError: I/O operation on closed pipe asyncio` or `BrokenPipeError: [WinError 109] The pipe has been ended` or both for every livestream created and terminated. This only happens on Windows 10 afaik in my reseach. I don't think it happens to other systems but if I confirm othewise, I'll update the readme.~~ This was indirectly caused by a memory leak from python-ffmpeg but it seems to be fixed \n\n## TODO\n\n- Allow selected users to act as user_session. Meaning they can auto create livestreams on user_session owned chats\n- Add a 1 min(customizable) stream of channel image(or bot image) to give viewers to join the stream without missing the opening and circumvent a cut in the video because of telegram delay\n- Add playlist mode using Queue\n- Add scheduled streaming\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamfun75%2Fsamfunstreamerbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamfun75%2Fsamfunstreamerbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamfun75%2Fsamfunstreamerbot/lists"}