{"id":13826173,"url":"https://github.com/sanjit-sinha/Tg-MediaInfoBot","last_synced_at":"2025-07-09T00:32:38.178Z","repository":{"id":65708499,"uuid":"585799052","full_name":"sanjit-sinha/Tg-MediaInfoBot","owner":"sanjit-sinha","description":"Telegram Bot for generating Mediainfo, Screenshots and Video sample from Direct Download links,  Google Drive links or Telegram files.","archived":false,"fork":false,"pushed_at":"2023-06-18T05:03:50.000Z","size":171,"stargazers_count":103,"open_issues_count":0,"forks_count":91,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-05T09:14:55.596Z","etag":null,"topics":["ffmpeg","google-drive","google-drive-api","mediainfo","pyrogram","python","screenshot","slow-pics","telegram","telegram-bot","telegrambot-boilerplate","video-screenshot"],"latest_commit_sha":null,"homepage":"https://t.me/theopensourcerer","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/sanjit-sinha.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-01-06T05:20:22.000Z","updated_at":"2024-07-07T11:55:30.000Z","dependencies_parsed_at":"2024-01-15T16:22:20.208Z","dependency_job_id":"28929561-2ef6-4b63-986c-4388151e10c8","html_url":"https://github.com/sanjit-sinha/Tg-MediaInfoBot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"sanjit-sinha/TelegramBot-Boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjit-sinha%2FTg-MediaInfoBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjit-sinha%2FTg-MediaInfoBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjit-sinha%2FTg-MediaInfoBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjit-sinha%2FTg-MediaInfoBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanjit-sinha","download_url":"https://codeload.github.com/sanjit-sinha/Tg-MediaInfoBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225476384,"owners_count":17480215,"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":["ffmpeg","google-drive","google-drive-api","mediainfo","pyrogram","python","screenshot","slow-pics","telegram","telegram-bot","telegrambot-boilerplate","video-screenshot"],"created_at":"2024-08-04T09:01:33.320Z","updated_at":"2024-11-20T05:30:23.981Z","avatar_url":"https://github.com/sanjit-sinha.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://graph.org/file/d305c3259ca8d5324ee61.png\" align=\"center\" style=\"width: 30%\" /\u003e\n\n\n\u003ch2 align=\"center\"\u003eTelegram MediaInfoBot\u003c/h2\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://img.shields.io/github/stars/sanjit-sinha/Tg-MediaInfoBot\"\u003e\n\u003cimg src=\"https://img.shields.io/github/forks/sanjit-sinha/Tg-MediaInfoBot\"\u003e\n\u003cimg src=\"https://img.shields.io/github/repo-size/sanjit-sinha/Tg-MediaInfoBot\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/License-MIT-green.svg\"\u003e\n\u003cimg src=\"https://www.repostatus.org/badges/latest/active.svg\"\u003e\n\u003c/p\u003e\n\n----\n\n\u003cb\u003e This Telegram Bot can perform various tasks with media files, such as :- \u003c/b\u003e\n\n- Generating Mediainfo from Google Drive links, direct download links, and Telegram files, and displaying the information on a custom-designed website.\n- Creating screenshots from Google Drive links, direct download links, and Telegram files, and posting them on slow.pics\n- Generating custom-duration video samples from video files.\n- Creating spectrograms of Telegram audio files and displaying them as images.\n- pasting the text in the katb.in website.\n\n\nNote: This Bot is made on top of this repository -\u003e https://github.com/sanjit-sinha/TelegramBot-Boilerplate \n\n____\n\n\u003ch2 align=\"center\"\u003e Screenshots \u003c/h2\u003e \n\n![](https://graph.org/file/3f9346b6c369f4222cadb.jpg) |\n|----------------------------------------------------------|\n\n![](https://graph.org//file/499ec614796ce14e4cd3c.png)\n|----------------------------------------------------------|\n\n| ![](https://graph.org/file/8bcc663207262b45b0e8a.jpg) | ![](https://graph.org/file/9a0d26cb23963d96d28d6.jpg)|\n|--------------------------------------------------------|--------------------------------------------------------|\n\n\u003cp align=\"center\"\u003e\u003cb\u003eExmaple Links\u003cbr\u003e( \u003ca href=\"https://mediainfo.deta.dev/ohROIsS5\"\u003eMediainfo\u003c/a\u003e • \u003ca href=\"https://slow.pics/c/PiZz4LuS\"\u003eScreenshot\u003c/a\u003e • \u003ca href=\"https://graph.org//file/499ec614796ce14e4cd3c.png\"\u003eAudiograph\u003c/a\u003e )\u003c/b\u003e\u003c/p\u003e\n\n------\n\n\u003ch2 align=\"center\"\u003e Bot Commands and Usage\u003c/h2\u003e\n\n- `/m or /mediainfo  ` - Type link after command or Reply to telegram file to generate Mediainfo.\n- `/ss or /screenshot` - Type link after command or Reply to telegram video file to generate screenshots.\n- `/sample`  or `/trim` - Type link after command or Reply to telegram video file to generate sample video.\n- `/spek` or `/sox`  - Reply to Telegram file to generate audio spectogram.\n- `/paste` - paste your text in katb.in website. \n\n \u003cb\u003e Additional Flags for screenshot and mediainfo command :- \u003c/b\u003e\n\n**--count=10** *[ Number of screenshots. Default 10, Max 20 ]*, \n**--fps=10**  *[ Difference between two consecutive screenshots in seconds. Default 5, Max 15 ]*.\n**--time=01:20:10**  *[ Time from where the screenshots should be taken in HH:MM:SS format ]*,\n**--hdr**  *[ For HDR Videos.]*\n\n**--r** *[ For raw Mediainfo in document format. ]*\n\n (Few more commands `/start` `/help` `/ping` `/update` `/logs`)\n \n _____\n \n\u003ch2 align=\"center\"\u003e Bot Deployment \u003c/h2\u003e\n \n\u003cb\u003e Install and update Dependencies \n\n```sh\nsudo apt-get update \u0026\u0026 sudo apt-get upgrade -y\nsudo apt-get install -y python3-pip\nsudo pip3 install -U pip\nsudo apt-get install -y --no-install-recommends mediainfo ffmpeg\nsudo apt-get install libsox-fmt-mp3\nsudo apt-get install sox \n```\nclone the repository and install the requirements\n\n```sh\ngit clone https://github.com/sanjit-sinha/Tg-MediaInfoBot\ncd Tg-MediaInfoBot\npip3 install -U -r requirements.txt\n```\n\nNow edit the config vars by typing `nano config.env` and save it by pressing \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003eo\u003c/kbd\u003e and \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003ex\u003c/kbd\u003e.\n\u003cbr\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eGetting Google OAuth API credential.json file and token.json (important)\u003c/strong\u003e\u003c/summary\u003e\n\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003e\n\n**NOTES**\n- You need credentials.json and token.json in root folder for bot to work.\n- Old authentication changed, now we can't use bot or replit to generate token.json. You need OS with a local browser. For example `Termux`.\n- You can ONLY open the generated link from `token_generator.py` in local browser.\n\n**STEPS**\n- Visit the [Google Cloud Console](https://console.developers.google.com/apis/credentials)\n- Go to the OAuth Consent tab, fill it, and save.\n- Go to the Credentials tab and click Create Credentials -\u003e OAuth Client ID\n- Choose Desktop and Create.\n- Publish your OAuth consent screen App to prevent **token.json** from expire\n- Use the download button to download your credentials.\n- Rename that file into credentials.json and move that file to the root of repo.\n- Visit [Google API page](https://console.developers.google.com/apis/library)\n- Search for Google Drive Api and enable it in Google Cloud Console \n- Finally, run the script from inside of repository \n\u003cbr\u003e\n \n```sh\npip3 install google-api-python-client google-auth-httplib2 google-auth-oauthlib\npython3 token_generator.py\n```\n \u003c/ul\u003e\n\u003c/details\u003e\n\nNow you can start the bot by simply typing `bash start` or `python3 -m TelegramBot`\n\n\u003e **The bot will stop working once you logout from the server. You can run the bot 24*7 in the server by using tmux.**\n\u003e ```sh\n\u003e sudo apt install tmux -y\n\u003e tmux\n\u003e bash start\n\u003e ```\n\nNow the bot will run 24*7 even if you logout from the server. [Click here to know about tmux and screen advance commands.](https://grizzled-cobalt-5da.notion.site/Terminal-Multiplexers-to-run-your-command-24-7-3b2f3fd15922411dbb9a46986bd0e116)\n\u003cbr \u003e\n\n\u003e **Note** You can also Deploy Bot using Docker\n\u003e ```sh\n\u003e docker build . -t mediainfobot \n\u003e docker run mediainfobot\n\u003e```\n\n_____\n\n  \n\u003ch2 align=\"center\"\u003eCopyright and License\u003c/h1\u003e\n\u003cbr\u003e\n\u003cimg src=\"https://telegra.ph/file/b5850b957f081cfe5f0a6.png\" align=\"right\" width=\"110\"\u003e\n\n* copyright (C) 2023 by [Sanjit sinha](https://github.com/sanjit-sinha)\n* Licensed under the terms of the [The MIT License](https://github.com/sanjit-sinha/Tg-MediaInfoBot/blob/main/LICENSE)\n\n\n-------\n\n  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjit-sinha%2FTg-MediaInfoBot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanjit-sinha%2FTg-MediaInfoBot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjit-sinha%2FTg-MediaInfoBot/lists"}