- 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.
- 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.
- 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.
- 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.
- Broadcast: Normal or pinned, with live progress and blocked-user cleanup.
- Admin Panel: Interactive owner GUI for admin management.
- Owner-only Ops:
/shell,/restart,/logare hard-gated.
- Python 3.10+
- FFmpeg (installed and in PATH)
- MongoDB (Database)
- Telegram Bot Token & API Keys
-
Clone the Repository
git clone https://github.com/Itzmepromgitman/ArgonsEncoder.git cd ArgonsEncoder -
Install Dependencies
pip install -r requirements.txt
-
Configure Environment Create a
.envfile 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
-
Run the Bot
bash start.sh
# 1. Build Image
docker build -t argonsencoder .
# 2. Run Container
docker run -d --env-file .env --name encoder_bot argonsencoder| 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 |
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
This project is licensed under the GNU GPL v3.0 β see LICENSE.
Built with β€οΈ by Argon
