Skip to content

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Argons Encoder Banner

🎬 Argons Encoder

The Ultimate Telegram Video Encoding Bot

Python Pyrogram FFmpeg License

Features β€’ Installation β€’ Commands β€’ Structure


πŸš€ Key Features

πŸŽ₯ Professional Encoding

  • Codec Choice: libx264 / libx265 / VP9 / AV1 (mpeg4 supported with automatic flag mapping).
  • No Wasted Pixels: Never upscales β€” small sources keep their size.
  • Audio Control: Codec (AAC/AC3/copy), bitrate, track selection or strip audio entirely.
  • Subtitle Control: Copy or drop subtitle streams.
  • Sample Encodes: Test settings on the first N seconds before a full run.
  • Trim / Clip: Encode only a startβ†’end window.
  • Remux Mode: Container fixes via stream copy in seconds, zero quality loss.
  • Rename on Upload: Output name patterns like {original} [{res}].
  • Streamable Output: Choose video (instant playback) or document delivery.
  • Auto Thumbnails: Real frame previews on uploads when no custom thumb is set.

⚑ Intelligent Queue System

  • Concurrent Encoding: Tunable worker slots (MAX_CONCURRENT_JOBS).
  • Persistence: Queue state is debounced-persisted and restored after restarts.
  • Pause / Resume / Cancel: Right from the progress card β€” with proper process control.
  • Per-user Limits: Duplicate-job guard + configurable job cap per user.

🎨 Premium User Experience

  • Compact Progress Cards: Bar, size, ETA, speed, FPS β€” no server-noise.
  • Error Details: Friendly failure messages with a "Details" button (technical tail on tap).
  • Unified Queue View: Numbered jobs with per-job cancel + refresh buttons.
  • Live /status: Jobs, queue depth, CPU/RAM/disk, uptime.
  • Real /stats: Total encodes, bytes processed, space saved.

πŸ› οΈ Robust Management

  • Maintenance Mode: Reject new jobs while finishing current ones (/maint).
  • Ban / Unban: Enforced at intake and on every command (/ban, /unban).
  • Owner /jobs: Fleet-wide dashboard with one-tap cancel.
  • Startup Cleanup: Transient dirs wiped on boot; logs rotated under logs/.
  • Health Endpoint: aiohttp keep-alive server bound to $PORT.

πŸ›‘οΈ Admin Features

  • Broadcast: Normal or pinned, with live progress and blocked-user cleanup.
  • Admin Panel: Interactive owner GUI for admin management.
  • Owner-only Ops: /shell, /restart, /log are hard-gated.

πŸ› οΈ Installation

Prerequisites

  • Python 3.10+
  • FFmpeg (installed and in PATH)
  • MongoDB (Database)
  • Telegram Bot Token & API Keys

πŸ’» Local Setup

  1. Clone the Repository

    git clone https://github.com/Itzmepromgitman/ArgonsEncoder.git
    cd ArgonsEncoder
  2. Install Dependencies

    pip install -r requirements.txt
  3. Configure Environment Create a .env file in the root directory:

    TG_BOT_TOKEN=your_bot_token
    APP_ID=your_app_id
    API_HASH=your_api_hash
    OWNER_ID=your_telegram_id
    CHANNEL_ID=-100xxxxxxxx  # Your Log Channel ID
    DATABASE_URL=your_mongodb_uri
    DATABASE_NAME=Cluster0
    TG_BOT_WORKERS=8
    # Optional tuning
    MAX_CONCURRENT_JOBS=4
    MAX_CONCURRENT_UPLOADS=2
    MAX_JOBS_PER_USER=5
    UPDATE_ON_START=0
  4. Run the Bot

    bash start.sh

🐳 Docker Deployment

# 1. Build Image
docker build -t argonsencoder .

# 2. Run Container
docker run -d --env-file .env --name encoder_bot argonsencoder

πŸ€– Commands

Command Description Permission
/start Initialize the bot & register user. Everyone
/settings Configure video settings (Codec, CRF, Audio, Trim…). Everyone
/queue View your jobs (owner sees all). Everyone
/status Live jobs + server load dashboard. Everyone
/stats Real encode statistics. Everyone
/ss Generate screenshots from video. Everyone
/cancel <id> Cancel a specific job. Owner/User
/clear Clear your queued jobs. Everyone
/help Usage manual. Everyone
/cancelall Cancel ALL jobs (with confirmation). Owner Only
/info <id> Detailed job info. Owner Only
/jobs Fleet-wide job dashboard. Owner Only
/restart Restart the bot server. Owner Only
/log Retrieve the bot's log file. Owner Only
/shell Execute Python code. Owner Only
/broadcast Broadcast message to users. Admin Only
/ban /unban Manage banned users. Admin Only
/maint Toggle maintenance mode. Admin Only
/admin Open Admin Panel. Owner Only

πŸ“ Project Structure

ArgonsEncoder/
β”œβ”€β”€ bot/
β”‚   β”œβ”€β”€ func/           # Core Logic
β”‚   β”‚   β”œβ”€β”€ pyroutils/  # Progress Bar Utils
β”‚   β”‚   β”œβ”€β”€ encode.py   # Main Encoding Engine
β”‚   β”‚   β”œβ”€β”€ queue_manager.py
β”‚   β”‚   β”œβ”€β”€ download_manager.py
β”‚   β”‚   β”œβ”€β”€ upload_manager.py
β”‚   β”‚   β”œβ”€β”€ ffmpeg_utils.py
β”‚   β”‚   β”œβ”€β”€ editquery.py
β”‚   β”‚   └── preview.py
β”‚   β”œβ”€β”€ utils/          # Helpers (format, restart, shell)
β”‚   β”œβ”€β”€ config.py       # Config Loader (all tunables)
β”‚   β”œβ”€β”€ logger.py       # Rotating file + Telegram error logs
β”‚   β”œβ”€β”€ server.py       # aiohttp health endpoint
β”‚   └── __main__.py     # Entry Point
β”œβ”€β”€ plugins/            # Handlers
β”‚   β”œβ”€β”€ admin.py
β”‚   β”œβ”€β”€ encode.py
β”‚   β”œβ”€β”€ query.py
β”‚   β”œβ”€β”€ queue.py
β”‚   β”œβ”€β”€ screenshot.py
β”‚   β”œβ”€β”€ settings.py
β”‚   └── start.py
β”œβ”€β”€ tests/              # pytest suite
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ requirements.txt
└── start.sh

πŸ“œ License

This project is licensed under the GNU GPL v3.0 β€” see LICENSE.


Built with ❀️ by Argon

About

πŸš€ Argons Encoder: The Ultimate Video Automation Bot Transform your Telegram workflow with professional-grade encoding! 🎬 ✨ Key Features: Smart Queue: Auto-resume & persistence ⚑ Pro Quality: FFmpeg power with custom presets 🎞️ Total Control: Watermarks, metadata & admin panel πŸ›‘οΈ Fast, stable, and fully customizable. 🌟 Developed by Argon

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages