![]() |
[IDEA] USB CD-Rom + Moode = UPnP streamer - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8) +--- Thread: [IDEA] USB CD-Rom + Moode = UPnP streamer (/showthread.php?tid=1830) Pages:
1
2
|
RE: USB CD-Rom + Moode = UPnP streamer - hifix - 10-20-2019 Self control was low so i decided to take a long break and have a look at the code. Armed with ambition, a few micro sd cards and (unfortunately) not much of an understanding of how the pi works, i was trying to see what could be done to get something to show up under Browse - USB - cdrom. I had a look at the "how to" by aknaggbaugh and could not figure out how to get the thing going. The #2 step show a call a start cd-rip.service which i didnt think i needed. Looking around, i found this: mkdir /media/cdrom <--- had to be changed to "sudo mkdir /media/cdrom". Success! mount -t iso9660 /dev/sr0 /media/cdrom <--- "only root can use --types option" So while there now exists: Browse - USB - cdrom, there is nothing beyond this (cdrom has no contents - failed mount command). I tried looking for a root password for moode but came up empty. This is where i am stuck. RE: USB CD-Rom + Moode = UPnP streamer - TheOldPresbyope - 10-21-2019 @hifix That HowTo describes a CD ripping service, not a CD playback service. I've gotten jammed up with non-moOde tasks ("real life" has a way of raising its ugly head at inconvenient times!) and haven't had time to make sure what Ashley and I did back in July works with moOde 6.3.0. In the meanwhile, here's a brute-force-and-ignorance approach to playing a CD which doesn't require any additional scripts, services, or modification to Tim's extensive code. Sorry. This description assumes the user knows some basic Linux command line-fu. 1. plug in a USB CD/DVD player. I've used several garden-variety models with success. You should see that /dev/cdrom is now a symlink to /dev/sr0. As root change the permissions of /dev/sr0 to 666. Here's what I see in the /dev directory before and after I've done this Code: pi@moode4b:~ $ ls -l /dev|grep cdrom Once in a while I've seen cdrom link to sr1 instead. Not sure why, but if it does, change the permissions on sr1. Either way, this permissions-setting exercise will have to be done each time you plug in a player or reboot (told you this is brute force! This is automated in the work I haven't posted yet). 2. Tim has already compiled MPD to include its cdda plugin. As root, use your favorite editor to create a custom playlist /var/lib/mpd/playlists/CD.m3u with one entry, cdda://, which tells MPD to use the plugin to play a whole disc. Here's the dump of mine where I used the vi editor: Code: pi@moode4b:~ $ sudo vi /var/lib/mpd/playlists/CD.m3u "CD", or whether name you give the .m3u file, will appear among moOde's playlists. 3. Inset a music CD and add the CD playlist to your current playlist (I usually use "clear/add" or "clear/play" to avoid confusion). Here's a screen capture of my playback panel with just the CD playlist added: ![]() That's pretty raw ![]() The point of our scripts and mods to Tim's code is to take care of the device permissions, to enumerate the tracks on the CD, to clear the current playlist and then load the CD tracks into it with prettier formatting, and to display a default cover. Hope to get back to them soon. Regards, Kent PS - be sure SoX resampling is disabled. I've had problems with aural dropouts when I had inadvertently left resampling enabled. RE: USB CD-Rom + Moode = UPnP streamer - TheOldPresbyope - 10-21-2019 (10-20-2019, 03:22 PM)hifix Wrote: ... To this specific point, there's nothing to browse on a Red Book audio CD. Yes, there's a so-called Table of Contents but it's a data structure providing only "an index of the start positions of the tracks in the program area and lead-out." Compact Disc Digital Audio (CDDA) But wait, there's more (the old guy said but only after he pressed "post") In the same reference it says Quote:Data access from computers In Linux systems the app cdparanoia can provide this access. It's available in the Raspbian repository. Ashley and I use it to enumerate the number of tracks on the audio CD (which it does by reading the CD's TOC). It's also used by abcde for ripping the tracks. RE: USB CD-Rom + Moode = UPnP streamer - hifix - 10-22-2019 @TheOldPresbyope Thank you for your feedback Kent. Its much appreciated. I think i understand what you have writted. Unfortunately i am without much command line-fu. No matter, i will give this a go. I was confident enough to trim the power management script for my DAC (multiple attempts) but i am out of my depth in these waters. I will wait for your code development and try that too! |