PDA

View Full Version : Can PCP/LMS Do This?



Hammerhead
2018-03-24, 13:18
Howdy, folks. New member needing some help on a use case.

I have a car that supports .wav and .mp3 thorough the onboard audio/nav/settings system along with CD and DVD media via the onboard disc changer. It also supports input via Bluetooth and USB via a port in the console of the car with full support for artist/title/art - and most importantly - integration with the system for steering wheel controls and call mute when there is an inbound or outbound call.

Unfortunately, all my audio files are .flac, which is not supported by the system. I have no desire to manage two sets of file extensions on my NAS (.flac for home and .mp3 for the car) and obviously want to maximize the sound quality, which pretty much rules .mp3 out.

I'm looking for some advice on how to implement a Pi in such a way that I can accomplish two things.

1) Turn the Pi into a transcoding file server (to convert .flac to .wav) and connect it via Bluetooth or the car's USB media port. I don't know if I can use the HDMI port (along with an HDMI to USB adapter) on the Pi to do this, or what configuration might be necessary.
2) Synchronize the Pi to my NAS nightly via WiFi so that as I continue to rip my collection to my NAS, the files are synchronized to the car.

So far I have installed PCP, used the 'beta' settings to mount a 128GB USB flash drive, and installed Samba, but for some reason the Pi is not visible on my home network. So from my Windows machine, I'm not able to use any utilities yet to transfer .flac files to the Pi.

I'm guessing that LMS will be involved here at some point, but I have no clue how to get from here to there. This whole thing is "above my pay grade", so I'm turning to you good folks for some advice.

Thanks in advance for your help!

Roland0
2018-03-25, 06:07
Unfortunately, all my audio files are .flac, which is not supported by the system. I have no desire to manage two sets of file extensions on my NAS (.flac for home and .mp3 for the car) and obviously want to maximize the sound quality, which pretty much rules .mp3 out.

I'm looking for some advice on how to implement a Pi in such a way that I can accomplish two things.

1) Turn the Pi into a transcoding file server (to convert .flac to .wav) and connect it via Bluetooth or the car's USB media port. I don't know if I can use the HDMI port (along with an HDMI to USB adapter) on the Pi to do this, or what configuration might be necessary.
2) Synchronize the Pi to my NAS nightly via WiFi so that as I continue to rip my collection to my NAS, the files are synchronized to the car.


If you think that mp3 sound quality isn't good enough, bluetooth won't be an option either (see here (https://www.soundguys.com/understanding-bluetooth-codecs-15352/)). The car system / Pi will use SBC (or AAC if you are lucky), which are worse than high quality mp3.
You cannot stream to USB storage, so audio files will have to be converted before being copied to the storage device. In this scenario, there's no transcoding.

kidstypike
2018-03-25, 08:08
So far I have installed PCP, used the 'beta' settings to mount a 128GB USB flash drive, and installed Samba, but for some reason the Pi is not visible on my home network. So from my Windows machine, I'm not able to use any utilities yet to transfer .flac files to the Pi.

What happens if you right click the Windows logo bottom left of your PC's screen > click "Run" > type in \\192.168.1.11 (change to your pi's IP address) and click "OK"?

epoch1970
2018-03-26, 06:01
LMS manages and controls squeezebox devices, you want your car system to control audio instead.
I don't think you have any use for LMS or PCP (in its standard form, running squeezelite.)

As Roland0 said, BT isn't so great so the simplest solution is to convert your flac files to mp3 automatically. Which will require disconnecting the storage media from you car stereo (and connect it to the NAS.)

(It might be possible to have a Pi in the car, have it connect via wifi to the home network when the car is in the driveway, update/convert files overnight, configure its BT interface to be seen as some audio source by the car audio system. I fear setting up something like that would be quite fiddly.)

Paul Webster
2018-03-26, 08:35
Running a Pi with Bluetooth could be the way to do this, especially as pCP 3.50 now includes Bluetooth support ... but you would still need a way to navigate to choose the music to play.
Presumably you want to use the built-in screen in the car and the dash/steering wheel controls.

A really nasty hack that might work ...

Get a Raspberry Pi Zero W.
Use the Wifi part to access your network when at home ... and the Zero W can have its single USB port switched to Gadget Mode and then emulate a mass storage device (USB disk).
Problem with this is that there is only one port available and if you use it like this then you will not be able to plug in a USB disk to hold your music.
So - the rest of the SD card could be used to store music.
You could run a script on the RPi Zero when you get home that fetches music from your home network and then convert it to MP3 as you store it to the SD card.

Easier would be to get a USB disk and carry it between car and home ... and then plug it in at home when you have new music to move over and do the translation to MP3 on the PC which would be faster than the RPi0

Hammerhead
2018-03-26, 13:34
Thanks for the feedback, fellas.

Just to be clear, I absolutely can hear a difference. I've got a fairly nice system in the car (It's by Bang & Olufsen), my home system is modestly high-end (Krell preamp, Bryston 4B-ST amp, Martin Logan reQuests) and I have pretty good ears, so there most definitely is a difference in the translation. While I don't expect the staging and dynamic range that I'd get at home, there's a 'puffiness' to the tracks that's annoying in .MP3 that aren't present in FLAC.

