{"id":31910285,"url":"https://github.com/rhythmusbyte/telegram-video-trimmer-bot","last_synced_at":"2025-10-13T16:22:14.161Z","repository":{"id":316152587,"uuid":"1062196683","full_name":"RhythmusByte/Telegram-Video-Trimmer-Bot","owner":"RhythmusByte","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-23T00:29:20.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-23T02:32:50.165Z","etag":null,"topics":[],"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/RhythmusByte.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-23T00:08:22.000Z","updated_at":"2025-09-23T00:29:23.000Z","dependencies_parsed_at":"2025-09-23T02:33:57.789Z","dependency_job_id":"02e5c77c-dcff-48a6-a76c-e5d191c49264","html_url":"https://github.com/RhythmusByte/Telegram-Video-Trimmer-Bot","commit_stats":null,"previous_names":["rhythmusbyte/telegram-video-trimmer-bot"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/RhythmusByte/Telegram-Video-Trimmer-Bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RhythmusByte%2FTelegram-Video-Trimmer-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RhythmusByte%2FTelegram-Video-Trimmer-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RhythmusByte%2FTelegram-Video-Trimmer-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RhythmusByte%2FTelegram-Video-Trimmer-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RhythmusByte","download_url":"https://codeload.github.com/RhythmusByte/Telegram-Video-Trimmer-Bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RhythmusByte%2FTelegram-Video-Trimmer-Bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016059,"owners_count":26085799,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-13T16:22:12.858Z","updated_at":"2025-10-13T16:22:14.154Z","avatar_url":"https://github.com/RhythmusByte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram-Video-Trimmer-Bot\nThis is telegram bot script to trim a video and can be hosted on replit.\n\n## Setup Instructions:\n\n### Step 1: Create Telegram Bot\n1. Message [@BotFather](https://t.me/botfather) on Telegram\n2. Send `/newbot` command\n3. Choose a name and username for your bot\n4. Copy the bot token (looks like: `1234567890:ABCdefGHIjklMNOpqrsTUVwxyz`)\n\n### Step 2: Setup on Replit\n1. Create a new Python project on Replit\n2. Replace the contents of `main.py` with the bot code\n3. Create `requirements.txt` file with the dependencies listed above\n4. Create `.replit` file (optional, for configuration):\n   ```\n   run = \"python main.py\"\n   modules = [\"python-3.10\"]\n   ```\n\n### Step 3: Configure Environment Variables\n1. In Replit, go to \"Secrets\" (lock icon in sidebar)\n2. Add a new secret:\n   - Key: `BOT_TOKEN`\n   - Value: Your bot token from Step 1\n\n### Step 4: Install Dependencies and Run\n1. Replit should automatically install dependencies from `requirements.txt`\n2. If not, run in the Shell: `pip install -r requirements.txt`\n3. Click \"Run\" to start your bot\n\n## Bot Features:\n\n### 🎬 Main Features:\n- **Video Trimming**: Removes first 5 seconds from videos\n- **Thumbnail Extraction**: Creates PNG thumbnails from videos\n- **Interactive Menu**: User-friendly inline keyboard interface\n- **File Size Support**: Up to 1.2GB video files\n- **Format Support**: MP4, AVI, MOV, MKV, WMV, FLV, etc.\n\n### 📱 How to Use:\n1. Start the bot with `/start`\n2. Send a video file to the bot\n3. Choose \"Trim Video\" or \"Extract Thumbnail\"\n4. Wait for processing\n5. Receive your processed file!\n\n### 🛠️ Commands:\n- `/start` - Show main menu\n- `/help` - Show help information\n\n## File Structure:\n```\nyour-replit-project/\n├── main.py              # Main bot code\n├── requirements.txt     # Python dependencies\n├── replit.nix          # Replit configuration\n└── .replit             # Optional run configuration\n```\n\n## Troubleshooting:\n\n### Common Issues:\n1. **Bot not responding**: Check if BOT_TOKEN is set correctly in Secrets\n2. **FFmpeg errors**: Replit includes FFmpeg by default, but ensure `replit.nix` is configured\n3. **File too large**: Bot limits files to 1.2GB as requested\n4. **Processing timeout**: Large files may take time; the bot shows progress messages\n\n### Performance Notes:\n- Processing time depends on video file size\n- Replit provides good performance for video processing\n- The bot handles temporary files efficiently\n- Files are automatically cleaned up after processing\n\n## Security Features:\n- Temporary file handling (files deleted after processing)\n- File size validation\n- Error handling for corrupted files\n- User data cleanup after operations\n\n## Customization Options:\n- Change trim duration by modifying `start_time` parameter in `trim_video()`\n- Adjust thumbnail size by changing scale parameters in `extract_thumbnail()`\n- Modify maximum file size by changing `MAX_FILE_SIZE` constant\n- Add more video processing features using FFmpeg\n\n# License\nThe repo is licensed with [MIT License](LICENSE). The sole owner of this project is [@RhythmusByte](github.com/RhythmusByte)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmusbyte%2Ftelegram-video-trimmer-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhythmusbyte%2Ftelegram-video-trimmer-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmusbyte%2Ftelegram-video-trimmer-bot/lists"}