@distube/yt-dlp
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

npm peer dependency version npm GitHub Repo stars Discord

Buy Me a Coffee at ko-fi.com

@distube/yt-dlp

A DisTube playable extractor plugin using yt-dlp

What is a playable extractor plugin?

Feature

Requirement

Installation

npm install @distube/yt-dlp@latest

Usage

import { DisTube } from "distube";
import { YtDlpPlugin } from "@distube/yt-dlp";

const distube = new DisTube(client, {
  plugins: [new YtDlpPlugin({ update: true })],
});

Documentation

new YtDlpPlugin([YtDlpPluginOptions])

Create a DisTube's ExtractorPlugin instance.

  • YtDlpPluginOptions.update (boolean): Default is true. Update the yt-dlp binary when the plugin is initialized.

YtDlpPlugin should be the last plugin in the plugins array.

Environment Variables

  • YTDLP_DISABLE_DOWNLOAD: Set it to disable download yt-dlp binary.
  • YTDLP_URL: The URL of the yt-dlp binary to download.
  • YTDLP_DIR: The directory to download the yt-dlp binary.
  • YTDLP_FILENAME: The filename of the yt-dlp binary.

Troubleshooting

Failed to install (Status code: 403)

Your IP has been rate-limited by GitHub and the plugin cannot get the latest link to the yt-dlp binary. You can change the download link by using the environment variable YTDLP_URL, or disable download by setting YTDLP_DISABLE_DOWNLOAD to true.

export YTDLP_URL=https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
npm install @distube/yt-dlp@latest
export YTDLP_DISABLE_DOWNLOAD=true
npm install @distube/yt-dlp@latest

Failed to run the plugin (Status code: 403)

The plugin cannot download the yt-dlp binary on startup. Same as the previous case. You can disable download on startup by using new YtDlpPlugin({ update: false }) or using above solution.

import { DisTube } from "distube";
const distube = new DisTube(client, {
  plugins: [new YtDlpPlugin({ update: false })],
});

Package Sidebar

Install

npm i @distube/yt-dlp

Weekly Downloads

903

Version

2.0.1

License

MIT

Unpacked Size

66.5 kB

Total Files

9

Last publish

Collaborators

  • skick