That said, I was hoping for something like this:

PCP
- Mount USB media
- Set up a Samba file share
- Synch files to drive every night at 3AM
- Configure Pi for HDMI output (it is bidirectional, after all...)
- Connect HDMI to car's USB media port via an adapter cable
- *Might 'USB OTG' be any help here?

LMS
- Set folder to rescan at 4AM
- Use 'C3PO' to transcode on-the-fly from MP3 to FLAC
- Car 'sees' file system, displays albums on the nav screen
- LMS 'sees' request, ques album/track/artist... whatever... and as it streams back to the car, converts .FLAC to... DSD, is it?

Anyway, your insight here would be greatly appreciated. I can't believe I'm the only one with such a use case, and if I can get this to work, it'd be a huge help to me and others who have 'legacy' audio equipment in the car that, for whatever reason, just doesn't work with FLAC.

Thanks!

Roland0
2018-03-26, 15:17
- Configure Pi for HDMI output (it is bidirectional, after all...)
- Connect HDMI to car's USB media port via an adapter cable

The car's USB media port will only accept USB mass storage devices. This means a file system only, no streaming.
This also means that there isn't (and can't be) a HDMI to USB adapter cable capable of doing what you want (HDMI to USB adapter are video capture devices, not mass storage devices).



- *Might 'USB OTG' be any help here?

No, since it will only allow a device (e.g. RPi Zero) to appear as a USB mass storage device.

majones
2018-03-26, 15:21
.. LMS 'sees' request, ques album/track/artist... whatever... and as it streams back to the car, converts .FLAC to... DSD, is it?
Best ask in the piCorePlayer thread for the relevant transcoder. ralphy fixed me up with .WMA to .FLAC, and it works flawlessly. But they may think you're odd going from .FLAC to something inferior. I found myself having to do this to stream to my Alexa speakers, but thankfully I didn't have to shame myself by asking here - mymediaalexa.com do it with their server.

usc95
2018-03-26, 15:58
Will your car support the media controls within certain apps? My wife's 2015 Honda Pilot will work with all manner of apps on her phone and provide basic control from the steering wheel controls such as play, skip etc. For example, she can start a Spotify playlist on her phone and then be able to skip tracks and even view album art on the vehicle center display from her steering wheel controls. I believe but am not certain that it will do this via bluetooth connection in addition to the Iphone plugged in via lightning cable to the USB port. We have not tried an Android phone. My car, 2008 Infiniti G35S, will provide basic controls and some metadata (no artwork) as well when plugged in to the "Ipod" control. You may be able to load your FLAC music on your phone and utilize a third party app in the case of an Iphone to playback the music with full steering wheel controls. Many vehicles were programmed with basic music control of IPODS as they were the dominant music players and many of them can still control Iphones if you happen to use one of those.

