smst wrote: 
> Have you tried renaming the multichannel FLACs to have a different
> extension, and then setting custom configuration for that?  (I might be
> missing something obvious there!)What would be the point? I'd have my 
> collection with messed up
extensions, while I manage to get perfect results the way I described.

I try to summarize below.

*The problem*
Having FLAC files containing encapsulated DTS or AC3 content works fine.
I have tagged all multichannel files with genre 5.1, to easily browse my
multichannel collection. Lately I've made good use of Multilabrary and
CustomBrowse plugins to have even better access. But a problem remains
in a multi-user situation (in my case, wife and daughter). There might
players around the house synched to the AV Receiver connected
Squeezebox, there might be cases where even with tagging and plugins (as
mentioned) a player connected through analog connections is sent
multichannel material. In that case we all know what happens: white
noise inferno!

*The solution*
First of all we need to losslessly convert all multichannel content from
FLAC to ALAC (Apple lossless). It might work with other lossless audio
codes, I tried with ALAC for ease of use in my case (I used foobar2000
to mass convert). So ALAC is tried and tested (by me) but I see no logic
reason why a different lossless format should not work, it's up to you
trying.

Once that is done, we need to download a recent release of FFMPEG
(http://www.ffmpeg.org/download.html#releases), in my case (Windows) I
used Zeranoe's build (https://ffmpeg.zeranoe.com/builds/) and I needed
to use the shared version (with libraries as separated files). Now, I'm
not sure why that was the case but it works with shared version and I
really don't want to waste more time trying to fix what's not broken. We
then need to copy ffmpeg and its libraries in the correct server
directory where other codecs are locaded (sox, for instance). For
Windows it's \Squeezebox\server\Bin\MSWin32-x86-multi-thread.

Now that we have all our multichannel music in a specific lossless
format that is not used for any other content, we proceed in setting up
rules in custom-convert.conf (you need to create it if you don't have
one alread, in Windows it's located at \Squeezebox\server). I provide a
custom-convert file as an example. The MAC addresses are set at
00:00:00:00:00:00 because you need to fill in the values from your
different players.


Code:
--------------------
    
  
  #PLAYER_WITH_ENOUGH_BANDWIDTH_TO_HANDLE_LOSSLESS_FILES_NOT_TRANSCODED
  alc flc * 00:00:00:00:00:00
        # FT:{START=-j %s}U:{END=-e %u}
        [faad] -q -w -f 1 $START$ $END$ $FILE$ | [ffmpeg] -loglevel quiet -i - 
-f flac -ac 2 -
        
  #PLAYER_WITH_LIMITED_BANDWIDTH_NEEDING_TRANSCODING_TO_HANDLE_LOSSLESS_FILES
  alc mp3 * 00:00:00:00:00:00
        # FB:{PATH=%f}T:{START=-j %s}U:{END=-e %u}D:{RESAMPLE=--resample %D}
        [faad] -q -w -f 1 $START$ $END$ $FILE$ | [ffmpeg] -loglevel quiet -i - 
-f mp3 -aq 0 -ac 2 -
--------------------


Bear in mind that some of the parameters I use above might not be needed
(the resample option for mp3 is not needed as I think FFMPEG
automatically resamples to 16/44.1 for mp3 conversion). The important
options in ffmpeg is -ac 2, which tells ffmpeg to downmix the music to
two channels.
For mp3 transcoding I use audio quality 0 (-aq 0). -aq is equivalent to
-q:a and is mapped to LAME (whose libraries FFMPEG uses) -V option.
Audio Quality 0 is equivalent to a -V 0 LAME encoding (which is the
highest VBR quality setting). You can find more details here:
https://trac.ffmpeg.org/wiki/Encode/MP3
If you have severe bandwidth limitations, you can modify the conversion
instructions, per player, using lower bitrates. 

Now this all works fine if, on your network, you don't have players
natively supporting ALAC. In Squeezelite case it's enough to launch it
with the correct -c option (I use "-c flac,pcm,mp3,ogg,aac,wma,dsd").
For hardware natively supporting ALAC (I think that is the case for
Touch and Radio) I *think* you could disable the native option Under
Server Settings/Advance/File Types. Not having a Touch I cannot test
this.

Enjoy.


------------------------------------------------------------------------
gorman's Profile: http://forums.slimdevices.com/member.php?userid=56
View this thread: http://forums.slimdevices.com/showthread.php?t=19260

_______________________________________________
ripping mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/ripping

Reply via email to