Skip to content

5araang/videoad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

54 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VideoAd

VideoAd β€” Open Source Video & Audio Downloader

A self-hosted, zero-cloud video and audio downloader powered by a local Node.js server and a companion Chrome Extension.
Download videos, audio, and reels from YouTube, Instagram, and 1000+ supported sites β€” all from your own machine.

License: MIT Node.js yt-dlp Chrome Extension Open Source

πŸš€ Quick Start Β· πŸ“– Features Β· πŸ”Œ Extension Setup Β· πŸ›  Architecture Β· 🀝 Contributing

Important

πŸš€ One-Click Windows Installation:

  • Method A (Easiest): Open PowerShell (or Command Prompt) and run this one-line command to download and start the installer immediately:
    powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/Saarangggg/videoad/main/install_videoad.bat' -OutFile (Join-Path $env:USERPROFILE 'Desktop\install_videoad.bat') -UseBasicParsing; Start-Process -FilePath (Join-Path $env:USERPROFILE 'Desktop\install_videoad.bat') -Verb RunAs"
  • Method B: Right-click this link (install_videoad.bat) and choose "Save link as..." or "Save target as..." to download it directly as a .bat file (do not left-click it directly, or Chrome will just show it as text). Double-click the saved file to run.

πŸ“– What is VideoAd?