With my Iphone I have access to all of my FLAC music through Google Music. I believe Google Music stores my uploaded tracks as 320 kbps MP3 (which I know is not what you asked for but I personally cannot hear the difference between FLAC and 320 MP3 in a car driving down the road). With my vehicle controls and my phone hooked up to the IPOD input I have some control from the steering wheel. The google music application on my music computer watches my music folder and uploads any new additions automatically keeping my FLAC collection and MP3s in the cloud completely in sync. This is what I listen to whenever I want something that is not on Spotify. My biggest concern with Google Music is that gapless playback does not work well. You may be able to find a different app that you can use on your phone that will interface with your FLAC collection at home.

Hammerhead
2018-03-27, 06:14
Best ask in the piCorePlayer thread for the relevant transcoder. ralphy fixed me up with .WMA to .FLAC, and it works flawlessly. But they may think you're odd going from .FLAC to something inferior. I found myself having to do this to stream to my Alexa speakers, but thankfully I didn't have to shame myself by asking here - mymediaalexa.com do it with their server.
Are not flac and wav the same quality, the only difference being the former is compressed? In any case, I'm pretty sure that .wav would be better than .mp3 on any day.



Will your car support the media controls within certain apps? For example, she can start a Spotify playlist on her phone and then be able to skip tracks and even view album art on the vehicle center display from her steering wheel controls.
Yes, I have full meta data - including album art - in the car dash, from both bluetooth and USB port. The car also supports Spotify via Bluetooth but I think that's only if an Android or iPhone is in use. The problem with a phone is storage capacity. Right now, my FLAC collection is 170GB and growing.

The other issue is that I don't know if I use BT for the Pi will disable the hands-free calling in the car since I think only one phone can be paired at a time. Also, it's been suggested that Bluetooth is not great for audio, unless it supports a certain protocol which I don't know if I have, so there's some question about whether there are really any gains to be had this way. One solution might be to buy a USB WiFi dongle and add it to the Pi, disable the onboard WiFi in favor of Bluetooth, and see if that will work. Let me RTFM for the car again and see what I can figure out.

garym
2018-03-27, 06:27
Are not flac and wav the same quality, the only difference being the former is compressed? In any case, I'm pretty sure that .wav would be better than .mp3 on any day.


correct. WAV and FLAC are both LOSSLESS.

d6jg
2018-03-27, 07:30
Thanks for the feedback, fellas.

Just to be clear, I absolutely can hear a difference. I've got a fairly nice system in the car (It's by Bang & Olufsen), my home system is modestly high-end (Krell preamp, Bryston 4B-ST amp, Martin Logan reQuests) and I have pretty good ears, so there most definitely is a difference in the translation. While I don't expect the staging and dynamic range that I'd get at home, there's a 'puffiness' to the tracks that's annoying in .MP3 that aren't present in FLAC.

That said, I was hoping for something like this:

PCP
- Mount USB media
- Set up a Samba file share
- Synch files to drive every night at 3AM
- Configure Pi for HDMI output (it is bidirectional, after all...)
- Connect HDMI to car's USB media port via an adapter cable
- *Might 'USB OTG' be any help here?

LMS
- Set folder to rescan at 4AM
- Use 'C3PO' to transcode on-the-fly from MP3 to FLAC
- Car 'sees' file system, displays albums on the nav screen
- LMS 'sees' request, ques album/track/artist... whatever... and as it streams back to the car, converts .FLAC to... DSD, is it?

Anyway, your insight here would be greatly appreciated. I can't believe I'm the only one with such a use case, and if I can get this to work, it'd be a huge help to me and others who have 'legacy' audio equipment in the car that, for whatever reason, just doesn't work with FLAC.

Thanks!

Leaving aside the mechanics of how this might work have you considered how you are going to power the Pi in car at 3:00 am ? You really don't want it always on unless you wish to drain the car battery.

d6jg
2018-03-27, 07:40
Having read through all this I really think you have a number of problems that you haven't yet hit.

The best option that will work with the car is a portable USB drive and mp3's but even this is limited by the flash memory in the car infotainment system. It is unlikely to be able to properly index 170GBs of files (even as MP3). The library size limit is determined by the capacity of the flash memory.

