With the CD Ripper extension in place I was wondering if it would be possible to use the same hardware setup for CD playback. In the past I experimented a bit with local streaming and picked this up again by using the instructions written by @qdtjni as a starting point. The idea is to wrap the local streaming solution in a Docker container to have it distributable via the Extension Manager, as is done for the CD Ripper.
Getting something that plays was a matter of days but getting the details right and having it also running on a Raspberry Pi took a few weeks. Now I reached the point that it is ready for the initial release!
What does it do
The CD Player extension reads raw tracks from the CD and, on the fly, converts them into an Ogg Flac stream, this stream is then sent to a server that broadcasts it on the local network. The local broadcast can be picked up by configuring an Internet Radio station in Roon or by visiting the URL with a web browser. The Roon API is used to get a tight Roon integration. When CD playback is started the internet radio station is automatically selected for the configured “Auto Tune” zone.
Some more details:
- The Ogg FLAC stream is lossless so the music arrives in its full glory
- Reading from the CD is done in single speed to reduce background noise in case the setup is placed in the listening room
- The internet radio status is off-air if there is no CD played
- Metadata is shown in the extension status message
- Basic controls are available via the extension Settings (Play, Play from Track, Stop)
Why a CD player if you have Roon? (before you ask)
This extension might not have very typical use cases but the use cases I see are:
- “Emergency” playback. You have a CD and want to hear a track from it without ripping the CD and grooming the metadata first
- Other’s collection playback. A friend is visiting and brought a few CDs with him that he wants you to play
- Incidental playback. You want to play a few tracks from that CD you never considered worth ripping.
From a technical perspective this is also a prove of concept, it might pave the way for other audio input extensions.
The extension can be installed via the Extension Manager (Docker is required) after updating the Extension Repository to version 0.3.4. At installation the path of the optical drive has to be specified and the group ID of the
cdrom group. This can be determined with the command (on the device at which the extension runs):
getent group cdrom
The group might also be called
optical, this is e.g. the case on Arch Linux.
The number to use is at the end of the output line between the colons. If no group ID is specified a default of 24 will be used.