NodeLink Features
Exclusive NodeLink features and enhancements.
NodeLink Features
Features unique to NodeLink that extend beyond standard Lavalink compatibility.
Audio Mixer
Overview
The Audio Mixer allows you to play secondary audio tracks simultaneously with the main track. This is perfect for:
- Voiceovers & TTS: Announce song names or read chat messages without stopping the music.
- Sound Effects: Play airhorns, applause, or memes over the active track.
- Background Music: Keep a low-volume ambient track running while playing other media.
The mixer works by intercepting the main audio stream and digitally mixing the PCM data from auxiliary sources before encoding. It features intelligent buffering to handle sources that download faster than real-time (like TTS) and automatic clamping to prevent audio distortion.
Endpoints
The mixer exposes a full REST API for managing layers:
POST /v4/sessions/:sessionId/players/:guildId/mix- Add a new layerGET /v4/sessions/:sessionId/players/:guildId/mix- List active layersPATCH /v4/sessions/:sessionId/players/:guildId/mix/:mixId- Update layer volumeDELETE /v4/sessions/:sessionId/players/:guildId/mix/:mixId- Remove a layer
WebSocket Events
Enhanced Track Metadata
Overview
When enabled in config.js, NodeLink makes an additional API call to YouTube when a track starts, gathering rich metadata that would normally require multiple separate API calls. The enriched data includes channel information (name, subscribers, verified status), track details (views, publish date, keywords), media quality options, external links from the channel (Spotify, Instagram), and multiple thumbnail resolutions. All data is returned in the pluginInfo object with type: "holo" during the TrackStartEvent.
Configuration
// config.js
enableHoloTracks: true# Docker environment variable
NODELINK_ENABLEHOLOTRACKS=trueUse Cases & Performance
Use Case
Ideal for music bots displaying rich embeds with artist info, applications showing detailed video metadata without extra API calls, and clients wanting comprehensive track information automatically.
Performance Impact
Adds one extra YouTube API request per track start (100-300ms latency). Only works for YouTube/YouTube Music sources. Uses ~5-20 KB extra bandwidth per track.
Example Response
Lyrics & Chapters
Query Parameters
Lyrics Sources
Source Priority
NodeLink automatically tries multiple sources in order until lyrics are found:
- YouTube Captions - Synced, timestamped lyrics from captions
- Musixmatch - Large database of synced lyrics
- LRCLib - Open-source community synced lyrics
- Genius - Community-sourced plain text lyrics
The source field in the response indicates which provider returned the lyrics.
Example Request
curl -X GET "http://your-server.com/v4/loadlyrics?encodedTrack=QAAAjQIAJVJpY2sgQXN0bGV5...&lang=en" \
-H "Authorization: yourPassword"Response
Query Parameters
Example Request
curl -X GET "http://your-server.com/v4/loadchapters?encodedTrack=QAAAAAMAM0hvdyB0byBBZGQgQ2hhcHRlcnMgdG8gWW91ciBWaWRlb3MgVXNpbmcgVGltZXN0YW1wcwAQWW91VHViZSBDcmVhdG9ycwAAAAAAATSYAAtiMUZvX01fdGo2dwABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWIxRm9fTV90ajZ3AQA2aHR0cHM6Ly9pLnl0aW1nLmNvbS92aV93ZWJwL2IxRm9fTV90ajZ3L3NkZGVmYXVsdC53ZWJwAAAHeW91dHViZQAAAAAAAAAA" \
-H "Authorization: yourPassword"Response
Direct Streaming
Configuration
Feature Must Be Enabled
This feature must be explicitly enabled in your configuration:
// config.js
enableTrackStreamEndpoint: trueQuery Parameters
Example Request
curl -X GET "http://your-server.com/v4/trackstream?encodedTrack=QAAAAAMAM0hvdyB0byBBZGQgQ2hhcHRlcnMgdG8gWW91ciBWaWRlb3MgVXNpbmcgVGltZXN0YW1wcwAQWW91VHViZSBDcmVhdG9ycwAAAAAAATSYAAtiMUZvX01fdGo2dwABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWIxRm9fTV90ajZ3AQA2aHR0cHM6Ly9pLnl0aW1nLmNvbS92aV93ZWJwL2IxRm9fTV90ajZ3L3NkZGVmYXVsdC53ZWJwAAAHeW91dHViZQAAAAAAAAAA&itag=251" \
-H "Authorization: yourPassword"Use Cases
Common Applications
- Radio/streaming applications that need raw audio
- Bot audio recording and archiving systems
- Audio preview functionality
- Custom audio processing pipelines
- Downloading tracks for offline playback
Security Warning
Enable this feature carefully as it allows direct audio downloads. Consider rate limiting and authentication.
Response
Configuration
Feature Must Be Enabled
Enable the endpoint in config:
// config.js
enableLoadStreamEndpoint: trueQuery / Body Parameters
Example Request
curl -X GET "http://your-server.com/v4/loadstream?encodedTrack=QAAAAAMAM0hvdyB0byBBZGQgQ2hhcHRlcnMgdG8gWW91ciBWaWRlb3MgVXNpbmcgVGltZXN0YW1wcwAQWW91VHViZSBDcmVhdG9ycwAAAAAAATSYAAtiMUZvX01fdGo2dwABACtodHRwczovL3d3dy55b3V0dWJlLmNvbS93YXRjaD92PWIxRm9fTV90ajZ3AQA2aHR0cHM6Ly9pLnl0aW1nLmNvbS92aV93ZWJwL2IxRm9fTV90ajZ3L3NkZGVmYXVsdC53ZWJwAAAHeW91dHViZQAAAAAAAAAA&position=30000" \
-H "Authorization: yourPassword" \
--output track.pcmResponse
Monitoring & Metrics
Example Request
curl -X GET "http://your-server.com/v4/metrics" \
-H "Authorization: yourPassword"Metric Categories
Grafana Dashboard
Pre-configured Dashboard
See the Prometheus page for a complete Grafana dashboard with pre-configured panels for all NodeLink metrics.
Example Request
curl -X GET "http://your-server.com/v4/stats" \
-H "Authorization: yourPassword"Additional Fields
Enhanced Statistics
Beyond standard Lavalink stats, NodeLink includes detailedStats with granular usage metrics.
Response
Use Cases
Useful For
- Identifying most used API endpoints
- Tracking popular audio sources
- Monitoring error rates per endpoint
- Analyzing playback event distribution
Additional Filters
NodeLink includes additional audio filters beyond the standard Lavalink filters, all processed in real-time.
Parameters
Example Usage
{
"filters": {
"echo": {
"delay": 500,
"feedback": 0.3,
"mix": 0.5
}
}
}Parameters
Example Usage
{
"filters": {
"chorus": {
"rate": 1.5,
"depth": 0.5,
"delay": 25,
"mix": 0.6,
"feedback": 0.2
}
}
}Parameters
Example Usage
{
"filters": {
"compressor": {
"threshold": -20,
"ratio": 4,
"attack": 10,
"release": 100,
"gain": 5
}
}
}Parameters
Example Usage
{
"filters": {
"highpass": {
"smoothing": 20
}
}
}Parameters
Example Usage
{
"filters": {
"phaser": {
"stages": 6,
"rate": 0.5,
"depth": 0.7,
"feedback": 0.5,
"mix": 0.5,
"minFrequency": 200,
"maxFrequency": 2000
}
}
}Parameters
Example Usage
{
"filters": {
"spatial": {
"depth": 0.8,
"rate": 0.3
}
}
}Multi-Audio Track Support
NodeLink supports selecting specific audio tracks for videos that contain multiple audio streams (e.g., Netflix-style dubs, multi-language YouTube videos).
How to use
1. Check for available tracks
When you load a track (especially from YouTube), the response includes an audioTracks array inside pluginInfo. This lists all available audio streams for that video.
"pluginInfo": {
"audioTracks": [
{
"id": "en",
"name": "English (Original)",
"isDefault": true,
"isAutoDubbed": false
},
{
"id": "pt-br",
"name": "Portuguese (Brazil)",
"isDefault": false,
"isAutoDubbed": true
}
]
}2. Select a track
By default, NodeLink plays the default/original audio. To play a different track (e.g., Portuguese dub), pass the audioTrackId in the track object when updating the player.
curl -X PATCH "http://your-server.com/v4/sessions/{sessionId}/players/{guildId}" \
-H "Authorization: yourPassword" \
-H "Content-Type: application/json" \
-d '{
"track": {
"encoded": "...",
"audioTrackId": "pt-br"
}
}'Use Cases
- Multi-language Videos: Allow users to switch between original audio and dubbed versions.
- Descriptive Audio: Select audio tracks with descriptive commentary for accessibility.
Multi-Audio Track Support
NodeLink supports selecting specific audio tracks for videos that contain multiple audio streams (e.g., Netflix-style dubs, multi-language YouTube videos).
How to use
1. Check for available tracks
When you load a track (especially from YouTube), the response includes an audioTracks array inside pluginInfo. This lists all available audio streams for that video.
To see this information, you must load the track using loadTracks.
"pluginInfo": {
"audioTracks": [
{
"id": "en",
"name": "English (Original)",
"isDefault": true,
"isAutoDubbed": false
},
{
"id": "pt-br",
"name": "Portuguese (Brazil)",
"isDefault": false,
"isAutoDubbed": true
}
]
}2. Select a track
By default, NodeLink plays the default/original audio. To play a different track (e.g., Portuguese dub), pass the audioTrackId in the track object when updating the player.
curl -X PATCH "http://your-server.com/v4/sessions/{sessionId}/players/{guildId}" \
-H "Authorization: yourPassword" \
-H "Content-Type: application/json" \
-d '{
"track": {
"encoded": "...",
"audioTrackId": "pt-br"
}
}'Use Cases
- Multi-language Videos: Allow users to switch between original audio and dubbed versions.
- Descriptive Audio: Select audio tracks with descriptive commentary for accessibility.
Event Behavior
NodeLink modifies when certain events are emitted for better accuracy.
Behavior
Enhanced Accuracy
Unlike Lavalink which emits TrackStartEvent immediately when you call update player, NodeLink waits until the audio stream actually starts flowing. This means you receive the event only when playback truly begins.
This provides more accurate timing for tracking actual playback start times and prevents false positives when tracks fail to load after being queued.
YouTube Source Configuration
Body
Example Request
curl -X PATCH "http://your-server.com/v4/youtube/config" \
-H "Authorization: yourPassword" \
-H "Content-Type: application/json" \
-d '{
"refreshToken": "1//0gN...",
"visitorData": "Cgt..."
}'Response
Query Parameters
Response
Methods Supported
Body (POST)
Query Parameters (GET)
Example Request (POST)
curl -X POST "http://your-server.com/v4/youtube/oauth" \
-H "Authorization: yourPassword" \
-H "Content-Type: application/json" \
-d '{"refreshToken": "..."}'Example Request (GET)
curl -X GET "http://your-server.com/v4/youtube/oauth?refreshToken=..." \
-H "Authorization: yourPassword"