| Crates.io | pleezer |
| lib.rs | pleezer |
| version | 0.19.1 |
| created_at | 2024-11-20 22:41:05.60857+00 |
| updated_at | 2025-07-27 21:03:11.79287+00 |
| description | Headless Deezer Connect player |
| homepage | |
| repository | https://github.com/roderickvd/pleezer/ |
| max_upload_size | |
| id | 1455411 |
| size | 881,116 |
Deezer has officially deprecated Deezer Connect as announced at https://en.deezercommunity.com/product-updates/say-goodbye-to-deezer-connect-80661. It is unknown how long pleezer will continue to work.
Currently, Deezer Connect functionality remains available on:
Users should be aware that this functionality may stop working at any time as Deezer continues to phase out Deezer Connect support.
pleezer turns your computer into a Deezer Connect streaming device that you can control from your phone, just like a Chromecast or smart speaker. Perfect for home audio setups, DIY projects, and custom integrations.
Important: A paid Deezer subscription is required. Free accounts will not work with pleezer.
The easiest way to use pleezer on a Raspberry Pi is through moOde audio player:
cargo install pleezer
secrets.toml file with your Deezer login:
email = "your-email@example.com"
password = "your-password"
pleezer
Need help? Check out Troubleshooting or join our Discussions.
pleezer is an independent project and is not affiliated with, endorsed by, or created by Deezer. It is developed to provide a streaming player that is fully compatible with the Deezer Connect protocol.
pleezer does not and will not support saving or extracting music files for offline use. This project:
The audio quality setting in your Deezer app controls the streaming quality to pleezer:
Notes:
When using Deezer Connect, your phone's battery may drain faster than usual. This is normal - the Deezer app needs to maintain constant communication with pleezer for remote control.
By default, pleezer uses your system's default audio output. To use a specific device:
List available devices:
pleezer -d "?"
Select a device:
pleezer -d "device-name"
Common examples:
pleezer -d "Built-in Output" # Use built-in audio
pleezer -d "USB DAC" # Use USB audio device
pleezer -d "JACK|cpal_audio_out" # Connect to JACK (Linux)
pleezer -d "ASIO|USB Audio Interface" # Use ASIO device (Windows)
Set initial volume level (0-100):
pleezer --initial-volume 50 # Start at 50% volume
Enable volume normalization:
pleezer --normalize-volume
Change how pleezer appears in the Deezer app:
pleezer --name "Living Room"
Create a secrets.toml file containing:
email = "your-email@example.com"
password = "your-password"
By default, pleezer looks for this file in the current directory. Use -s to specify a different location:
pleezer -s /path/to/secrets.toml
If you prefer not to store your password, you can use a temporary Authentication Reference Link (ARL):
deezer://autolog/)secrets.toml file containing:
arl = "your-arl"
Note: ARLs expire periodically. Email/password authentication is more reliable for long-term use.
Hook scripts let you automate actions when events occur (like tracks changing or playback starting). Use the --hook option to specify your script:
pleezer --hook /path/to/script.sh
Your script receives event information through environment variables. Example script:
#!/bin/bash
case "$EVENT" in
"track_changed")
# Safely print track info by escaping special characters
echo "Now playing: $(printf %q "$TITLE") by $(printf %q "$ARTIST")"
# Run longer operations in background to avoid delays
update_home_automation "$(printf %q "$TITLE")" "$(printf %q "$ARTIST")" &
;;
"connected")
echo "Connected as: $(printf %q "$USER_NAME")"
;;
esac
Important:
printf %q to safely escape variablesplaying - When playback starts
TRACK_ID: ID of the playing trackpaused - When playback pauses
track_changed - When the track changes
TRACK_TYPE: "song", "episode", or "livestream"TRACK_ID: Content IDTITLE: Track/episode title (not set for radio)ARTIST: Artist/podcast/station nameALBUM_TITLE: Album name (songs only)COVER_ID: Artwork IDDURATION: Length in seconds (not set for radio)FORMAT: Input format and bitrate (e.g., "MP3 320K", "FLAC 1.234M")DECODER: Output format (e.g., "PCM 16 bit 44.1 kHz, Stereo")connected - When a controller connects
USER_ID: Your Deezer user IDUSER_NAME: Your Deezer usernamedisconnected - When a controller disconnects
Use the COVER_ID to construct artwork URLs:
For songs and radio:
https://cdn-images.dzcdn.net/images/cover/{cover_id}/{size}x{size}.{format}
For podcasts:
https://cdn-images.dzcdn.net/images/talk/{cover_id}/{size}x{size}.{format}
Where:
{size}: Image size in pixels (up to 1920){format}: jpg (smaller) or png (higher quality)Example: 500x500.jpg is Deezer's default size
The -d option accepts detailed device specifications:
[<host>][|<device>][|<sample rate>][|<sample format>]
All parts are optional and case-insensitive:
|Sample formats:
i16: 16-bit integer (most compatible)i32: 32-bit integer (better for volume control)f32: 32-bit float (best quality)Examples by platform:
Linux (ALSA):
pleezer -d "ALSA|Yggdrasil+" # Named device with default configuration
pleezer -d "ALSA|Yggdrasil+|44100|i32" # Named device with sampling rate and format
Using ALSA Virtual Devices:
If you are installing from crates, then virtual devices like _audioout or camilladsp are currently not directly enumerable. To use virtual devices, either:
~/.asoundrc (user-specific)/etc/asound.conf (system-wide)/etc/alsa/conf.d/default.conf (system-wide, recommended)pcm.!default {
type plug
slave.pcm "_audioout"
}
ctl.!default {
type hw
card 0
}
Then run pleezer with either no -d option or -d "ALSA|default":
pleezer # Uses system default
pleezer -d "ALSA|default" # Explicitly use default
Linux (JACK) - requires --features jack:
pleezer -d "JACK|pleezer_out" # Custom client name
macOS:
pleezer -d "CoreAudio|DAC|44100|f32" # DAC with format
pleezer -d "|External Speakers" # Just device name
Windows (WASAPI):
pleezer -d "WASAPI|Speakers|44100" # With sample rate
pleezer -d "||48000" # Just sample rate
Windows (ASIO) - requires --features asio:
pleezer -d "ASIO|USB Interface" # ASIO device
Notes:
Enable volume normalization for consistent levels:
pleezer --normalize-volume
The normalizer provides intelligent gain adjustment to reach Deezer's target level (-15 dB LUFS):
This approach ensures:
Enable psychoacoustic loudness compensation:
pleezer --loudness
Compensates for how human hearing perceives different frequencies, especially at lower volumes:
The compensation effect:
pleezer improves audio quality through:
The dithering process:
Configure dithering based on your DAC's measured performance:
# Example for DAC with THD+N of -118 dB:
pleezer --dither-bits 19.3
# Disable dithering entirely:
pleezer --dither-bits 0
Calculate optimal dither bits from DAC specifications:
pleezer uses psychoacoustic noise shaping to optimize audio quality:
Configure noise shaping:
# Use noise shaping level 2 (recommended default)
pleezer --noise-shaping 2
# Use level 0 for podcasts (safest)
pleezer --noise-shaping 0
Recommendations by content type:
Control RAM usage for audio buffering:
pleezer --max-ram 64 # Use up to 64MB RAM
Approximate sizing:
Double these amounts to handle current and preloaded tracks:
--max-ram 30 for MP3--max-ram 100 for FLACIf a track exceeds the limit or --max-ram isn't set, temporary files are used instead.
Prevent other devices from taking control:
pleezer --no-interruptions
Specify network interface:
pleezer --bind 192.168.1.2 # Specific IPv4 interface
pleezer --bind ::1 # IPv6 loopback
All options can be set with environment variables using the prefix PLEEZER_ and SCREAMING_SNAKE_CASE:
# Set in environment
export PLEEZER_NAME="Living Room"
export PLEEZER_NO_INTERRUPTIONS=true
export PLEEZER_INITIAL_VOLUME=50
# Override with arguments
pleezer --name "Kitchen" # Takes precedence
Set proxy for all connections using the HTTPS_PROXY environment variable:
# Linux/macOS
export HTTPS_PROXY="http://proxy.example.com:8080" # HTTP proxy
export HTTPS_PROXY="https://proxy.example.com:8080" # HTTPS proxy
# Windows (Command Prompt)
set HTTPS_PROXY=https://proxy.example.com:8080
# Windows (PowerShell)
$env:HTTPS_PROXY="https://proxy.example.com:8080"
Device not showing in Deezer app
Controls not responding
Maximum volume on connect
--initial-volume to set a lower starting level
pleezer --initial-volume 50
Volume inconsistent between tracks
pleezer --normalize-volume
# Add to /etc/resolv.conf
options no-aaaa
For troubleshooting, enable debug logging:
pleezer -v # Debug logging
pleezer -vv # Trace logging (very detailed)
Suppress non-essential output:
pleezer -q # Only show warnings and errors
Monitor protocol messages (development):
pleezer --eavesdrop -vv
pleezer is supported on Linux and macOS with full compatibility. Windows support is tier two, meaning it is not fully tested and complete compatibility is not guaranteed. Contributions to enhance Windows support are welcome.
# Debian/Ubuntu
sudo apt-get update
sudo apt-get install build-essential libasound2-dev pkgconf
# Fedora
sudo dnf groupinstall 'Development Tools'
sudo dnf install alsa-lib-devel
xcode-select --install
All platforms need Rust installed. Visit rustup.rs and follow the installation instructions for your system.
cargo install pleezer
git clone https://github.com/roderickvd/pleezer.git
cd pleezer
cargo build --release
cargo install --path . # Optional: system-wide install
# Debian/Ubuntu
sudo apt-get install libjack-dev
# Fedora
sudo dnf install jack-audio-connection-kit-devel
# Build with JACK support
cargo build --features jack
cargo build --features asio
pleezer is available as part of these distributions:
If you maintain a project, product, or distribution that includes pleezer, feel free to submit a pull request to add it to this list.
These projects have influenced pleezer:
This project uses:
pleezer uses the Sustainable Use License, which promotes fair use and sustainable open-source development.
Requires a commercial license when:
This helps ensure fair compensation for development work and continued project maintenance.
When using pleezer, you must follow Deezer's Terms of Service:
Keep your secrets.toml file secure:
Contributions welcome! See Contributing Guidelines for:
If you find pleezer useful, consider: