Posts: 11
Threads: 3
Joined: Nov 2022
Reputation:
0
11-13-2022, 01:13 AM
(This post was last modified: 11-18-2022, 12:58 PM by awrc68.)
I’m building a box around a Pi 3 and a DAC+ that’ll be used almost exclusively for playing back music from a dedicated USB drive.
I started out reusing the drive that had been connected to the Pi 3 before the project, which was one of WD’s now-deceased PiDrive line - a 1TB 2.5” drive with a wall wart with a Y-cable for power, with one side going to the drive and the other a Micro-USB for the Pi 3. It had worked without problems for years, and the drive was formatted as a standard bootable Pi drive, with a FAT partition for boot, a dedicated swap partition, and two ext4 partition for the root partition and user directories. I flashed the SD card with the current moOde version, and rebooted the machine (headless). After the expected initialization delay, I was able to access the web interface.
I wasn’t sure what to expect with the local drive on first boot. I could see the default streaming stations, and ssh’ing into the machine showed all four partitions mounted. I uncounted those, removed the partition table then, as a test, reformatted the drive as a single big partition (ext4), rebooted, then did regenerate the database, and rebooted again. When I ssh’ed in, the external drive was mounted as ‘/media/whatever-the-UUID-was’ and under /mnt there was now SDCARD and NAS. Since I didn’t have any NAS set up, I was slightly surprised, while SDCARD contained the stereo test file.
At this point I hit a wall - I could move anything onto the drive, but I’ve not been able to find a guide as to how a drive is best laid out. So I copied a FLAC and a CUE file onto the drive, rebuilt the database, and rebooted.
Still nothing. I’ve got two main suspicions:
1. That the wall wart was adequate for the drive and Pi 3, but not for the additional drain from the hat.
2. I didn’t have a clue on how I should have the drive set up.
For the first, I decided to spend a little, and I’ve ordered a powered drive enclosure and proper drive to replace the PiDrive, plus an 18W power supply for the Pi. However, it’ll be Wednesday until I can try those out.
However, I figured I can ask about the second one. Is there a best file system type to use? Since my day-to-day machine is a Mac, hfs+ would seem simplest, especially for moving files off the Mac, but is support for this built-in to the kernel?
Next, what is the best way to organize the external drive? I’ve played around with Plex and Jellyfin, where having one directory per artist with one subdir per-release, containing one file per track seems to be the norm. I can certainly do that while copying the files to the drive as I’m also in the process of trying to create a robust, bit-perfect copy of my music collection. I’m re-ripping all of my CDs into single FLAC files with separate CUE files, then burning these to 100GB BD-XL M-DISCs. It’s trivial to transcode these into file-per-track FLACs, though - just a bit slow as I’m midway through my 6th BD-XL, with probably another three or four to do.
So, short-version - is there a best practice for the layout of songs on the local drive, and can that drive be HFS+ formatted? There may also be drive power issues, but I hope those will magically disappear when I switch to a self-powered external drive.
Thanks in advance for any tips. I’m looking forward to getting a chance to have top-notch audio quality again - I’ve been stuck with lossy audio for 20 years, but added Sony WH-1000XM5 headphones recently. No lossless wireless or spatial audio because, well, Sony’s proprietary tendencies make Apple look like the FSF, but with the headphones in wired mode, I should at least be able to listen to the 24/96 audio I’ve got.
Posts: 1,272
Threads: 24
Joined: Jun 2022
Reputation:
42
(11-13-2022, 01:13 AM)awrc68 Wrote: I’m building a box around a Pi 3 and a DAC+ that’ll be used almost exclusively for playing back music from a dedicated USB drive.
I started out reusing the drive that had been connected to the Pi 3 before the project, which was one of WD’s now-deceased PiDrive line - a 1TB 2.5” drive with a wall wart with a Y-cable for power, with one side going to the drive and the other a Micro-USB for the Pi 3. It had worked without problems for years, and the drive was formatted as a standard bootable Pi drive, with a FAT partition for boot, a dedicated swap partition, and two ext4 partition for the root partition and user directories. I flashed the SD card with the current moOde version, and rebooted the machine (headless). After the expected initialization delay, I was able to access the web interface.
I wasn’t sure what to expect with the local drive on first boot. I could see the default streaming stations, and ssh’ing into the machine showed all four partitions mounted. I uncounted those, removed the partition table then, as a test, reformatted the drive as a single big partition (ext4), rebooted, then did regenerate the database, and rebooted again. When I ssh’ed in, the external drive was mounted as ‘/media/whatever-the-UUID-was’ and under /mnt there was now SDCARD and NAS. Since I didn’t have any NAS set up, I was slightly surprised, while SDCARD contained the stereo test file.
At this point I hit a wall - I could move anything onto the drive, but I’ve not been able to find a guide as to how a drive is best laid out. So I copied a FLAC and a CUE file onto the drive, rebuilt the database, and rebooted.
Still nothing. I’ve got two main suspicions:
1. That the wall wart was adequate for the drive and Pi 3, but not for the additional drain from the hat.
2. I didn’t have a clue on how I should have the drive set up.
For the first, I decided to spend a little, and I’ve ordered a powered drive enclosure and proper drive to replace the PiDrive, plus an 18W power supply for the Pi. However, it’ll be Wednesday until I can try those out.
However, I figured I can ask about the second one. Is there a best file system type to use? Since my day-to-day machine is a Mac, hfs+ would seem simplest, especially for moving files off the Mac, but is support for this built-in to the kernel?
Next, what is the best way to organize the external drive? I’ve played around with Plex and Jellyfin, where having one directory per artist with one subdir per-release, containing one file per track seems to be the norm. I can certainly do that while copying the files to the drive as I’m also in the process of trying to create a robust, bit-perfect copy of my music collection. I’m re-ripping all of my CDs into single FLAC files with separate CUE files, then burning these to 100GB BD-XL M-DISCs. It’s trivial to transcode these into file-per-track FLACs, though - just a bit slow as I’m midway through my 6th BD-XL, with probably another three or four to do.
So, short-version - is there a best practice for the layout of songs on the local drive, and can that drive be HFS+ formatted? There may also be drive power issues, but I hope those will magically disappear when I switch to a self-powered external drive.
Thanks in advance for any tips. I’m looking forward to getting a chance to have top-notch audio quality again - I’ve been stuck with lossy audio for 20 years, but added Sony WH-1000XM5 headphones recently. No lossless wireless or spatial audio because, well, Sony’s proprietary tendencies make Apple look like the FSF, but with the headphones in wired mode, I should at least be able to listen to the 24/96 audio I’ve got.
Just my 2-c on this...
I have all my music ripped in single FLAC + CUE, on a 1TB USB SSD formatted with Ext4. Works like a charm for me. (of course, in the library settings I have the "Ignore CUE files" option set to "No".
The directory tree of my disc is ARTIST => ALBUM => flac+cue. Although you can have multiple flac+cue couples in the same directory, they will end up showing the same album art - that of the first album detected in the folder, so I wouldn't do it.
Cheers, Al.
Posts: 13,357
Threads: 302
Joined: Mar 2018
Reputation:
538
1. Use Fat32 partition format for compatibility between Linux and Mac including permissions, time stamps etc. Performance is excellent.
2. Standard dir structure is artist/album/tracks
3. Cue formats for example flac/cue are treated as a virtual directory and so the dir structure in #2 where the one track is actually a file containing the whole album + a cue sheet laying out the tracks will cause extra directories to appear in Library Folder view. Tag and Album views will be ok though.
4. Cover art can be embedded in the tracks (mp3, flac and mp4 formats only) or it can be an image file (jpg or png) in the directory containing the tracks. Use the standard file name cover.jpg/png. Try to have nice resolution covers 600x600px or higher. Use the Prefs setting "Library | Thumbnail resolution"
Your best bet for trouble free music enjoyment is to rip the CD's to individual FLAC tracks in an artist/album/track directory structure with either embedded cover or a cover image file in the album dir.
Metadata tags are important. Typically set AlbumArtist = Artist and for compilation albums set AlbumArtist to the string "Various Artists".
The directories /mnt/NAS and /mnt/SDCARD are placeholder root directories. They won't appear in any of the Library views (Folder, Tag, Album) unless they contain music files. moOde ships with /mnt/SDCard/Stereo Test/LRMonoPhase4.flac
Posts: 11
Threads: 3
Joined: Nov 2022
Reputation:
0
(11-13-2022, 02:59 AM)Tim Curtis Wrote: 1. Use Fat32 partition format for compatibility between Linux and Mac including permissions, time stamps etc. Performance is excellent.
2. Standard dir structure is artist/album/tracks
3. Cue formats for example flac/cue are treated as a virtual directory and so the dir structure in #2 where the one track is actually a file containing the whole album + a cue sheet laying out the tracks will cause extra directories to appear in Library Folder view. Tag and Album views will be ok though.
4. Cover art can be embedded in the tracks (mp3, flac and mp4 formats only) or it can be an image file (jpg or png) in the directory containing the tracks. Use the standard file name cover.jpg/png. Try to have nice resolution covers 600x600px or higher. Use the Prefs setting "Library | Thumbnail resolution"
Your best bet for trouble free music enjoyment is to rip the CD's to individual FLAC tracks in an artist/album/track directory structure with either embedded cover or a cover image file in the album dir.
Metadata tags are important. Typically set AlbumArtist = Artist and for compilation albums set AlbumArtist to the string "Various Artists".
The directories /mnt/NAS and /mnt/SDCARD are placeholder root directories. They won't appear in any of the Library views (Folder, Tag, Album) unless they contain music files. moOde ships with /mnt/SDCard/Stereo Test/LRMonoPhase4.flac
FAT32 seems to be the only viable option for me, unless I want to plug the player’s drive into the Mac while it’s running Ubuntu under Virtualbox. If it gave me a speed boost, I’d consider it, but it’s a Pi 3, so the drive’ll manage USB 2.0 speeds at best.
As for format, the FLAC files I’ve ripped are mainly tag-free, since the CUE files contain all of that data. However, I can embed it during transcoding to single files.
Pluses for the one file per album FLAC are reduced fragmentation (although some of my Super Deluxe Editions may have to be split up to stay below 4GB) and liking the readability of CUE files. Oh, and I’ve got five or six CDs with the pre-emphasis flag - the rips of those are unadjusted but again, that can be fixed during transcoding. Actually, most of the titles with pre-emphasis that I’ve got are on the old side, in several cases I’ve got more recent versions, but several of those are casualties of the loudness war. I’m generally backing up all pressings of an album that I’ve got (five, in one case) but the player drive is going to get only the best version for each title.
Oh, one other small question - I see that it’s not recommended to do anything with configuration directly, presumably because it’ll get overwritten by the UI. For something like configuring the activation temperature of the case fan, which I have to do in raspi-config, will that part of the configuration be safe?
Posts: 1,272
Threads: 24
Joined: Jun 2022
Reputation:
42
(11-13-2022, 10:42 PM)awrc68 Wrote: Oh, one other small question - I see that it’s not recommended to do anything with configuration directly, presumably because it’ll get overwritten by the UI. For something like configuring the activation temperature of the case fan, which I have to do in raspi-config, will that part of the configuration be safe?
I'd look into an OS way of doing it, and leave it there,,,
Cheers, Al.
Posts: 11
Threads: 3
Joined: Nov 2022
Reputation:
0
(11-14-2022, 12:12 AM)Nutul Wrote: (11-13-2022, 10:42 PM)awrc68 Wrote: Oh, one other small question - I see that it’s not recommended to do anything with configuration directly, presumably because it’ll get overwritten by the UI. For something like configuring the activation temperature of the case fan, which I have to do in raspi-config, will that part of the configuration be safe?
I'd look into an OS way of doing it, and leave it there,,,
Cheers, Al.
Looks like I can do it by adding a dt_overlay line for gpio_fan - I’m assuming that if moOde alters anything in config.txt, it’s just along the lines of adding/removing an overlay for the DAC HAT.
I sometimes miss the days when Linux was inflexible and didn’t do, well, anything unless you told it to. In the olden days when I could configure the kernel for a new server with just the necessary drivers for the NICs we bought en masse (a long dead ISP where literally everything except the monster mail server was an in-house built Linux box). That said, the fact that the kernels were minimal and monolithic is one of the reasons I’m so ignorant about Linux audio.
Hmm, just remembered, in Ye Olden Days I used to be Not Al in certain corners of USENET, while moderating rec.music.reviews under my real name.
Cheers,
Al
Posts: 13,357
Threads: 302
Joined: Mar 2018
Reputation:
538
You best bet to determine whether the manually added dtoverlay line will be preserved is to examine the three source files where /boot/config.txt is manipulated. It's never overwritten but rather surgically edited with sed. There are however some sed's that expect certain lines to be there in a specific order.
Code: /var/www/daemon/worker.php
/var/www/inc/audio.php
/var/www/inc/network.php
Posts: 11
Threads: 3
Joined: Nov 2022
Reputation:
0
(11-15-2022, 03:15 AM)Tim Curtis Wrote: You best bet to determine whether the manually added dtoverlay line will be preserved is to examine the three source files where /boot/config.txt is manipulated. It's never overwritten but rather surgically edited with sed. There are however some sed's that expect certain lines to be there in a specific order.
Code: /var/www/daemon/worker.php
/var/www/inc/audio.php
/var/www/inc/network.php
Thanks, I’ll look those over.
|