VideoAd is a fully open-source, locally hosted media downloader developed by 5araang that runs entirely on your own computer β€” no cloud servers, no subscriptions, no data collection. It pairs a sleek web dashboard (served at http://localhost:48774) with a Chrome Extension that detects videos on any webpage and lets you download them instantly with one click.

It is built on top of yt-dlp β€” the world's most powerful open-source media extractor β€” and supports 1000+ websites out of the box including YouTube, Instagram, Twitter/X, Reddit, Vimeo, TikTok, SoundCloud, and more.

Why self-hosted? Developed by 5araang with absolute privacy in mind. No rate limits. No ads. No accounts. No sending your history to a third-party server. Your downloads, your machine.


✨ Features

Feature Description
🎬 Video Downloads Download best quality MP4 β€” or choose a specific resolution (1080p, 720p, 480p…)
🎡 Audio Extraction Rip audio as high-quality MP3 directly from any video
πŸ“Έ Instagram Reels Download Instagram Reels and posts using one-click cookie connect
πŸ” On-Page Media Detector A floating toast appears automatically when a video is detected on any webpage
πŸ–± Right-Click Context Menu Right-click any video link or page to trigger an instant download
πŸ“Š Live Download Progress Real-time progress bar, speed, and ETA shown in the extension popup
🌐 1000+ Sites Supported Powered by yt-dlp β€” works on YouTube, Vimeo, Twitter, Reddit, TikTok, and hundreds more
πŸ”’ 100% Local & Private All downloads happen on your own machine β€” no external servers involved
⚑ Auto-Setup Installer One-click install_videoad.bat downloads yt-dlp and ffmpeg automatically if missing
πŸ›‘ Ad & Tracker Blocker Built-in blocker for video ads, banners, trackers, popup tabs, YouTube Music ads, and Instagram story ads
πŸ”Œ Chrome Extension Companion extension for in-page detection, popup controls, and download triggering

πŸš€ Quick Start

Prerequisites

  • Windows (10 or 11)
  • Node.js v18 or newer
  • Google Chrome browser

πŸ’Ύ Installation

To download and install VideoAd automatically on Windows:

⚑ Easiest: Run in PowerShell

Copy and paste this single command into your Windows PowerShell and press Enter. It will automatically download the installer, prompt for Admin elevation, and complete the setup:

powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/Saarangggg/videoad/main/install_videoad.bat' -OutFile (Join-Path $env:USERPROFILE 'Desktop\install_videoad.bat') -UseBasicParsing; Start-Process -FilePath (Join-Path $env:USERPROFILE 'Desktop\install_videoad.bat') -Verb RunAs"

πŸ“₯ Alternative: Manual Download

  1. Right-click this link (install_videoad.bat) and choose "Save link as..." or "Save target as..." to save the file to your computer. (Do not left-click it directly, or your browser will display the script's raw code as text.)
  2. Double-click the downloaded install_videoad.bat file to run the installer.

What the installer does:

  • βœ… Checks for Node.js.
  • βœ… Creates a clean directory at C:\VideoAd and extracts the source code.
  • βœ… Downloads standalone yt-dlp.exe and ffmpeg.exe binaries directly into C:\VideoAd.
  • βœ… Installs all Node.js dependencies (npm install --production).
  • βœ… Configures the videoad:// custom protocol handler for background launcher integration.
  • βœ… Places a VideoAd Downloader shortcut on your Desktop.
  • βœ… Starts the server silently in the background and opens the dashboard.

πŸ’» Manual Clone Setup

If you prefer to clone the repository manually:

  1. Clone the repository:
    git clone https://github.com/Saarangggg/videoad.git
    cd videoad
  2. Double-click install_videoad.bat (it will elevate to Admin, copy files to C:\VideoAd, and set up the silent background shortcut exactly like the one-click installer).

πŸ”Œ Chrome Extension Setup

Once setup is complete, load the Chrome Extension:

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable Developer mode (toggle switch in the top-right corner).
  3. Click "Load unpacked".
  4. Select the C:\VideoAd\chrome-extension directory (or the chrome-extension/ folder inside your manual clone).
  5. The VideoAd icon will appear in your toolbar. Open it and verify the status shows Connected.

πŸ›‘ Ad & Tracker Blocker

VideoAd includes a built-in, dynamic ad-blocking system inside the companion Chrome Extension:

  • Automatic Ad Skipping: Instantly skips video ads on YouTube and audio ads on YouTube Music (playback is muted and speed-boosted to 16x, automatically clicking the skip button).
  • Instagram Ad Skippers: Auto-skips sponsored Stories slides and hides sponsored posts from your home feed dynamically.
  • Redirection & Popunder Blocker: Intercepts and blocks programmatic popups and popunder ads (typical on movie/streaming sites) safely without violating Content Security Policy (CSP).
  • Clean Interface: Safely hides all visual display ads, companion ads, and sponsored banners without breaking main site navigation headers or video players.
  • Easy Toggle: Turn the ad blocker on or off at any time using the Ad & Tracker Blocker switch inside the extension settings panel.

πŸƒ Silent Background Running

VideoAd runs completely in the background with no terminal windows visible.

  • When you double-click the VideoAd Downloader Desktop shortcut, it starts silently and opens your browser.
  • When the Chrome Extension detects a video and prompts you to start, it launches the server automatically in the background using the custom registered protocol.
  • The console log windows will never interrupt or clutter your desktop!

To stop the background server, open a command prompt and run:

taskkill /f /im node.exe

Connecting Instagram

Instagram downloads require your session cookies. The extension handles this safely:

  1. Make sure you are logged into Instagram in Chrome
  2. Open the extension popup β†’ click the βš™ Settings gear icon
  3. In the Instagram section, click "Connect"
  4. The status dot turns 🟒 green once your session cookies are saved locally
  5. You can now download any Instagram Reel or post without interruption

Your cookies are saved locally on your machine in instagram_cookies.txt β€” they are never sent anywhere externally.


πŸ—‘ Uninstalling

To completely remove VideoAd from your system:

⚑ Easiest: Run in PowerShell

Copy and paste this single command into your Windows PowerShell and press Enter to stop the server, delete custom protocol registry keys, delete Desktop shortcuts, and remove the C:\VideoAd installation folder:

powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/Saarangggg/videoad/main/uninstall_videoad.bat' -OutFile (Join-Path $env:USERPROFILE 'Desktop\uninstall_videoad.bat') -UseBasicParsing; Start-Process -FilePath (Join-Path $env:USERPROFILE 'Desktop\uninstall_videoad.bat') -Verb RunAs"

πŸ“₯ Alternative: Manual Download

  1. Right-click this link (uninstall_videoad.bat) and choose "Save link as..." to save the uninstaller script.
  2. Double-click the downloaded uninstall_videoad.bat file to run the cleanup tool.

πŸ“ Project Structure

videoad/
β”œβ”€β”€ πŸ“„ server.js                  # Express backend β€” yt-dlp orchestration + API
β”œβ”€β”€ πŸ“„ package.json               # Node.js dependencies
β”œβ”€β”€ πŸ“„ setup_and_run.bat          # One-click installer & launcher
β”œβ”€β”€ πŸ“„ run_downloader.bat         # Quick server restart shortcut (Desktop)
β”œβ”€β”€ πŸ“ public/                    # Frontend web dashboard
β”‚   β”œβ”€β”€ index.html                # Download UI (paste URL, view progress)
β”‚   β”œβ”€β”€ app.js                    # Frontend logic
β”‚   └── style.css                 # Glassmorphism dark UI styles
β”œβ”€β”€ πŸ“ chrome-extension/          # Chrome Extension
β”‚   β”œβ”€β”€ manifest.json             # Extension configuration (Manifest V3)
β”‚   β”œβ”€β”€ popup.html                # Extension popup UI
β”‚   β”œβ”€β”€ popup.js                  # Popup interaction logic
β”‚   β”œβ”€β”€ background.js             # Service worker (context menus, messaging)
β”‚   β”œβ”€β”€ content.js                # Bridge between page and background
β”‚   β”œβ”€β”€ detector.js               # On-page media detection + floating toast
β”‚   β”œβ”€β”€ detector.css              # Toast overlay styling
β”‚   └── icon.png                  # Extension icon
β”œβ”€β”€ πŸ“ downloads/                 # Temporary download storage (auto-cleaned)
β”œβ”€β”€ πŸ“„ .gitignore
└── πŸ“„ README.md

πŸ›  Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Chrome Browser           β”‚
β”‚                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚   Chrome Extension         β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚  β”‚
β”‚  β”‚  β”‚ popup.js β”‚ β”‚detector β”‚ β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚  β”‚
β”‚  β”‚       β”‚ sendMessage        β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚  β”‚
β”‚  β”‚  β”‚   background.js    β”‚   β”‚  β”‚
β”‚  β”‚  β”‚  (Service Worker)  β”‚   β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚               β”‚ HTTP fetch        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Local Node.js Server :48774    β”‚
β”‚                                  β”‚
β”‚  POST /api/info    β†’ yt-dlp      β”‚
β”‚  POST /api/download β†’ yt-dlp     β”‚
β”‚  GET  /api/tasks   β†’ progress    β”‚
β”‚  POST /api/save-cookies β†’ file   β”‚
β”‚  GET  /api/instagram-cookie-statusβ”‚
β”‚                                  β”‚
β”‚   yt-dlp + ffmpeg (local bins)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technology Stack

Layer Technology
Backend Node.js Β· Express Β· child_process (spawn)
Media Extraction yt-dlp (standalone binary)
Audio/Video Merge FFmpeg (static binary)
Frontend UI HTML5 Β· Vanilla JavaScript Β· CSS3 (Glassmorphism)
Extension Chrome Extension Manifest V3 Β· Service Workers
Protocol Launcher Windows Registry HKCU\Software\Classes\videoad

🌐 Supported Sites

VideoAd supports all sites supported by yt-dlp, including:

YouTube Β· Instagram Β· Twitter / X Β· TikTok Β· Reddit Β· Vimeo Β· Dailymotion Β· SoundCloud Β· Twitch Β· Facebook Β· Pinterest Β· LinkedIn Β· Bilibili Β· and 1000+ more β†’


πŸ”§ Configuration & Usage

Starting the server manually

npm start
# Server runs at http://localhost:48774

API Endpoints

Method Endpoint Description
POST /api/info Fetch video title, thumbnail, duration, formats
POST /api/download Start a background download task
GET /api/tasks List all active download tasks
GET /api/download-file/:id Serve a completed download file
POST /api/cancel/:id Cancel an active download
POST /api/save-cookies Save Instagram session cookies from extension
GET /api/instagram-cookie-status Check if Instagram cookies are saved
GET /api/extension-path Serve extension path for self-registration

Download Types

Type Format Notes
video MP4 (best quality) Merges best video + audio streams via FFmpeg
audio MP3 Strips audio track and converts
video + resolution MP4 (custom height) e.g. limit to 720p

πŸ›‘ Privacy & Security

  • No telemetry β€” the app never phones home or logs anything externally.
  • No authentication β€” runs on localhost only (accessible from your LAN if needed).
  • Cookies stay local β€” Instagram session cookies are written to instagram_cookies.txt on your own machine only.
  • Auto file cleanup β€” downloaded files in the /downloads/ folder are automatically deleted after 1 hour.
  • .gitignore protected β€” instagram_cookies.txt, *.pem, node_modules/, and downloads/ are excluded from version control.

🀝 Contributing

Contributions are welcome and appreciated! Whether it's a bug fix, new feature, or documentation improvement.

How to Contribute

  1. Fork the repository
  2. Create a branch for your feature: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -m "Add my feature"
  4. Push to the branch: git push origin feature/my-new-feature
  5. Open a Pull Request on GitHub

Ideas for Contributions

  • Add Firefox extension support
  • Subtitle/caption download option
  • Playlist batch download support
  • Download history / library view
  • macOS / Linux setup script equivalents
  • Cookie connect support for Twitter, TikTok

πŸ“‹ Troubleshooting

Server won't start?

  • Make sure Node.js is installed: node --version
  • Delete node_modules/ and run npm install again

yt-dlp or ffmpeg not found?

  • Re-run setup_and_run.bat β€” it will re-download missing binaries automatically

Instagram downloads fail?

  • Make sure you're logged into Instagram in Chrome
  • Open the extension popup β†’ Settings β†’ Instagram β†’ click Connect
  • The status dot must be 🟒 green before attempting a download

"Extension context invalidated" errors in console?

  • This is harmless β€” it happens when the extension reloads while pages are open
  • Reload the extension at chrome://extensions/ to reset

Chrome cookie database locked?

  • Do NOT use --cookies-from-browser manually β€” use the extension Connect button instead (it reads cookies through the Chrome API, bypassing the file lock entirely)

πŸ“œ License

This project is open source and available under the MIT License.

MIT License β€” Copyright (c) 2025 Saarang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...

⭐ Star History

If VideoAd has been useful to you, please consider giving it a ⭐ on GitHub β€” it helps others discover the project!

GitHub stars


Made with ❀️ by Saarang (Instagram)

⬆ Back to top

About

A self-hosted, private video & audio downloader for YouTube, Instagram, and 1000+ sites. Features a companion Chrome extension, built-in ad blocker, and a one-click automated Windows installer.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages