yt-dlp ist ein funktionsreicher Befehlszeilen-Audio-/Video-Downloader mit Unterstützung für Tausende von Websites. Das Projekt ist ein Fork von youtube-dl basierend auf dem jetzt inaktiven youtube-dlc.
INSTALLATION
Detaillierte Anleitung
Freigabedateien
Aktualisieren
Abhängigkeiten
Kompilieren
NUTZUNG UND OPTIONEN
Allgemeine Optionen
Netzwerkoptionen
Geobeschränkung
Videoauswahl
Download-Optionen
Dateisystemoptionen
Miniaturbildoptionen
Internet-Verknüpfungsoptionen
Ausführlichkeits- und Simulationsoptionen
Problemumgehungen
Videoformatoptionen
Untertiteloptionen
Authentifizierungsoptionen
Nachbearbeitungsoptionen
SponsorBlock-Optionen
Extraktoroptionen
KONFIGURATION
Kodierung der Konfigurationsdatei
Authentifizierung mit netrc
Hinweise zu Umgebungsvariablen
AUSGABEVORLAGE
Beispiele für Ausgabevorlagen
FORMATAUSWAHL
Formate filtern
Formate sortieren
Beispiele für die Formatauswahl
METADATEN ÄNDERN
Beispiele für das Ändern von Metadaten
EXTRAKTOR-ARGUMENTE
Plugins
Plugins installieren
Entwicklung von Plugins
EINBETTEN VON YT-DLP
Einbettungsbeispiele
ÄNDERUNGEN VON YOUTUBE-DL
Neue Funktionen
Unterschiede im Standardverhalten
Veraltete Optionen
BEITRAGEN
Ein Problem öffnen
Entwickleranweisungen
WIKI
FAQ
Sie können yt-dlp mit den Binärdateien, pip oder einem Paketmanager eines Drittanbieters installieren. Detaillierte Anweisungen finden Sie im Wiki
| Datei | Beschreibung |
|---|---|
| yt-dlp | Plattformunabhängige Zipimport-Binärdatei. Benötigt Python (empfohlen für Linux/BSD ) |
| yt-dlp.exe | Windows (Win8+) eigenständige x64-Binärdatei (empfohlen für Windows ) |
| yt-dlp_macos | Universelle eigenständige ausführbare Datei für MacOS (10.15+) (empfohlen für MacOS ) |
| Datei | Beschreibung |
|---|---|
| yt-dlp_x86.exe | Windows (Win8+) eigenständige x86-Binärdatei (32 Bit). |
| yt-dlp_linux | Standalone-x64-Binärdatei für Linux |
| yt-dlp_linux_armv7l | Standalone-Linux-Binärdatei armv7l (32-Bit). |
| yt-dlp_linux_aarch64 | Standalone-Aarch64-Binärdatei (64-Bit) für Linux |
| yt-dlp_win.zip | Entpackte ausführbare Windows-Datei (keine automatische Aktualisierung) |
| yt-dlp_macos.zip | Entpackte ausführbare MacOS-Datei (10.15+) (keine automatische Aktualisierung) |
| yt-dlp_macos_legacy | Eigenständige x64-ausführbare Datei für MacOS (10.9+). |
| Datei | Beschreibung |
|---|---|
| yt-dlp.tar.gz | Quell-Tarball |
| SHA2-512SUMS | SHA512-Summen im GNU-Stil |
| SHA2-512SUMS.sig | GPG-Signaturdatei für SHA512-Summen |
| SHA2-256SUMS | SHA256-Summen im GNU-Stil |
| SHA2-256SUMS.sig | GPG-Signaturdatei für SHA256-Summen |
Der öffentliche Schlüssel, der zur Überprüfung der GPG-Signaturen verwendet werden kann, ist hier verfügbar. Beispielverwendung:
curl -L https://github.com/yt-dlp/yt-dlp/raw/master/public.key | gpg --import gpg --verify SHA2-256SUMS.sig SHA2-256SUMS gpg --verify SHA2-512SUMS.sig SHA2-512SUMS
Hinweis : Die Manpages, Shell-Vervollständigungsdateien (Autovervollständigung) usw. sind im Quell-Tarball verfügbar
Sie können yt-dlp -U zum Aktualisieren verwenden, wenn Sie die Release-Binärdateien verwenden
Wenn Sie mit pip installiert haben, führen Sie einfach denselben Befehl erneut aus, der zur Installation des Programms verwendet wurde
Informationen zu anderen Paketmanagern von Drittanbietern finden Sie im Wiki oder in deren Dokumentation
Derzeit gibt es drei Veröffentlichungskanäle für Binärdateien: stable , nightly und master .
stable ist der Standardkanal und viele seiner Änderungen wurden von Benutzern der nightly und master -Kanäle getestet.
Der nightly Kanal enthält Veröffentlichungen, die täglich um Mitternacht (UTC) erstellt werden sollen, um einen Überblick über die neuen Patches und Änderungen des Projekts zu erhalten. Dies ist der empfohlene Kanal für regelmäßige Benutzer von yt-dlp. Die nightly -Releases sind unter yt-dlp/yt-dlp-nightly-builds oder als Entwicklungsversionen des yt-dlp -PyPI-Pakets verfügbar (das mit dem Flag --pre von pip installiert werden kann).
Der master -Kanal verfügt über Releases, die nach jedem Push an den Master-Zweig erstellt werden. Diese verfügen über die allerneuesten Fixes und Ergänzungen, sind aber möglicherweise auch anfälliger für Regressionen. Sie sind unter yt-dlp/yt-dlp-master-builds verfügbar.
Bei Verwendung --update / -U wird eine Release-Binärdatei nur auf ihren aktuellen Kanal aktualisiert. --update-to CHANNEL kann verwendet werden, um zu einem anderen Kanal zu wechseln, wenn eine neuere Version verfügbar ist. --update-to [CHANNEL@]TAG kann auch zum Hoch- oder Herunterstufen auf bestimmte Tags eines Kanals verwendet werden.
Sie können auch --update-to <repository> ( <owner>/<repository> ) verwenden, um auf einen Kanal in einem völlig anderen Repository zu aktualisieren. Seien Sie jedoch vorsichtig, auf welches Repository Sie aktualisieren, da keine Überprüfung für Binärdateien aus verschiedenen Repositorys durchgeführt wird.
Beispielverwendung:
yt-dlp --update-to master wechselt zum master -Kanal und aktualisiert auf die neueste Version
yt-dlp --update-to [email protected] Upgrade/Downgrade zur Veröffentlichung auf stable -Kanal-Tag 2023.07.06
yt-dlp --update-to 2023.10.07 Upgrade/Downgrade auf Tag 2023.10.07 falls es auf dem aktuellen Kanal vorhanden ist
yt-dlp --update-to example/[email protected] Upgrade/Downgrade auf die Version aus dem example/yt-dlp -Repository, Tag 2023.09.24
Wichtig : Jeder Benutzer, der ein Problem mit der stable Version hat, sollte die nightly Version installieren oder aktualisieren, bevor er einen Fehlerbericht einreicht:
# To update to nightly from stable executable/binary: yt-dlp --update-to nightly # To install nightly with pip: python3 -m pip install -U --pre "yt-dlp[default]"
Die Python-Versionen 3.9+ (CPython) und 3.10+ (PyPy) werden unterstützt. Andere Versionen und Implementierungen funktionieren möglicherweise nicht ordnungsgemäß.
Während alle anderen Abhängigkeiten optional sind, werden ffmpeg und ffprobe dringend empfohlen
ffmpeg und ffprobe – Erforderlich zum Zusammenführen separater Video- und Audiodateien sowie für verschiedene Nachbearbeitungsaufgaben. Die Lizenz hängt vom Build ab
Es gibt Fehler in ffmpeg, die bei Verwendung zusammen mit yt-dlp verschiedene Probleme verursachen. Da ffmpeg eine so wichtige Abhängigkeit ist, stellen wir unter yt-dlp/FFmpeg-Builds benutzerdefinierte Builds mit Patches für einige dieser Probleme bereit. Einzelheiten zu den spezifischen Problemen, die durch diese Builds behoben werden, finden Sie in der Readme-Datei
Wichtig : Was Sie benötigen, ist ffmpeg Binary , NICHT das gleichnamige Python-Paket
certifi * – Stellt das Root-Zertifikatspaket von Mozilla bereit. Lizenziert unter MPLv2
brotli * oder brotlicffi – Unterstützung der Brotli-Inhaltskodierung. Beide lizenziert unter MIT 1 2
websockets * – Zum Herunterladen über Websocket. Lizenziert unter BSD-3-Klausel
Anfragen * – HTTP-Bibliothek. Für HTTPS-Proxy und Unterstützung für dauerhafte Verbindungen. Lizenziert unter Apache-2.0
Im Folgenden finden Sie Unterstützung für die Nachahmung von Browseranfragen. Dies kann für einige Websites erforderlich sein, die TLS-Fingerprinting verwenden.
curl_cffi (empfohlen) – Python-Bindung für curl-impersonate. Bietet Identitätswechselziele für Chrome, Edge und Safari. Lizenziert unter MIT
Kann mit der Gruppe curl-cffi installiert werden, z. B. pip install "yt-dlp[default,curl-cffi]"
Derzeit in den Builds yt-dlp.exe , yt-dlp_linux und yt-dlp_macos enthalten
mutagen * – Für --embed-thumbnail in bestimmten Formaten. Lizenziert unter GPLv2+
AtomicParsley – Für --embed-thumbnail in mp4 / m4a Dateien, wenn mutagen / ffmpeg dies nicht kann. Lizenziert unter GPLv2+
xattr , pyxattr oder setfattr – Zum Schreiben von xattr-Metadaten ( --xattr ) auf Mac und BSD . Lizenziert unter MIT, LGPL2.1 bzw. GPLv2+
pycryptodomex * – Zum Entschlüsseln von AES-128 HLS-Streams und verschiedenen anderen Daten. Lizenziert unter BSD-2-Klausel
phantomjs – Wird in Extraktoren verwendet, in denen Javascript ausgeführt werden muss. Lizenziert unter BSD-3-Klausel
Secretstorage * – Damit --cookies-from-browser auf den Gnome- Schlüsselbund zugreifen und gleichzeitig Cookies von Chromium -basierten Browsern unter Linux entschlüsseln kann. Lizenziert unter BSD-3-Klausel
Jeder externe Downloader, den Sie mit --downloader verwenden möchten
avconv und avprobe – Jetzt veraltete Alternative zu ffmpeg. Die Lizenz hängt vom Build ab
sponskrub – Zur Verwendung der jetzt veralteten sponskrub-Optionen. Lizenziert unter GPLv3+
rtmpdump – Zum Herunterladen von rtmp Streams. ffmpeg kann stattdessen mit --downloader ffmpeg verwendet werden. Lizenziert unter GPLv2+
mplayer oder mpv – Zum Herunterladen von rstp / mms Streams. ffmpeg kann stattdessen mit --downloader ffmpeg verwendet werden. Lizenziert unter GPLv2+
Um die Abhängigkeiten nutzen oder weiterverbreiten zu können, müssen Sie den jeweiligen Lizenzbedingungen zustimmen.
Die Standalone-Release-Binärdateien werden mit dem Python-Interpreter erstellt und die mit * gekennzeichneten Pakete sind enthalten.
Wenn Sie nicht über die erforderlichen Abhängigkeiten für eine Aufgabe verfügen, die Sie ausführen möchten, werden Sie von yt-dlp gewarnt. Alle derzeit verfügbaren Abhängigkeiten sind oben in der --verbose Ausgabe sichtbar
Um die eigenständige ausführbare Datei zu erstellen, benötigen Sie Python und pyinstaller (plus ggf. optionale Abhängigkeiten von yt-dlp). Die ausführbare Datei wird für dieselbe CPU-Architektur erstellt wie das verwendete Python.
Sie können die folgenden Befehle ausführen:
python3 devscripts/install_deps.py --include pyinstaller python3 devscripts/make_lazy_extractors.py python3 -m bundle.pyinstaller
Auf einigen Systemen müssen Sie möglicherweise py oder python anstelle von python3 verwenden.
python -m bundle.pyinstaller akzeptiert alle Argumente, die an pyinstaller übergeben werden können, wie zum Beispiel --onefile/-F oder --onedir/-D , was hier weiter dokumentiert wird.
Hinweis : Pyinstaller-Versionen unter 4.4 unterstützen die Installation von Python aus dem Windows Store ohne Verwendung einer virtuellen Umgebung nicht.
Wichtig : Das direkte Ausführen pyinstaller anstelle von python -m bundle.pyinstaller wird offiziell nicht unterstützt. Dies kann möglicherweise ordnungsgemäß funktionieren oder auch nicht.
Sie benötigen die Build-Tools python (3.9+), zip , make (GNU), pandoc * und pytest *.
Führen Sie nach der Installation einfach make aus.
Sie können stattdessen auch make yt-dlp ausführen, um nur die Binärdatei zu kompilieren, ohne die zusätzlichen Dateien zu aktualisieren. (Die mit * gekennzeichneten Build-Tools werden hierfür nicht benötigt)
devscripts/install_deps.py – Abhängigkeiten für yt-dlp installieren.
devscripts/update-version.py – Aktualisieren Sie die Versionsnummer basierend auf dem aktuellen Datum.
devscripts/set-variant.py – Legt die Build-Variante der ausführbaren Datei fest.
devscripts/make_changelog.py – Erstellen Sie ein Markdown-Änderungsprotokoll mit kurzen Commit-Nachrichten und aktualisieren Sie CONTRIBUTORS Datei.
devscripts/make_lazy_extractors.py – Lazy-Extraktoren erstellen. Wenn Sie dies vor dem Erstellen der Binärdateien (beliebige Variante) ausführen, wird deren Startleistung verbessert. Setzen Sie die Umgebungsvariable YTDLP_NO_LAZY_EXTRACTORS auf einen nicht leeren Wert, um das verzögerte Laden des Extraktors zwangsweise zu deaktivieren.
Hinweis: Weitere Informationen finden Sie in der --help .
Wenn Sie das Projekt auf GitHub forken, können Sie den Build-Workflow Ihres Forks ausführen, um die ausgewählten Versionen automatisch als Artefakte zu erstellen. Alternativ können Sie den Release-Workflow ausführen oder den nächtlichen Workflow aktivieren, um vollständige (Vor-)Releases zu erstellen.
yt-dlp [OPTIONS] [--] URL [URL...]
Ctrl+F ist dein Freund :D
-h, --help Print this help text and exit
--version Print program version and exit
-U, --update Update this program to the latest version
--no-update Do not check for updates (default)
--update-to [CHANNEL]@[TAG] Upgrade/downgrade to a specific version.
CHANNEL can be a repository as well. CHANNEL
and TAG default to "stable" and "latest"
respectively if omitted; See "UPDATE" for
details. Supported channels: stable,
nightly, master
-i, --ignore-errors Ignore download and postprocessing errors.
The download will be considered successful
even if the postprocessing fails
--no-abort-on-error Continue with next video on download errors;
e.g. to skip unavailable videos in a
playlist (default)
--abort-on-error Abort downloading of further videos if an
error occurs (Alias: --no-ignore-errors)
--dump-user-agent Display the current user-agent and exit
--list-extractors List all supported extractors and exit
--extractor-descriptions Output descriptions of all supported
extractors and exit
--use-extractors NAMES Extractor names to use separated by commas.
You can also use regexes, "all", "default"
and "end" (end URL matching); e.g. --ies
"holodex.*,end,youtube". Prefix the name
with a "-" to exclude it, e.g. --ies
default,-generic. Use --list-extractors for
a list of extractor names. (Alias: --ies)
--default-search PREFIX Use this prefix for unqualified URLs. E.g.
"gvsearch2:python" downloads two videos from
google videos for the search term "python".
Use the value "auto" to let yt-dlp guess
("auto_warning" to emit a warning when
guessing). "error" just throws an error. The
default value "fixup_error" repairs broken
URLs, but emits an error if this is not
possible instead of searching
--ignore-config Don't load any more configuration files
except those given to --config-locations.
For backward compatibility, if this option
is found inside the system configuration
file, the user configuration is not loaded.
(Alias: --no-config)
--no-config-locations Do not load any custom configuration files
(default). When given inside a configuration
file, ignore all previous --config-locations
defined in the current file
--config-locations PATH Location of the main configuration file;
either the path to the config or its
containing directory ("-" for stdin). Can be
used multiple times and inside other
configuration files
--plugin-dirs PATH Path to an additional directory to search
for plugins. This option can be used
multiple times to add multiple directories.
Note that this currently only works for
extractor plugins; postprocessor plugins can
only be loaded from the default plugin
directories
--flat-playlist Do not extract the videos of a playlist,
only list them
--no-flat-playlist Fully extract the videos of a playlist
(default)
--live-from-start Download livestreams from the start.
Currently only supported for YouTube
(Experimental)
--no-live-from-start Download livestreams from the current time
(default)
--wait-for-video MIN[-MAX] Wait for scheduled streams to become
available. Pass the minimum number of
seconds (or range) to wait between retries
--no-wait-for-video Do not wait for scheduled streams (default)
--mark-watched Mark videos watched (even with --simulate)
--no-mark-watched Do not mark videos watched (default)
--color [STREAM:]POLICY Whether to emit color codes in output,
optionally prefixed by the STREAM (stdout or
stderr) to apply the setting to. Can be one
of "always", "auto" (default), "never", or
"no_color" (use non color terminal
sequences). Use "auto-tty" or "no_color-tty"
to decide based on terminal support only.
Can be used multiple times
--compat-options OPTS Options that can help keep compatibility
with youtube-dl or youtube-dlc
configurations by reverting some of the
changes made in yt-dlp. See "Differences in
default behavior" for details
--alias ALIASES OPTIONS Create aliases for an option string. Unless
an alias starts with a dash "-", it is
prefixed with "--". Arguments are parsed
according to the Python string formatting
mini-language. E.g. --alias get-audio,-X
"-S=aext:{0},abr -x --audio-format {0}"
creates options "--get-audio" and "-X" that
takes an argument (ARG0) and expands to
"-S=aext:ARG0,abr -x --audio-format ARG0".
All defined aliases are listed in the --help
output. Alias options can trigger more
aliases; so be careful to avoid defining
recursive options. As a safety measure, each
alias may be triggered a maximum of 100
times. This option can be used multiple times--proxy URL Use the specified HTTP/HTTPS/SOCKS proxy. To enable SOCKS proxy, specify a proper scheme, e.g. socks5://user:[email protected]:1080/. Pass in an empty string (--proxy "") for direct connection --socket-timeout SECONDS Time to wait before giving up, in seconds --source-address IP Client-side IP address to bind to --impersonate CLIENT[:OS] Client to impersonate for requests. E.g. chrome, chrome-110, chrome:windows-10. Pass --impersonate="" to impersonate any client. Note that forcing impersonation for all requests may have a detrimental impact on download speed and stability --list-impersonate-targets List available clients to impersonate. -4, --force-ipv4 Make all connections via IPv4 -6, --force-ipv6 Make all connections via IPv6 --enable-file-urls Enable file:// URLs. This is disabled by default for security reasons.
--geo-verification-proxy URL Use this proxy to verify the IP address for some geo-restricted sites. The default proxy specified by --proxy (or none, if the option is not present) is used for the actual downloading --xff VALUE How to fake X-Forwarded-For HTTP header to try bypassing geographic restriction. One of "default" (only when known to be useful), "never", an IP block in CIDR notation, or a two-letter ISO 3166-2 country code
-I, --playlist-items ITEM_SPEC Comma separated playlist_index of the items to download. You can specify a range using "[START]:[STOP][:STEP]". For backward compatibility, START-STOP is also supported. Use negative indices to count from the right and negative STEP to download in reverse order. E.g. "-I 1:3,7,-5::2" used on a playlist of size 15 will download the items at index 1,2,3,7,11,13,15 --min-filesize SIZE Abort download if filesize is smaller than SIZE, e.g. 50k or 44.6M --max-filesize SIZE Abort download if filesize is larger than SIZE, e.g. 50k or 44.6M --date DATE Download only videos uploaded on this date. The date can be "YYYYMMDD" or in the format [now|today|yesterday][-N[day|week|month|year]]. E.g. "--date today-2weeks" downloads only videos uploaded on the same day two weeks ago --datebefore DATE Download only videos uploaded on or before this date. The date formats accepted are the same as --date --dateafter DATE Download only videos uploaded on or after this date. The date formats accepted are the same as --date --match-filters FILTER Generic video filter. Any "OUTPUT TEMPLATE" field can be compared with a number or a string using the operators defined in "Filtering Formats". You can also simply specify a field to match if the field is present, use "!field" to check if the field is not present, and "&" to check multiple conditions. Use a "" to escape "&" or quotes if needed. If used multiple times, the filter matches if at least one of the conditions is met. E.g. --match-filters !is_live --match-filters "like_count>?100 & description~='(?i)bcats & dogsb'" matches only videos that are not live OR those that have a like count more than 100 (or the like field is not available) and also has a description that contains the phrase "cats & dogs" (caseless). Use "--match-filters -" to interactively ask whether to download each video --no-match-filters Do not use any --match-filters (default) --break-match-filters FILTER Same as "--match-filters" but stops the download process when a video is rejected --no-break-match-filters Do not use any --break-match-filters (default) --no-playlist Download only the video, if the URL refers to a video and a playlist --yes-playlist Download the playlist, if the URL refers to a video and a playlist --age-limit YEARS Download only videos suitable for the given age --download-archive FILE Download only videos not listed in the archive file. Record the IDs of all downloaded videos in it --no-download-archive Do not use archive file (default) --max-downloads NUMBER Abort after downloading NUMBER files --break-on-existing Stop the download process when encountering a file that is in the archive --no-break-on-existing Do not stop the download process when encountering a file that is in the archive (default) --break-per-input Alters --max-downloads, --break-on-existing, --break-match-filters, and autonumber to reset per input URL --no-break-per-input --break-on-existing and similar options terminates the entire download queue --skip-playlist-after-errors N Number of allowed failures until the rest of the playlist is skipped
-N, --concurrent-fragments N Number of fragments of a dash/hlsnative video that should be downloaded concurrently (default is 1) -r,&n