π Download Videos from YouTube, Instagram, TikTok, X (Twitter), Reddit, Facebook & Threads directly inside WhatsApp!
Convert, compress, and deliver high-speed social media videos straight to your WhatsApp chats.
Powered by Node.js Baileys, multi-threaded Python engines, and GPU hardware acceleration!
Quick Start β’ Supported Platforms β’ Local vs Cloud β’ Architecture β’ Web Dashboards
Features dynamic WhatsApp protocol version fetching, automatic session purge on 405/401 errors, auto-reconnect backoffs, and background yt-dlp auto-updaters!
|
Paste multiple social media links into a single WhatsApp message and the bot will automatically extract, queue, and download each video! |
Uses ffprobe to verify cached video integrity before servingβautomatically purging corrupt or zero-byte files from unexpected shutdowns.
|
Pre-warms the headless Chromium browser in a background thread on Flask boot up, eliminating launch latency for Instagram fallback downloads. |
| Concurrent requests for the same URL automatically pause and wait on a shared thread lockβeliminating duplicate downloads and saving 50%+ bandwidth. |
Live dashboard at http://localhost:5005/stats plus diagnostic endpoints at http://localhost:5006/health & http://127.0.0.1:5005/health.
|
| Platform | Format Supported | Auto-Detection | High-Quality Audio | Quality Selection |
|---|---|---|---|---|
| YouTube (Videos & Shorts) | π₯ .mp4 / π΅ .mp3 |
β Yes | β 320kbps | β
1080p, 720p, 480p |
| Instagram (Reels & Posts) | π₯ .mp4 |
β Yes | β Included | β
720p, 480p |
| TikTok (No-Watermark Reels) | π₯ .mp4 |
β Yes | β Included | β Auto |
| X / Twitter | π₯ .mp4 |
β Yes | β Included | β Auto |
Reddit (v.redd.it) |
π₯ .mp4 |
β Yes | β Included | β Auto |
| Threads | π₯ .mp4 |
β Yes | β Included | β Auto |
| Facebook (Public & Watch) | π₯ .mp4 |
β Yes | β Included | β Auto |
Important
- Runs on Your Laptop/PC: The bot operates whenever your computer is turned ON and connected to Wi-Fi.
- PC Sleep / Shutdown: If your laptop shuts down or goes to sleep, the bot safely pauses.
- Auto Catch-Up: As soon as you turn your PC back on, the bot automatically fetches and downloads any links sent to WhatsApp while you were away!
- Best for Personal Use: Free to run, uses your fast local GPU, and avoids social media cloud IP blocks.
Tip
- Want the bot running 24/7 without keeping your laptop on? You can host it on a Cloud Server / VPS (DigitalOcean, AWS, Linode, Docker, Render, Railway).
- Cloud Tip: Social networks often restrict datacenter IPs. When hosting in the cloud, supply a
cookies.txtfile or use a residential proxy inyt-dlpfor 100% download reliability.
graph TD
%% Styling
classDef user fill:#25D366,stroke:#128C7E,stroke-width:2px,color:#fff;
classDef node fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff;
classDef python fill:#1e293b,stroke:#f59e0b,stroke-width:2px,color:#fff;
classDef hw fill:#831843,stroke:#ec4899,stroke-width:2px,color:#fff;
A[π± WhatsApp User]:::user -->|1. Sends Link s in Chat| B[π Node.js Baileys Bridge]:::node
B -->|2. HTTP API /incoming| C[π Python Flask Server]:::python
subgraph Core Processing Pipeline
C -->|3. IO ThreadPool Download| D[π¬ yt-dlp / Playwright]:::python
D -->|4. CPU ThreadPool Compression| E[β‘ FFmpeg Hardware Encoder]:::hw
end
E -->|5. HTTP Session Pool /send| B
B -->|6. Instant WhatsApp Delivery| A
- WhatsApp Web QR Pairing Dashboard:
http://localhost:5006/qr - Live System Performance Dashboard:
http://localhost:5005/stats - Bridge Diagnostics API:
http://localhost:5006/health - Server Health API:
http://127.0.0.1:5005/health
- Start the bot on your computer.
- Open
http://localhost:5006/qrin your browser. - Open WhatsApp on your phone β Settings β Linked Devices β Link a Device.
- Scan the QR code. You're ready to go! π
git clone https://github.com/yash161004/whatsapp-video-bot.git
cd whatsapp-video-botNode.js Bridge Setup:
cd bridge
npm install
cd ..Python Server Setup:
cd server
python -m venv venv
# Windows:
venv\Scripts\activate
# Linux / macOS:
source venv/bin/activate
pip install -r requirements.txt
cd ..Create a .env file in the bridge/ directory:
PORT=5006
API_KEY=default_secret
MAX_CACHE_GB=5.0Simply double-click start_bot.bat or run:
start_bot.batKeep the bot running seamlessly in the background with auto-restarts:
npm install -g pm2
pm2 start ecosystem.config.js
pm2 savepm2 status # Check status of processes
pm2 logs # View live download & bot logs
pm2 restart all # Clean restart all services
pm2 stop all # Pause the botDistributed under the MIT License. See LICENSE for more details.
β Enjoying the bot? Give this repository a star to support the project! β