Some people have built Pi based LMS servers that reside in the car, tweaked to provide WLAN access point and then use an old iPhone (and iPeng) as a player / controller via bluetooth. Unfortunately this may not be fully controllable via the car infotainment system. Try your phone via bluetooth and see what the control is like.

bakker_be
2018-03-27, 09:26
It could also help to know which car this is, as not all car USB's + ICE systems are the same. E.g. my 2016 VW Golf quite happily accepts FLAC on it's factory SatNav radio, but it doesn't read the tags, instead just displaying the filename and playing the music.
As it's a company car the optional Android Auto (in Belgium this costs around 250€) support hasn't been activated, or I would be able to use e.g. Mediamonkey for Android straight from the car's interface to play FLAC with full info straight from my phone without involving bluetooth.

epoch1970
2018-03-27, 11:27
Modern car infotainment systems are part of automotive (linux) platforms, the whole thing look like that (https://wiki.automotivelinux.org/_detail/distro/agl_subsystems.png?id=agl-distro).
That's a lot of boxes, and the projected interactions and usage scenarios are (normally) strictly defined...

usc95
2018-03-27, 16:25
Are not flac and wav the same quality, the only difference being the former is compressed? In any case, I'm pretty sure that .wav would be better than .mp3 on any day.



Yes, I have full meta data - including album art - in the car dash, from both bluetooth and USB port. The car also supports Spotify via Bluetooth but I think that's only if an Android or iPhone is in use. The problem with a phone is storage capacity. Right now, my FLAC collection is 170GB and growing.

The other issue is that I don't know if I use BT for the Pi will disable the hands-free calling in the car since I think only one phone can be paired at a time. Also, it's been suggested that Bluetooth is not great for audio, unless it supports a certain protocol which I don't know if I have, so there's some question about whether there are really any gains to be had this way. One solution might be to buy a USB WiFi dongle and add it to the Pi, disable the onboard WiFi in favor of Bluetooth, and see if that will work. Let me RTFM for the car again and see what I can figure out.

If you use Google Music you will upload your music to Googles servers (up to 50k tracks I believe) and they will stream it back to you in mp3 format. No need to take up space on your device. If you want to use FLAC instead and you have an iPhone there is an app and service called VOX that gives you unlimited storage for $5 a month for your music. I think they can even handle hi-res if you are into that https://vox.rocks

usc95
2018-03-27, 16:59
One other app to try if you have an iPhone is iPeng. While it is primarily a remote for your squeezebox it also can turn your iPhone into a squeezebox player that can connect to your LMS server over cellular. I believe that Pippin has a tutorial on how to do this on his website for iPeng.

I really think an app on a phone or tablet is the simplest way to get FLAC playback in your car. Some ANDROID devices accept micro sd cards that you can load up with up to 256 gbs of music if you didnÂ’t want to stream your music. Finally you could buy a purpose built music player like this one and see if it can work with your carÂ’s controls https://www.razordogaudio.com/products/sony-nw-wm1a-signature-series-walkman-digital-music-player-with-hi-res-audio-1?utm_medium=cpc&utm_source=googlepla&variant=53086338948&gclid=EAIaIQobChMIirnPldqN2gIVk2B-Ch3TDAxTEAQYASABEgKQPvD_BwE

d6jg
2018-03-28, 03:23
In truth there is very little point having FLACs in car as opposed to 320kbps MP3. You won't hear any difference even with top end Bose kit or similar due to road and wind noise etc.

Its an interesting project but you will never get the infotainment system to read the contents of a Pi no matter what you use. As others have said a phone can connect to the infotainment system in a number of ways but total control is not always available via the car.

I have an iPhone with FLAC Player installed (its an app with a clunky mechanism for loading FLACs) but if I ask the car to play Bluetooth from said phone it will try to play what is in the native iTunes thingy (which is empty). If however I start play in the FLAC Player app on the phone then I can control volume, play and pause and next etc but I can't choose a different playlist or album via the car.

For this reason the best option remains USB thumb drive with 320kbps MP3. I have a 32Gb drive which holds more than suffiicient music for even the longest journey.

garym
2018-03-28, 04:24
In truth there is very little point having FLACs in car as opposed to 320kbps MP3. You won't hear any difference even with top end Bose kit or similar due to road and wind noise etc.

Or 192kbps for that matter except with particularly troublesome samples that produce artifacts (these are rare, and would be even more rare to hear in an automobile setting). In my own case, I keep a mirror image of my FLAC library as mp3s for use in my ipods, iphones, ipads (LAME -V2, which are ~192kbps; and this is overkill, in the noisy car, airplane, or gym environments these would be fine at 128 or 160 kbps).

I know the OP didn't want to deal with a separate library. In my own case, I have about 100,000 tracks. I was able to create the mp3 mirror with an automated batch process that kept my subfolder organization, tags, file names, artwork, etc. And I can point and click to update the mp3 mirror library with newly added FLAC files (that is, I don't have to remember what I've already converted....the program remembers and knows to only convert the FLAC files that do not already exist as mp3). I use dbpoweramp, but there are lots of options for this task.

d6jg
2018-03-28, 05:32
Or 192kbps for that matter except with particularly troublesome samples that produce artifacts (these are rare, and would be even more rare to hear in an automobile setting). In my own case, I keep a mirror image of my FLAC library as mp3s for use in my ipods, iphones, ipads (LAME -V2, which are ~192kbps; and this is overkill, in the noisy car, airplane, or gym environments these would be fine at 128 or 160 kbps).

I know the OP didn't want to deal with a separate library. In my own case, I have about 100,000 tracks. I was able to create the mp3 mirror with an automated batch process that kept my subfolder organization, tags, file names, artwork, etc. And I can point and click to update the mp3 mirror library with newly added FLAC files (that is, I don't have to remember what I've already converted....the program remembers and knows to only convert the FLAC files that do not already exist as mp3). I use dbpoweramp, but there are lots of options for this task.

Slightly off topic. Why don't you use VB's auto mp3 mirror Gary? I don't either but what is your reason ?

garym
2018-03-28, 05:35
Slightly off topic. Why don't you use VB's auto mp3 mirror Gary? I don't either but what is your reason ?

no particular major reason. But I have more options I can set with dbpoweramp conversion (automatically redoing ReplayGain tags, adding itunes SOUNDCHECK values, taking "cover.jpg" art in folder and embedding in the mp3 files but also reducing the size from 1000x1000 to 300x300), etc. Basically just more control over process.

p.s. I don't use the Vortexbox autoripping for CDs either. It is fine, but doesn't have the ability to match a rip to ACCURATERIP database for better confirmation of perfect rip.

atrocity
2018-03-28, 07:56
For this reason the best option remains USB thumb drive with 320kbps MP3. I have a 32Gb drive which holds more than suffiicient music for even the longest journey.

The biggest problem for me is that I'm not aware of any car-based MP3 player (disc or USB) that's fully gapless.

I finally wrote a little Linux script to concatenate album tracks into a single big file, then convert it to MP3. It requires Sox, FLAC and LAME. Here it is in case someone else finds any value in it. Note that there are three different options for the encoding, I leave two commented out and uncomment whichever one I want to use at the time. Even with the medium quality -V4 setting in LAME I find it good enough for a noisy car environment.

Just execute this in the same directory as the album you want to convert to a single MP3. Change the parameters at the top to insert the correct metadata.



#!/bin/bash

FileType='flac'

artist='Pink Floyd'
album='Zabriskie Point'
year=1970
outfile='/mnt/WD8TBNAS03/TempAudio/Workspace/Convert/Pink Floyd MP3/Temp/15-Zabriskie Point.mp3'
artwork='Folder.jpg'

FileList=$(find *.$FileType -printf "\"%p\" " | sort)
printf "$FileList\n"

# Concatenate all album tracks to stdout and pass to lame for encoding to a single large MP3

# 320 CBR
#eval "sox --no-clobber $FileList -t wav - | lame -q0 -b320 -mj --noreplaygain --scale 1 --verbose --ta \"$artist\" --tl \"$album\" -ti \"$artwork\" --tt \"$album\" --ty $year - \"$outfile\""

# VBR -V0 = highest quality, -V9 = lowest quality
eval "sox --no-clobber $FileList -t wav - | lame -V4 -mj --noreplaygain --scale 1 --verbose --ta \"$artist\" --tl \"$album\" --tt \"$album\" --ti \"$artwork\" --ty $year - \"$outfile\""

# VBR ***MONO*** -V0 = highest quality, -V9 = lowest quality
#eval "sox --no-clobber $FileList -t wav - | lame -V4 -ml --noreplaygain --scale 1 --verbose --ta \"$artist\" --tl \"$album\" -ti \"$artwork\" --tt \"$album\" --ty $year - \"$outfile\""

# -q0 = highest quality
# -b320 = 320kbps
# --scale 1 = do not alter volume
# -mj = joint stereo

Hammerhead
2018-03-28, 08:11
It could also help to know which car this is, as not all car USB's + ICE systems are the same... I would be able to use e.g. Mediamonkey for Android straight from the car's interface to play FLAC with full info straight from my phone without involving bluetooth.
It's a 2013 BMW with their 'CIC' system. It's the generation immediately prior to the current 'NBT' system. Again, the problem with using a phone is limited storage capacity.


Leaving aside the mechanics of how this might work have you considered how you are going to power the Pi in car at 3:00 am ? You really don't want it always on unless you wish to drain the car battery.
I don't see the Pi draining the car's battery much, but I could easily add a PiCo UPS board like this:
https://www.buyapi.ca/product/ups-pico-uninterruptible-power-supply-i2c-control-hat/


The best option that will work with the car is a portable USB drive and mp3's but even this is limited by the flash memory in the car infotainment system.
There's an onboard hard drive that's 80GB in size for indexing music data with a limit of 36,000 tracks.

This is where it helps to RTFM. ;-)

