The main entry point for the library.
binaryPath (string): Custom path to yt-dlp executable.ffmpegPath (string): Custom path to ffmpeg executable.downloadReturns a fluent builder for downloading videos. Chain methods to configure and call .run() to execute.
| Category | Methods |
|---|---|
| Format | .format(), .quality(), .type() |
| Output | .output(), .setOutputTemplate() |
| Audio | .extractAudio(), .audioFormat(), .audioQuality() |
| Embed | .embedThumbnail(), .embedSubs(), .embedMetadata() |
| Subtitles | .writeSubs(), .writeAutoSubs(), .subLangs() |
| Network | .proxy(), .rateLimit(), .cookies() |
| Events | .on('progress'), .on('error'), .on('finish') |
| Execute | .run() - returns Promise<DownloadFinishResult> |
downloadAsyncDownloads a video asynchronously with callback-style progress.
onProgress: Callback for download progress.format: Format options object.output: Custom output template.streamCreates a readable stream from a video URL.
Returns an object with pipe and pipeAsync methods.
getInfoAsyncFetches metadata for a video or playlist.
getFormatsAsyncGets available formats for a video.
getDirectUrlsAsyncGets direct media URLs for a video.
getThumbnailsAsyncGets all thumbnails for a video.
checkInstallationAsyncChecks if binaries are installed.
updateYtDlpAsyncUpdates the yt-dlp binary.