Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/play-dl/play-dl
Mainly used for Discord js Bots to play music.
https://github.com/play-dl/play-dl
deezer discord discord-js discordjs javascript music nodejs soundcloud soundcloud-dl spotify spotify-dl stream streaming typescript youtube youtube-dl
Last synced: about 1 month ago
JSON representation
Mainly used for Discord js Bots to play music.
- Host: GitHub
- URL: https://github.com/play-dl/play-dl
- Owner: play-dl
- License: gpl-3.0
- Created: 2021-08-07T10:17:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-09T10:56:16.000Z (7 months ago)
- Last Synced: 2024-07-30T12:17:59.266Z (about 1 month ago)
- Topics: deezer, discord, discord-js, discordjs, javascript, music, nodejs, soundcloud, soundcloud-dl, spotify, spotify-dl, stream, streaming, typescript, youtube, youtube-dl
- Language: TypeScript
- Homepage: https://play-dl.github.io/
- Size: 1.89 MB
- Stars: 204
- Watchers: 6
- Forks: 59
- Open Issues: 26
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Play-dl
A **light-weight** YouTube, SoundCloud, Spotify and Deezer streaming and searching library.
- Search by video, playlist/album, channel/artist
- Stream audio from YouTube and SoundCloud# Why play-dl ?
[ytdl-core](https://github.com/fent/node-ytdl-core) has some issues with miniget and also stream abort issues. On the other hand, [youtube-dl](https://github.com/ytdl-org/youtube-dl) is a perfect alternative but it takes time to launch. Hence, play-dl is created to avoid these issues along with providing comparatively faster performance than others.
[![Discord](https://img.shields.io/discord/888998674716315679?color=00aa00&label=%20Discord&logo=Discord)](https://discord.gg/8H3xWcv3D7)
[![NPM](https://img.shields.io/npm/v/play-dl.svg?color=00aa00&logo=npm)](https://www.npmjs.com/package/play-dl)## Support
You can contact us for support on our [chat server](https://discord.gg/8H3xWcv3D7).
### Installation
**Node.js 16.0.0 or newer is required.**
```bash
npm install play-dl@latest
pnpm add play-dl@latest
yarn add play-dl@latest
```### Importing
**TypeScript:**
```ts
import play from 'play-dl'; // Everythingimport { video_basic_info, stream } from 'play-dl'; // Individual functions
```**CommonJS modules:**
```js
const play = require('play-dl'); // Everything// Individual functions by using destructuring
const { video_basic_info, stream } = require('play-dl');
```**ES6 modules:**
```ts
import play from 'play-dl'; // Everythingimport { video_basic_info, stream } from 'play-dl'; // Individual functions
```## **Compatibility issues** - discord-player
Because discord-player doesn't work with raw opus packets you need to enable the compatibility mode in `play-dl`, if you want to use both frameworks together.- To fix the playback of YouTube videos with `discord-player`, you can disable some of play-dl's optimisations and fixes by setting the `discordPlayerCompatibility` option for `stream` and `stream_from_info` to true
- The `discordPlayerCompatiblity` option might break the playback of long YouTube videos.
- Even with the `discordPlayerCompatibility` option set you will not be able to use the seek option for `stream` and `stream_from_info`.
### [Documentation](https://play-dl.github.io/modules.html)
### [Examples](./examples)
### [Instructions](./instructions)