Formats supported:
Optical media of various flavors (i.e. CD, CD-ROM, DVD+R DL)
Compressed media files: MP3, WMA, AAC, M4A

The USB port supports media players such as an iPod, or Flash. The car will also support up to FOUR Bluetooth connections for audio and if I'm not mistaken support A2DP. I think the strategy here is to use an external USB adapter either for WiFi or BT. That way I can set the Pi to the opposite, using WiFi for synch and BT for car audio. Any input on that subject is welcome.


Or 192kbps for that matter except with particularly troublesome samples that produce artifacts (these are rare, and would be even more rare to hear in an automobile setting)... I know the OP didn't want to deal with a separate library.
Yes, I was trying to avoid two separate libraries. I was also hoping to benefit from the lossless format. However, it seems that the only way to use the onboard system is to have either a BT or USB connection which appears as a file system. So I guess the question at this point is which will give the better results - FLAC transcoded and sent via USB, or .MP3 on a USB stick if we can somehow get the Pi to be seen by the car as a file system?

Roland0
2018-03-28, 10:11
Yes, I was trying to avoid two separate libraries.

If you settle for mp3, you may be able to use mp3fs (https://khenriks.github.io/mp3fs/) to avoid this (depending on the platform your library is hosted on).



I was also hoping to benefit from the lossless format. However, it seems that the only way to use the onboard system is to have either a BT or USB connection which appears as a file system. So I guess the question at this point is which will give the better results - FLAC transcoded and sent via USB, or .MP3 on a USB stick if we can somehow get the Pi to be seen by the car as a file system?
Sound quality: AAC > MP3 > Bluetooth
I don't see any reason to use a Pi in this setup (unless you use Bluetooth - and even in this scenario, a cheap android phone with a sd card will be a much simpler option), the files will be on a USB storage.

Hammerhead
2018-03-28, 13:23
If you settle for mp3, you may be able to use mp3fs (https://khenriks.github.io/mp3fs/) to avoid this (depending on the platform your library is hosted on).
Sound quality: AAC > MP3 > Bluetooth
I don't see any reason to use a Pi in this setup (unless you use Bluetooth - and even in this scenario, a cheap android phone with a sd card will be a much simpler option), the files will be on a USB storage.

That's pretty cool! I'm at the point where I'm giving up any hope of getting the car to see FLAC files.

So, if we could get the Pi to make the file system available to the car's USB port and appear as though it was just mass storage, then this would do the trick. Theoretically I could simply synchronize all my FLAC files to the Pi over my network, and as the car looks for them, mp2fs "shows" the car what it expects to see, album art and all, yes?

So, I'm down to what software and possibly adapters to get from here to there.

epoch1970
2018-03-28, 13:39
So, if we could get the Pi to make the file system available to the car's USB port and appear as though it was just mass storage, then this would do the trick.
In a way, yes...
Your audio system expects a mass-storage device, the Pi does too. This means they both act as USB hosts, and you can't connect 2 hosts together.
You'd want the Pi to present itself as a mass-storage device, while playing its mp3fs trick over FLAC files that are in reality stored on the SD card. The only Pi product that will perhaps do that is Pi0 (and 0w?) which are AFAIK the only Pis that support USB OTG (Linux calls that "usb gadget mode").

I'm clearly not the specialist but I think you need to be a hero to try doing something like that. Plus large µSD cards are expensive.

EDIT: 0w supports gadget mode (https://www.raspberrypi.org/forums/viewtopic.php?t=190721#p1197886)

Hammerhead
2018-03-28, 16:31
In a way, yes...
Your audio system expects a mass-storage device, the Pi does too. This means they both act as USB hosts, and you can't connect 2 hosts together.
You'd want the Pi to present itself as a mass-storage device, while playing its mp3fs trick over FLAC files that are in reality stored on the SD card. The only Pi product that will perhaps do that is Pi0 (and 0w?) which are AFAIK the only Pis that support USB OTG (Linux calls that "usb gadget mode").

I'm clearly not the specialist but I think you need to be a hero to try doing something like that. Plus large µSD cards are expensive.

EDIT: 0w supports gadget mode (https://www.raspberrypi.org/forums/viewtopic.php?t=190721#p1197886)I read here that I could theoretically I could use a Zero mounted on a Pi3 via the GPIO header. Not sure how I'd pull it off or what software would be involved, though.

https://www.raspberrypi.org/forums/viewtopic.php?t=190721#p1197886
You assume wrong. All B-series models of Pis have a USB hub. Pi0, Pi0W, all A-series and all CM-series Pis do not. On the Pi3B and Pi0W (and the Pi3A whenever it gets launched) the WiFi and BT are *not* on the USB bus.

Sent from my SM-T813 using Tapatalk

epoch1970
2018-03-28, 16:53
I read here that I could theoretically I could use a Zero mounted on a Pi3 via the GPIO header.
Anything is possible, I guess.
But the fact it’s never been done before doesn’t necessarily mean it’s a good idea...

Roland0
2018-03-29, 12:55
I read here that I could theoretically I could use a Zero mounted on a Pi3 via the GPIO header. Not sure how I'd pull it off or what software would be involved, though.

This won't work. Apart from the hardware limitations (Pi0 has only one USB port), the USB OTG mode won't support this scenario either (see here (https://www.kernel.org/doc/Documentation/usb/mass-storage.txt) and here (http://www.linux-usb.org/gadget/file_storage.html) for details)

Realistically, the following methods are feasible:
- use mp3fs on the server on which your library is located (or on another computer which mounts the library over the network), and synchronize the mp3s to a USB storage device (e.g. using rsync or similar)
- use some script to archive the conversion and synchronization. I've written a script (http://forums.slimdevices.com/showthread.php?108762-Export-playlist-of-music-files-to-USB-pen-drive&p=907869&viewfull=1#post907869) for a somewhat similar scenario, which I'm currently rewriting to include conversion (e.g. flac->mp3) and volume normalization. While the original purpose was to copy files based on playlists (since I only want parts of my library on my phone / in my car), it could be easily extended to copy all files from a directory instead.