Dual-mode audio library: HTTP streaming proxy + Discord player (Lavalink alternative). Supports YouTube, Spotify, SoundCloud with audio filters.
npm install streamify-audioA dual-mode Node.js audio streaming engine that actually works with YouTube.



---
YouTube breaks music bots constantly. Lavalink times out. DisTube uses fragmented formats that fail. Most libraries don't work reliably anymore.
Streamify works because it:
- Uses format 18 (progressive MP4, not fragmented DASH)
- Uses web_creator player client (bypasses restrictions)
- Pipes directly to Discord (no HTTP timeouts)
- Relies on yt-dlp (actively maintained, adapts fast)
---
Streamify offers two ways to stream audio:
| Mode | Use Case | How It Works |
|------|----------|--------------|
| ๐ฎ Discord Player | Discord music bots | Direct pipe to @discordjs/voice |
| ๐ HTTP Server | Web apps, other platforms, debugging | REST API with stream URLs |
Both modes share the same providers, filters, and streaming engine.
---
Streamify is built to be a universal audio engine. It supports:
- YouTube: Videos, Music, Shorts, Live, Playlists
- Spotify: Tracks, Albums, Playlists (resolved to YouTube)
- SoundCloud: Tracks
- Twitch: Live streams
- Mixcloud: Mixes and DJ sets
- Bandcamp: Tracks and Albums
- Direct URLs: Public raw audio links (MP3, OGG, WAV, etc.)
- Local Files: Absolute or relative paths on the host system
---
``bash`
npm install streamify-audio
For Discord bots โ plays directly in voice channels.
`bash`
npm install @discordjs/voice @discordjs/opus
`javascript
const { Client, GatewayIntentBits } = require('discord.js');
const Streamify = require('streamify-audio');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent
]
});
const manager = new Streamify.Manager(client, {
cookiesPath: './cookies.txt'
});
client.on('messageCreate', async (message) => {
if (message.content.startsWith('!play')) {
const query = message.content.slice(6);
const vc = message.member.voice.channel;
const result = await manager.search(query);
const player = await manager.create(message.guild.id, vc.id);
player.on('trackStart', (track) => {
message.channel.send(๐ต Now playing: ${track.title});
});
await player.play(result.tracks[0]);
}
});
client.login(process.env.TOKEN);
`
For web apps, external services, or any platform that can consume audio streams.
`javascript
const Streamify = require('streamify-audio');
const streamify = new Streamify({
port: 8787,
host: '0.0.0.0'
});
await streamify.start();
console.log('Server running at http://localhost:8787');
// Search for tracks
const results = await streamify.youtube.search('never gonna give you up');
console.log(results.tracks[0].title);
// Get a stream URL (playable in any audio player)
const url = streamify.youtube.getStreamUrl(results.tracks[0].id);
// โ http://localhost:8787/youtube/stream/dQw4w9WgXcQ
// With filters
const urlWithFilters = streamify.youtube.getStreamUrl('dQw4w9WgXcQ', {
bass: 10,
speed: 1.25,
nightcore: true
});
// โ http://localhost:8787/youtube/stream/dQw4w9WgXcQ?bass=10&speed=1.25&nightcore=true
`
---
When running in HTTP mode, Streamify exposes a REST API:
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /health | Server status |GET
| | /stats | Memory, uptime, active streams |GET
| | /streams | List all active streams |GET
| | /youtube/search?q=query | Search YouTube |GET
| | /youtube/info/:id | Get track info |GET
| | /youtube/stream/:id | Stream audio (OGG/Opus) |GET
| | /spotify/search?q=query | Search Spotify |GET
| | /spotify/stream/:id | Stream Spotify track |GET
| | /soundcloud/search?q=query | Search SoundCloud |GET
| | /soundcloud/stream/:id | Stream SoundCloud track |GET
| | /twitch/stream/:channel | Stream Twitch live |GET
| | /mixcloud/stream/:id | Stream Mixcloud set |GET
| | /bandcamp/stream/:id | Stream Bandcamp track |GET
| | /http/stream/:base64_url | Stream from direct URL |GET
| | /local/stream/:base64_path | Stream local file |GET
| | /search?q=query&source=... | Generic search across providers |GET
| | /stream/:source/:id | Generic stream endpoint |
Add query parameters to /stream endpoints for real-time audio processing:
``
/youtube/stream/dQw4w9WgXcQ?bass=10&speed=1.25&nightcore=true
`html`
`javascript
// Search
const response = await fetch('http://localhost:8787/youtube/search?q=lofi+beats');
const { tracks } = await response.json();
// Play in browser
const audio = new Audio(http://localhost:8787/youtube/stream/${tracks[0].id});`
audio.play();
---
| Feature | Discord | HTTP |
|---------|:-------:|:----:|
| ๐ต YouTube, Spotify, SoundCloud | โ
| โ
|
| ๐ฎ Twitch, Mixcloud, Bandcamp | โ
| โ
|
| ๐ Local Files & Direct URLs | โ
| โ
|
| ๐บ Voice Channel Status | โ
| โ |
| ๐ Advanced Search Filters | โ
| โ
|
| ๐ Playlists & Albums | โ
| โ
|
| ๐๏ธ 30+ Stackable Filters | โ
| โ
|
| ๐๏ธ 15-Band Equalizer | โ
| โ
|
| ๐จ 15 EQ Presets | โ
| โ
|
| ๐ Seamless Transitions | โ
| โ
|
| โญ๏ธ Instant Skip (prefetch) | โ
| โ |
| โธ๏ธ Auto-pause when alone | โ
| โ |
| โถ๏ธ Auto-resume on rejoin | โ
| โ |
| ๐ช Auto-leave on inactivity | โ
| โ |
| ๐ซ Sponsorblock | โ
| โ
|
| ๐ Timing & Performance Logs | โ
| โ
|
| ๐ No Lavalink/Java needed | โ
| โ
|
---
Show what's playing directly in the sidebar of the voice channel.
`javascript`
const manager = new Streamify.Manager(client, {
voiceChannelStatus: {
enabled: true,
template: '๐ถ Playing: {title} | {requester}'
}
});
Filter for live streams, sort results, or filter by artist.
`javascript
const results = await manager.search('lofi hip hop', {
source: 'youtube', // youtube, spotify, soundcloud
type: 'live', // video, live, playlist
sort: 'popularity', // relevance, popular, latest
limit: 10
});
// Artist search - filters results to only include tracks by that artist
const artistTracks = await manager.search('Drake', {
source: 'spotify',
artist: 'Drake', // filters results to tracks BY this artist
limit: 5
});
`
`javascript
const player = manager.get(guildId);
// Add tracks
player.queue.add(track);
player.queue.addMany(tracks);
// Controls
await player.skip();
await player.previous();
await player.seek(30000); // 30 seconds
// Queue operations
player.queue.shuffle();
player.queue.move(0, 5);
player.queue.remove(2);
player.queue.clear();
// Loop modes
player.setLoop('off'); // No loop
player.setLoop('track'); // Loop current track
player.setLoop('queue'); // Loop entire queue
`
`javascriptPlaying: ${track.title}
player.on('trackStart', (track) => {
console.log();
});
player.on('trackEnd', (track, reason) => {
console.log(Ended: ${track.title} (${reason}));
});
player.on('queueEnd', () => {
console.log('Queue finished');
});
player.on('trackError', (track, error) => {
console.error(Error: ${error.message});
});
// Voice events
player.on('userJoin', (member, count) => { });
player.on('userLeave', (member, count) => { });
player.on('channelEmpty', () => { });
player.on('autoPause', (userCount) => { });
player.on('autoResume', (userCount) => { });
`
`javascript`
const manager = new Streamify.Manager(client, {
autoLeave: {
enabled: true,
emptyDelay: 30000, // Leave after 30s if channel empty
inactivityTimeout: 300000 // Leave after 5min of no playback
},
autoPause: {
enabled: true,
minUsers: 1 // Pause when fewer than 1 user (excluding bot)
},
autoplay: {
enabled: true,
maxTracks: 5 // Add up to 5 related tracks when queue ends
}
});
---
Both modes support the same filters:
`javascript
// Discord mode
await player.setFilter('bass', 10);
await player.setFilter('nightcore', true);
await player.setPreset('rock');
// HTTP mode (via URL params)
const url = streamify.getStreamUrl('youtube', 'dQw4w9WgXcQ', {
bass: 10,
nightcore: true,
preset: 'rock'
});
`
flat ยท rock ยท pop ยท jazz ยท classical ยท electronic ยท hiphop ยท acoustic ยท rnb ยท latin ยท loudness ยท piano ยท vocal ยท bass_heavy ยท treble_heavy
All available filters
| Filter | Type | Description |
|--------|------|-------------|
| bass | -20 to 20 | Bass boost/cut |treble
| | -20 to 20 | Treble boost/cut |speed
| | 0.5 to 2.0 | Playback speed |pitch
| | 0.5 to 2.0 | Pitch shift |volume
| | 0 to 200 | Volume % |nightcore
| | boolean | Speed + pitch up |vaporwave
| | boolean | Speed + pitch down |subboost
| | boolean | Extreme sub-bass boost |reverb
| | boolean | Room acoustics effect |surround
| | boolean | Surround sound mapping |boost
| | boolean | Clarity & volume boost |8d
| | boolean | Rotating audio |karaoke
| | boolean | Reduce vocals |bassboost
| | boolean | Heavy bass |tremolo
| | object | Volume wobble |vibrato
| | object | Pitch wobble |rotation
| | object | 8D with custom speed |flanger
| | boolean | Flanger effect |phaser
| | boolean | Phaser effect |chorus
| | boolean | Chorus effect |compressor
| | boolean | Dynamic compression |normalizer
| | boolean | Loudness normalization |lowpass
| | Hz | Cut highs |highpass
| | Hz | Cut lows |bandpass
| | object | Bandpass filter |bandreject
| | object | Notch filter |lowshelf
| | object | Low shelf EQ |highshelf
| | object | High shelf EQ |peaking
| | object | Parametric EQ |mono
| | boolean | Stereo to mono |surround
| | boolean | Surround effect |
---
| | Streamify | Lavalink |
|--|:---------:|:--------:|
| Setup | npm install | Java + separate server |
| YouTube | โ
Works | โ ๏ธ Timeout issues |
| Latency | ~3s start | Variable |
| Skip | Instant | 2-3s |
| Dependencies | Node.js only | Java 17+ |
| Filters | Built-in | Requires config |
| Auto-pause | โ
Built-in | โ DIY |
| HTTP API | โ
Built-in | โ WebSocket only |
---
`javascript`
const manager = new Streamify.Manager(client, {
ytdlpPath: '/usr/local/bin/yt-dlp',
ffmpegPath: '/usr/bin/ffmpeg',
cookiesPath: './cookies.txt',
providers: {
youtube: { enabled: true },
spotify: { enabled: true },
soundcloud: { enabled: true },
twitch: { enabled: true },
mixcloud: { enabled: true },
bandcamp: { enabled: true }
},
spotify: {
clientId: 'your_client_id',
clientSecret: 'your_client_secret'
},
audio: {
bitrate: '128k',
format: 'opus',
vbr: true,
compressionLevel: 10,
application: 'audio'
},
ytdlp: {
format: 'bestaudio/best',
additionalArgs: []
},
defaultVolume: 80,
maxPreviousTracks: 25,
sponsorblock: {
enabled: true,
categories: ['sponsor', 'selfpromo', 'interaction', 'intro', 'outro', 'preview', 'music_offtopic']
}
});
`javascript`
const streamify = new Streamify({
port: 8787,
host: '0.0.0.0',
ytdlpPath: '/usr/local/bin/yt-dlp',
ffmpegPath: '/usr/bin/ffmpeg',
cookiesPath: './cookies.txt',
providers: {
youtube: { enabled: true },
spotify: { enabled: true },
soundcloud: { enabled: true },
twitch: { enabled: true },
mixcloud: { enabled: true },
bandcamp: { enabled: true }
},
spotify: {
clientId: 'your_client_id',
clientSecret: 'your_client_secret'
},
audio: {
bitrate: '128k',
format: 'opus',
vbr: true,
compressionLevel: 10,
application: 'audio'
},
ytdlp: {
format: 'bestaudio/best',
additionalArgs: []
},
logLevel: 'info'
});
---
- Node.js 18+
- yt-dlp โ pip install yt-dlpapt install ffmpeg`
- ffmpeg โ
- @discordjs/voice + @discordjs/opus โ Discord mode only
---
| Guide | Description |
|-------|-------------|
| Quick Start | Get running in 5 minutes |
| Configuration | All options explained |
| Filters | Audio filters, EQ, presets |
| Events | Player events reference |
| Examples | Full bot examples |
---
---
MIT ยฉ LucasCzechia