Skip to main content

SmartDL v3.18.0

bad connection? hold my retry loop.

A resilient, multi-threaded media downloader built for unstable networks. Designed for users behind weak connections and VPNs — SmartDL never gives up.

Python License: Apache-2.0 Buy Me a Coffee GitHub Downloads

If SmartDL saved you from a broken download at 3am — you know what to do. ☕
buymeacoffee.com/alisadeghil


Features

Core

  • YouTube — full format list (all resolutions, all audio tracks), video info panel
  • Aparat, Maktabkhooneh & Faradars — native support for Iranian video & education platforms
  • 1800+ sites via yt-dlp — TikTok, Instagram, Twitter/X, Reddit, Twitch, Vimeo, SoundCloud, and more
  • Podcasts — direct MP3/M4A links, RSS feeds, SoundCloud, Castbox, and more

Network Resilience

  • Infinite retry with backoff — waits and retries on network failure; never fails silently
  • Resume downloads — picks up exactly where it left off after a disconnect
  • Multi-threaded fragments — up to 16 concurrent fragment downloads
  • Smart error diagnosis — explains what went wrong and how to fix it
  • Proxy support — configure HTTP/SOCKS5 proxy at runtime (v2ray, Clash, Hiddify, Nekoray)

Download Features

  • Video clipping — download only a segment (--clip 00:01:30-00:05:00)
  • SponsorBlock — skip sponsor segments automatically
  • Subtitles — download, search, and embed subtitles in 50+ languages
  • Thumbnails — download and embed video thumbnails
  • Metadata — embed title, artist, and other metadata
  • Audio extraction — MP3, M4A, Opus, FLAC, WAV with quality control
  • Multiple formats — MP4, MKV, WebM, AVI output

Smart Mode

  • Save preferences — set default quality, format, audio settings once
  • Auto-apply — all downloads use your saved preferences

Queue & History

  • Download queue — add multiple URLs, process sequentially or in parallel
  • Download history — SQLite database with search, filter, and export
  • Subscriptions — follow channels and auto-download new uploads

Extra Features

  • Image galleries — download from Pixiv, DeviantArt, ArtStation, Flickr, Imgur
  • Torrent/magnet — download torrents via aria2c, transmission, or qBittorrent
  • Portable mode — run from USB stick without touching system directories
  • 12 CLI themes — Dracula, Catppuccin, Nord, Tokyo Night, and more
  • Persian/Farsi UI — full Persian language support
  • CLI automation — 40+ flags for scripting and automation

Requirements

  • Python 3.8+
  • ffmpeg — required for HD video (merge) and MP3 conversion

Install ffmpeg (Windows)

winget install Gyan.FFmpeg

Then close and reopen your terminal.


Installation

Option 1: pip (recommended)

pip install smart-dl

Option 2: Windows portable EXE (no Python install)

Download SmartDL-v*-win-x64.zip from the Releases page, verify SHA256SUMS.txt, extract, and run SmartDL.exe.

If Windows SmartScreen appears: the EXE is not code-signed. Choose More info → Run anyway, or install via pip instead. Antivirus false positives on PyInstaller onedir bundles are common; the zip hash on the release page lets you confirm the file you downloaded.

Option 3: clone and run

git clone https://github.com/alisadeghiaghili/smart-dl.git
cd smart-dl
python smart_dl.py

Python dependencies (yt-dlp, rich, requests) are declared in pyproject.toml. Install with pip install -e . (or pip install smart-dl). Optional auto-install on first interactive run is available via SMARTDL_AUTO_DEPS=1.


Usage

Interactive Mode

python smart_dl.py

On startup:

  1. Choose your output folder (default: ~/Downloads/SmartDL)
  2. Configure a proxy if needed (or press Enter to skip)
  3. Paste a URL (YouTube, Aparat, podcast, or any supported site)
  4. Select quality/format from the menu
  5. Download starts — with resume, retry, and progress bar

URL Prompt Shortcuts

Key Action
q Quit
p Proxy settings
s Download settings (retries, fragment threads)
c Cookie settings (browser auth)
i Install dependencies (ffmpeg, Node.js)

CLI Mode

# Basic download
smart-dl "https://youtube.com/watch?v=abc123"

# Quality and format (presets: worst, 360, 480, 720, 1080, 1440, 4k, 8k, best)
smart-dl URL -q 1080 -o ~/Downloads
smart-dl URL -q 4k --format mkv

# Video clipping
smart-dl URL --clip 00:01:30-00:05:00

# Audio extraction
smart-dl URL --audio-only --audio-format flac --audio-quality 320

# SponsorBlock
smart-dl URL --sponsorblock

# Subtitles
smart-dl URL --subtitles en,fa --embed-subs

# Thumbnails and metadata
smart-dl URL --thumbnail --embed-thumbnail --embed-metadata

# Batch download
smart-dl --batch urls.txt -o ~/Downloads

# Queue management
smart-dl --queue add URL1 URL2 URL3
smart-dl --queue start
smart-dl --queue pause
smart-dl --queue resume
smart-dl --queue list
smart-dl --queue stats

# Download history
smart-dl --history list --sort date
smart-dl --history search "keyword"
smart-dl --history stats

# Subscriptions
smart-dl --subscribe https://youtube.com/@channel
smart-dl --check-updates          # list new uploads
# SMARTDL_SUBS_AUTODL=1 smart-dl --check-updates  # also download them
smart-dl --my-subs

