Zum Hauptinhalt springen

yt-dlp mit aria2 auf 16x Download-Geschwindigkeit tunen

Standardmäßig nutzt yt-dlp einen Single-Thread-Downloader, der oft durch CDN-Ratenbegrenzungen ausgebremst wird. Durch die Integration von aria2c als externe Engine nutzen Sie bis zu 16 parallele Verbindungen pro Stream.

1. Leistungsvergleich: Nativer Downloader vs. aria2

Video-CDNs drosseln einzelne TCP-Verbindungen häufig. Durch die Aufteilung in 16 parallele Byte-Bereiche nutzt aria2 Ihre Bandbreite voll aus:

Video-Qualität & Größe yt-dlp Nativ (1 Stream) yt-dlp + aria2 (16 Verbindungen) Geschwindigkeitsvorteil
1080p 60fps (850 MB) 2m 45s (5.1 MB/s) 14s (60.7 MB/s) 11.8x Faster ⚡
4K UHD 60fps HDR (3.4 GB) 9m 12s (6.2 MB/s) 38s (89.5 MB/s) 14.5x Faster ⚡
8K 60fps AV1 (9.8 GB) 28m 40s (5.7 MB/s) 1m 48s (92.4 MB/s) 15.9x Faster ⚡

2. Wichtige Kommandozeilen-Befehle

Übergeben Sie aria2c mit dem Parameter --downloader und --downloader-args an yt-dlp:

yt-dlp --downloader aria2c --downloader-args "aria2c:-x 16 -s 16 -k 1M" "https://www.youtube.com/watch?v=VIDEO_ID"

Erklärung der Parameter:

  • --downloader aria2c: Weist yt-dlp an, den eigentlichen Download an aria2c zu übergeben.
  • aria2c:-x 16: Setzt --max-connection-per-server=16 (maximale TCP-Verbindungen pro Host).
  • aria2c:-s 16: Setzt --split=16 (teilt die Datei in 16 parallele Segmente auf).
  • aria2c:-k 1M: Setzt --min-split-size=1M.
  • aria2c:-j 4: Maximale gleichzeitige Video-Downloads in Playlists.

⚡ Interaktiver yt-dlp + aria2 Befehlsgenerator

Wählen Sie Ihre Optionen, um den optimalen Befehl zu generieren:

yt-dlp --downloader aria2c --downloader-args "aria2c:-x 16 -s 16 -k 1M" -f "bestvideo+bestaudio/best" --merge-output-format mkv --embed-subs --embed-chapters "URL"

3. Fortgeschrittene Praxis-Befehle

Befehle für Playlists, Cookie-Authentifizierung und Proxy-Verbindungen:

A. Gesamte Playlists laden mit Archiv-Historie

Vermeiden Sie doppelte Downloads mit downloaded_archive.txt:

yt-dlp --downloader aria2c \
  --downloader-args "aria2c:-x 16 -s 16 -k 1M -j 4" \
  --download-archive downloaded_archive.txt \
  -o "%(playlist_title)s/%(playlist_index)s - %(title)s.%(ext)s" \
  "https://www.youtube.com/playlist?list=PLAYLIST_ID"

B. Browser-Cookies für 403-Bypass & Altersbeschränkungen

Übergeben Sie Session-Cookies aus Ihrem Browser für geschützte Videos:

yt-dlp --cookies-from-browser chrome \
  --downloader aria2c \
  --downloader-args "aria2c:-x 16 -s 16 -k 1M" \
  "https://www.youtube.com/watch?v=VIDEO_ID"

C. Tunnelung über SOCKS5 / HTTP-Proxy

Geo-Blockaden umgehen mit Proxy-Einstellungen:

yt-dlp --proxy "socks5://127.0.0.1:1080" \
  --downloader aria2c \
  --downloader-args "aria2c:--all-proxy=http://127.0.0.1:1080 -x 16 -s 16" \
  "https://www.youtube.com/watch?v=VIDEO_ID"

4. Dauerhafte Konfiguration über yt-dlp.conf

Erstellen Sie eine globale yt-dlp.conf Datei, um aria2 immer standardmäßig zu nutzen:

Pfad zur Konfigurationsdatei:

  • Windows: %APPDATA%\yt-dlp\config
  • Linux / macOS: ~/.config/yt-dlp/config
  • Android (Termux): ~/.config/yt-dlp/config
# Production yt-dlp.conf
# 1. Use aria2 as external multi-connection engine
--downloader aria2c
--downloader-args "aria2c:-x 16 -s 16 -k 1M --retry-wait=3 --max-tries=5"

# 2. Automatically select highest quality streams and remux to MKV
-f "bestvideo+bestaudio/best"
--merge-output-format mkv

# 3. Embed artwork, chapters, and metadata
--embed-chapters
--embed-metadata
--embed-thumbnail

# 4. Standard clean output naming
-o "~/Downloads/Videos/%(title)s [%(id)s].%(ext)s"

5. Fehlerbehebung & FAQ

Q1: "ERROR: aria2c exited with code 1 / 3 / 9" oder "HTTP 403 Forbidden"?

Ursache: Temporäre Tokens verfallen oder der User-Agent weicht ab.
Lösung: Verbindungen auf 8 reduzieren: --downloader-args "aria2c:-x 8 -s 8".

Q2: "External downloader aria2c not found"?

Lösung: aria2c in den System-PATH aufnehmen oder unter Windows direkt neben yt-dlp.exe ablegen.

Q3: Funktioniert aria2 bei Live-Streams (HLS / m3u8)?

Antwort: Nein, aria2 ist für statische Dateien optimiert. Bei Live-Streams nutzt yt-dlp automatisch den nativen Downloader oder ffmpeg.