Package Exports
- chrxmeestream
Readme
π΅ ChrxmeeStream
A dead-simple Lavalink alternative powered by FFMPEG + yt-dlp. Even a baby could use it. πΌ
What is this?
ChrxmeeStream is a standalone audio node for Discord bots.
Your bot sends commands over WebSocket β ChrxmeeStream resolves the source, runs FFMPEG, and streams raw PCM audio back.
No bloat. No Java. No suffering.
Requirements
Before starting, make sure you have these installed on your server:
| Tool | Install |
|---|---|
| Node.js β₯ 18 | https://nodejs.org |
| FFMPEG | apt install ffmpeg / brew install ffmpeg / winget install ffmpeg |
| yt-dlp | pip install yt-dlp / brew install yt-dlp / winget install yt-dlp |
Install
npm install chrxmeestreamStart the server
# Default settings
npx chrxmeestream
# Custom settings via environment variables
CHRXMEE_PORT=2333 \
CHRXMEE_PASSWORD=mysecretpassword \
CHRXMEE_AUDIO_DIR=./audio \
npx chrxmeestream| Variable | Default | Description |
|---|---|---|
CHRXMEE_PORT |
2333 |
WebSocket port |
CHRXMEE_HOST |
0.0.0.0 |
Host to bind to |
CHRXMEE_PASSWORD |
chrxmee |
Auth password |
CHRXMEE_AUDIO_DIR |
./audio |
Folder for local files |
Connecting from your Discord bot
Connect via WebSocket with these headers:
const ws = new WebSocket("ws://localhost:2333", {
headers: {
"Authorization": "chrxmee", // your password
"Guild-Id": "123456789", // Discord guild ID
}
});Commands (ops)
Send JSON text frames to control playback.
βΆοΈ Play
{ "op": "play", "source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }{ "op": "play", "source": "WRITE(mysong.mp3)" }{ "op": "play", "source": "https://soundcloud.com/artist/track" }βΉοΈ Stop
{ "op": "stop" }βΈοΈ Pause / βΆοΈ Resume
{ "op": "pause" }
{ "op": "resume" }π Volume (0β200)
{ "op": "volume", "value": 80 }β© Seek (seconds)
{ "op": "seek", "value": 90 }ποΈ Filter
{ "op": "filter", "filters": ["bassboost"] }
{ "op": "filter", "filters": ["nightcore", "echo"] }
{ "op": "filter", "filters": [] }Events (what ChrxmeeStream sends back)
Receive JSON text frames for control events.
Receive binary frames for raw PCM audio chunks.
| Event | Data | Description |
|---|---|---|
ready |
{ sessionId, version } |
Fired on connect |
trackStart |
{ source } |
Track began playing |
trackEnd |
β | Track finished |
stopped |
β | Manually stopped |
paused |
β | Paused |
resumed |
β | Resumed |
volumeSet |
{ volume } |
Volume changed |
seeked |
{ position } |
Seeked to position |
error |
{ message } |
Something went wrong |
Binary frames = raw PCM audio (s16le, 48kHz, stereo) β pipe straight into @discordjs/voice.
WRITE() β Local file playback
Drop any audio file into your /audio folder and play it with:
{ "op": "play", "source": "WRITE(mysong.mp3)" }Or shorthand (no WRITE() needed if it doesn't start with http):
{ "op": "play", "source": "mysong.mp3" }Supported formats: .mp3 .wav .ogg .flac .m4a .opus .aac .webm
Supported streaming services
Anything yt-dlp supports β which is a lot:
- β YouTube
- β SoundCloud
- β Twitch (live streams too)
- β Bandcamp
- β Deezer
- β Tidal
- β Vimeo
- β Twitter / X
- β Reddit
- β Bilibili
- β οΈ Spotify (requires yt-dlp Spotify plugin or spotDL)
- β οΈ Apple Music (regional restrictions may apply)
- β 1000+ more sites
Available filters
Apply audio effects to any track:
| Filter | Effect |
|---|---|
bassboost |
Pumps the low end |
nightcore |
Speed up + pitch up |
vaporwave |
Slow down + pitch down |
slowed |
Slowed + reverb |
echo |
Delay echo |
reverb |
Cave-like reverb |
normalize |
Even out volume |
earrape |
β οΈ DO NOT USE WITH HEADPHONES |
karaoke |
Remove vocals (kinda) |
mono |
Merge to mono |
treble |
Boost high end |
soft |
Smooth low-pass |
underwater |
Pool vibes |
telephone |
Nokia ringtone vibes |
chipmunk |
Alvin would be proud |
deep |
Low and menacing |
robot |
Metallic robot voice |
Stack them:
{ "op": "filter", "filters": ["bassboost", "echo"] }Clear filters:
{ "op": "filter", "filters": [] }Example bot snippet (discord.js + @discordjs/voice)
import { createAudioPlayer, createAudioResource, NoSubscriberBehavior } from "@discordjs/voice";
import { Readable } from "stream";
import WebSocket from "ws";
const ws = new WebSocket("ws://localhost:2333", {
headers: { "Authorization": "chrxmee", "Guild-Id": guildId }
});
const audioStream = new PassThrough();
const resource = createAudioResource(audioStream);
const player = createAudioPlayer({ behaviors: { noSubscriber: NoSubscriberBehavior.Pause } });
player.play(resource);
voiceConnection.subscribe(player);
ws.on("message", (data, isBinary) => {
if (isBinary) {
// Raw PCM chunk β push it into the stream
audioStream.push(data);
} else {
const event = JSON.parse(data.toString());
console.log("Event:", event);
}
});
// Play a song
ws.send(JSON.stringify({ op: "play", source: "https://youtu.be/dQw4w9WgXcQ" }));License
MIT β do whatever you want with it.
Made with π and FFMPEG suffering.