# Smart Mode
smart-dl --smart-mode on
smart-dl --smart-mode config  # interactive settings

# Image galleries
smart-dl https://www.pixiv.net/artworks/12345

# Education courses (Maktabkhooneh / Faradars / Coursera)
smart-dl "https://www.coursera.org/learn/machine-learning"
smart-dl "https://www.coursera.org/learn/machine-learning" --max-lessons 5
smart-dl "https://maktabkhooneh.org/course/..." --all   # remove the 20-lesson default cap

# Torrent
smart-dl --torrent magnet:?xt=urn:btih:...

# Themes
smart-dl --theme catppuccin
smart-dl --list-themes

# Persian UI
smart-dl --lang fa

# Proxy
smart-dl --proxy socks5://127.0.0.1:10808

# Portable mode
smart-dl --portable

# Podcasts
smart-dl "https://feeds.npr.org/510289/podcast.xml"
smart-dl "https://example.com/show.xml" --all-episodes
smart-dl "https://castbox.fm/channel/id2386830" --all-episodes
smart-dl "https://soundcloud.com/user/track"

# Quiet mode with file logging
smart-dl URL --quiet --log download.log

Notes

  • Failed downloads exit with code 1 and do not print a success message.
  • History records every download outcome (--history list / --history stats).
  • Portable mode (--portable or a portable.txt next to the app) stores config and databases under ./data.
  • Dependency auto-install is off by default. Set SMARTDL_AUTO_DEPS=1 only if you want first-run pip install.

Authenticated courses (Maktabkhooneh / Coursera / Faradars)

Paid or enrolled lessons need a logged-in browser session:

  1. Sign in to the site in Firefox/Edge/Chrome.
  2. In SmartDL interactive mode press c and pick that browser (or set cookie browser in config).
  3. Re-run the course URL. yt-dlp and the Coursera items API will reuse those cookies.

Faradars does not publish public lesson lists for most courses — use a course URL after login.

Alternative: export a Netscape cookies.txt from an extension and pass it:

smart-dl --cookies-file path/to/cookies.txt "https://www.youtube.com/watch?v=..."

Supported Platforms

Platform Support
YouTube (videos, playlists, channels, Shorts)
Aparat (videos, playlists)
TikTok / Instagram / Twitter / Reddit / Twitch / Vimeo / … via yt-dlp
1800+ yt-dlp sites via yt-dlp
Direct MP3/M4A links
RSS podcast feeds
Filimo / Namasha / Radio Javan metadata + yt-dlp
Maktabkhooneh / Faradars course outline + lessons via cookies (paid = your logged-in session)
Coursera course title + weekly modules (public); lecture items when browser cookies are available
Udemy / Hotmart / Teachable / … public metadata only — paid/DRM content is not downloadable without your own authorized access and will usually fail

Network Resilience

Built specifically for unstable connections:

  • Resumes partial downloads automatically (no re-downloading from scratch)
  • Exponential backoff retry (5s → 7s → 11s → ... up to 5 min)
  • 30-minute retry duration cap (configurable)
  • Fatal errors (ffmpeg missing, private video, copyright block) fail immediately
  • Connection drops are silently handled; download continues when network returns

Disclaimer

SmartDL is intended for personal use only. Downloading copyrighted content without permission may violate YouTube's Terms of Service and applicable laws in your country. The author is not responsible for any misuse of this tool. Always respect content creators and copyright holders.


☕ Support

SmartDL is free and always will be.
Sponsorships fund faster releases, better diagnostics, and long-term maintenance.

Buy Me a Coffee


License

Apache-2.0 — permissive with an explicit patent grant; proprietary tools may link without copyleft.

See ROADMAP.md for planned features.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smart_dl-3.18.0.tar.gz (128.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smart_dl-3.18.0-py3-none-any.whl (130.0 kB view details)

Uploaded Python 3

File details

Details for the file smart_dl-3.18.0.tar.gz.

File metadata

  • Download URL: smart_dl-3.18.0.tar.gz
  • Upload date:
  • Size: 128.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for smart_dl-3.18.0.tar.gz
Algorithm Hash digest
SHA256 fba3d0142f134c35382c190cc798fdd379fa89e9be42bfbf027928b0451f0f70
MD5 f29b59550fc19cebb164df895be31145
BLAKE2b-256 18bdc75489d6300a2e35ff278a8293c92f9b3eefc899a581be22f2c0f50f4479

See more details on using hashes here.

Provenance

The following attestation bundles were made for smart_dl-3.18.0.tar.gz:

Publisher: publish.yml on alisadeghiaghili/smart-dl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file smart_dl-3.18.0-py3-none-any.whl.

File metadata

  • Download URL: smart_dl-3.18.0-py3-none-any.whl
  • Upload date:
  • Size: 130.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for smart_dl-3.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31676484d317b8748bba9827e0706478b8a88559e3365816c8ee39505eee989e
MD5 6c91fae2c894fffe77572b96b8271dfd
BLAKE2b-256 afc82fe5327c0b8da9775551476d0f9edf9d32ffa2ae88287218f5a570355512

See more details on using hashes here.

Provenance

The following attestation bundles were made for smart_dl-3.18.0-py3-none-any.whl:

Publisher: publish.yml on alisadeghiaghili/smart-dl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.18.0 This release

2 files

3.17.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page