Turn your Raspberry Pi into an automatic CD ripping station that works as soon as you insert a disc!
By Satwant Kumar (Satwant.Dagar@gmail.com)
- Automatic Detection: Insert any audio CD and it starts ripping immediately
- High Quality: Rips to both FLAC (lossless) and MP3 (V0 VBR) formats
- Metadata Lookup: Automatically fetches album art and track information
- Offline Mode: Works without internet connection when needed
- Robust Error Handling: Handles dirty/scratched discs with advanced error correction
- Multiple Formats: Supports both audio CDs and data DVDs
- Network Storage: Optional automatic copying to network drives
- Plug & Play: Works with USB optical drives
- Smart Detection: Advanced disc detection with multiple fallback methods
One-line installation for Raspberry Pi OS:
curl -fsSL https://raw.githubusercontent.com/SatwantKumar/grim_ripper/main/install.sh | sudo bashThat's it! Insert a CD and watch the magic happen β¨
- Raspberry Pi (any model, Pi 4 recommended)
- USB optical drive (CD/DVD reader)
- SD card (16GB+ recommended)
- External storage (USB drive, NAS, etc.) for ripped music
- Raspberry Pi OS (Lite or Desktop)
- Internet connection for initial setup and metadata lookup
If you prefer to install manually or want to understand what's happening:
sudo apt update
sudo apt install -y python3 python3-pip abcde cdparanoia cd-discid \
flac lame normalize-audio eyed3 glyrc imagemagick \
curl wget git udevgit clone https://github.com/SatwantKumar/grim_ripper.git
cd grim_ripper
sudo ./install.shEdit the configuration file:
sudo nano /opt/auto-ripper/config.jsonKey settings:
output_dir: Where to save ripped music (default:/mnt/MUSIC)formats: Output formats (default:["flac", "mp3"])eject_after_rip: Auto-eject when done (default:true)
/opt/auto-ripper/
βββ auto-ripper.py # Main application
βββ config.json # Configuration file
βββ abcde.conf # Online ripping config
βββ abcde-offline.conf # Offline ripping config
βββ trigger-rip.sh # udev trigger script
βββ utils/ # Utility scripts
β βββ troubleshoot.sh # Diagnostics
β βββ cleanup.sh # Clean stale processes
β βββ test-detection.sh # Test CD detection
βββ logs/ # Log files
/etc/udev/rules.d/
βββ 99-auto-ripper.rules # udev rules for auto-detection
/mnt/MUSIC/ # Default output directory
βββ [Artist]/[Album]/ # Ripped music organized by artist/album
{
"output_dir": "/mnt/MUSIC",
"formats": ["flac", "mp3"],
"eject_after_rip": true,
"notification_enabled": false,
"network_copy": false,
"network_path": "",
"max_retries": 3
}{
"cd_quality": {
"flac_compression": 8,
"mp3_quality": "V0",
"normalize_audio": false
},
"naming": {
"cd_format": "${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM} - ${TRACKFILE}",
"sanitize_filenames": true
}
}To automatically copy ripped files to a network location:
{
"network_copy": true,
"network_path": "/mnt/nas/music/"
}- Insert an audio CD
- Wait for the drive LED to stop blinking
- Ripping starts automatically
- CD ejects when complete
- Find your music in
/mnt/MUSIC/[Artist]/[Album]/
# Test if a CD is detected
sudo /opt/auto-ripper/utils/test-detection.sh
# Manually trigger a rip
sudo python3 /opt/auto-ripper/auto-ripper.py --daemon
# Check system status
sudo /opt/auto-ripper/utils/troubleshoot.sh# Watch logs in real-time
tail -f /var/log/auto-ripper/auto-ripper.log
# Check recent activity
sudo /opt/auto-ripper/utils/check-status.sh| Format | Quality | Typical Size (74min CD) |
|---|---|---|
| FLAC | Lossless | ~300-400 MB |
| MP3 | V0 VBR (~245 kbps avg) | ~130-160 MB |
# Run the diagnostic script
sudo /opt/auto-ripper/utils/troubleshoot.sh
# Check if drive is recognized
lsusb | grep -i optical
ls -la /dev/sr*
# Test manual detection
sudo /opt/auto-ripper/utils/test-detection.sh# Add user to cdrom group
sudo usermod -a -G cdrom pi
sudo reboot# Clean up stuck processes
sudo /opt/auto-ripper/utils/cleanup.sh# Reset optical drive
sudo eject /dev/sr0
# Wait 10 seconds, reinsert CD
# Check drive health
dmesg | grep -i sr0Edit /opt/auto-ripper/abcde.conf:
OUTPUTFORMAT='${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM} - ${TRACKFILE}'# Mount NAS automatically
echo "//your-nas-ip/music /mnt/nas cifs username=user,password=pass,uid=pi,gid=pi 0 0" >> /etc/fstabEnable notifications in config.json and install notification tools:
sudo apt install -y libnotify-bin- Raspberry Pi 3 or newer
- 1GB RAM
- 8GB SD card
- USB 2.0 optical drive
- Raspberry Pi 4 (4GB RAM)
- 32GB SD card (Class 10)
- External USB drive for music storage
- USB 3.0 optical drive
- Audio CDs (CD-DA)
- Mixed mode CDs
- Data DVDs (basic support)
- FLAC (lossless)
- MP3 (various qualities)
- Ogg Vorbis (optional)
- AAC (optional)
Contributions are welcome! Please read our Contributing Guide for details.
git clone https://github.com/SatwantKumar/grim_ripper.git
cd grim_ripper
python3 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txtThis project is licensed under the MIT License - see the LICENSE file for details.
- abcde - A Better CD Encoder
- cdparanoia - Paranoid CD ripper
- FLAC - Free Lossless Audio Codec
- LAME - MP3 encoder
- π Report bugs
- π‘ Request features
- π¬ Discussions
- Web interface for remote monitoring
- Mobile app for notifications
- Multi-disc changer support
- Automatic artwork scanning
- Integration with music streaming services
- Docker container support
Made with β€οΈ for the Raspberry Pi community by Satwant Kumar
Transform your Pi into the ultimate retro-modern jukebox!
Grim Ripper - Because every CD deserves a proper digital afterlife! πΏβ‘οΈπΎ