# CD Ripping Workflow (abcde + beets → Jellyfin) ## Tools | Tool | Purpose | |-----------|---------------------------------------------------| | `abcde` | Rips CD and encodes to MP3 via cdparanoia | | `lame` | MP3 encoder used by abcde | | `mid3v2` | ID3 tagger used by abcde (part of python3-mutagen)| | `beets` | MusicBrainz metadata match + library import | Install once: ```bash sudo apt install -y abcde lame beets python3-mutagen ``` ## Config Files ### `~/.abcde.conf` ``` CDDBMETHOD=musicbrainz OUTPUTTYPE=mp3 LAMEOPTS="-b 320" OUTPUTDIR=/mnt/media/jellyfin/inbound ACTIONS=cddb,read,encode,tag,move,clean NOGAP=y TAGGER=mid3v2 ``` ### `~/.config/beets/config.yaml` ```yaml directory: /mnt/media/jellyfin/music library: ~/.config/beets/musiclibrary.db import: move: yes write: yes paths: default: $albumartist/$album/$track - $title singleton: Non-Album/$artist - $title comp: Compilations/$album/$track - $title ``` ## Workflow **1. Insert the CD, then rip:** ```bash abcde -d /dev/sr0 ``` - Looks up the disc on MusicBrainz, prompts to confirm the match - Encodes to MP3 320kbps - Stages files to `/mnt/media/jellyfin/inbound///` - Takes ~5–10 min depending on disc **2. Import with beets:** ```bash beet import -A "/mnt/media/jellyfin/inbound/" ``` - `-A` runs non-interactively and auto-selects the best MusicBrainz match - On success, moves files to `/mnt/media/jellyfin/music/// - .mp3` - If auto-match fails (wrong album, low confidence), drop `-A` and run interactively from a real terminal — beet will prompt you to search or enter a MusicBrainz ID manually. **Cannot be run interactively from a Claude Code session.** **3. Trigger Jellyfin rescan:** Jellyfin dashboard → Libraries → Music → "Scan Library Files" ## Device Info - Drive: Pioneer BDC-202 (BD-ROM / DVD-writer combo) - Device: `/dev/sr0` (also `/dev/cdrom`) - `chris` is in the `cdrom` group — no sudo needed to read the disc ## Troubleshooting - **MusicBrainz lookup fails in abcde:** Install `python3-musicbrainzngs` separately. - **abcde errors "mid3v2 is not in your path":** `sudo apt install python3-mutagen` — mid3v2 is part of that package. - **beet import shows " - " as artist/album, files land in `__/` folder:** abcde failed to write ID3 tags. Verify with `mid3v2 -l file.mp3`. If blank, tag manually and re-import: ```bash mid3v2 -a "Artist" -A "Album" -t "Title" -T "TRACKNUM/TOTAL" -y YEAR --TPOS "DISC/TOTALDISCS" file.mp3 ``` - **Multi-disc album: disc number missing in Jellyfin:** beets doesn't set `TPOS` automatically. Tag each disc after import: ```bash # CD1 for f in /mnt/media/jellyfin/music/Artist/Album/0{1..9}-*.mp3 ...; do mid3v2 --TPOS "1/2" "$f"; done # CD2 for f in /mnt/media/jellyfin/music/Artist/Album/0{1..9}-*.mp3 ...; do mid3v2 --TPOS "2/2" "$f"; done ``` Then trigger a Jellyfin rescan. - **beet import can't find files:** Check the exact staged path after abcde finishes — album artist name may differ from expected. - **Jellyfin doesn't pick up music:** Trigger a manual library scan after import.