How to streamline cd ripping without tagging track data
Since we recently stopped using Spotify (mainly because I think having everything at your fingertips influences brain in a negative way) we switched to borrowing CDs from the local library (which, in our case is only 200m away from our house).
Now, because the kids get CDs at least once a week, I needed a way to quickly import those CDs into our Sonos system without too much hassle. Since the kids only borrow children stories (spoken audio) which often are not on MusicBrainz, I needed an easy way to tag them myself. Because I don’t care about tagging every single track (because you usually listen to a story start to end anyway), I wanted to have a streamlined process. The following script does:
- Rip the CD and convert it to m4a (AAC encoding, slightly better compression than mp3)
- Eject the CD
- Ask me for the album and artist name
- Opens chrome so I can choose an artwork
- Convert the artwork to JPG in a reasonable size
- Copies the music to the directory on my NAS
- Triggers Sonos to update the music library
You may take it as a starting point, you’d want to adapt:
- the paranoia level.
-Yis only basic checking which is enough for me. You can remove the
-Yto increase the error handle
- the bitrate (line 7). 96k is enough for me
- the genre (line 8)
- the handling of special characters for the album directory name (line 15)
- the hostname/directory of your NAS
- the updating of the music library (line 23. For Sonos there’s soco, an awesome python library. If you want to use that you’d need to
pip install socofirst)
Btw: the script can be run in parallel, i.e. when the first cd is finished ripping and the aac encoding runs you can insert the next disc and start the script again.