View Single Post
Old 30 July 2009, 06:38 pm   #7
Join Date: Jul 2009
Posts: 4

ARGH, vbulletin ate my whole post!

I'm one of the developers of SqueezeCenter and wanted to chime in here with my two cents. I think everyone, myself included, is over-reacting just a bit on this issue, and there might be a simple solution. Here is some background:

Our Squeezebox products include native decoders for PCM, AIFF, FLAC, MP3, Vorbis, and WMA. We try to support as many other formats as possible through a generic transcoding framework. This makes use of command-line apps piped together to transcode into one of the supported native formats (usually FLAC, although sometimes MP3 if bandwidth is a concern for someone). We try to use off-the-shelf 3rd party decoders for this whenever possible, it doesn't make sense for us to implement our own command-line decoder.

So we ship these command-line decoders for out-of-the-box support for transcoding to FLAC: alac, faad, flac, mppdec, sox (for downsampling), and wvunpack. We don't ship LAME for licensing reasons, but users can install it manually for transcoding to MP3.

MPC transcoding is defined via the following rules:

mpc pcm * *
	# IR
	[mppdec] --raw-le --silent --prev --gain 2 - -

mpc aif * *
	# IR
	[mppdec] --raw-be --silent --prev --gain 2 - -

mpc flc * *
	# IR
	[mppdec] --silent --prev --gain 2 - - | [flac] -cs --totally-silent --compression-level-0 -

mpc mp3 * *
	# IRB:{BITRATE=-B %B}D:{RESAMPLE=--resample %D}
	[mppdec] --silent --prev --gain 3 - - | [lame] --silent -q $QUALITY$ $RESAMPLE$ -v $BITRATE$ - -
So here, we send mppdec data on stdin and expect wav/pcm/aiff back on stdout piped to the transcoder, or to send directly to the device. PCM/AIFF is used to support our 1st-gen Squeezebox that doesn't support FLAC.

With mpcdec, I believe the only features we are missing are raw PCM/AIFF output (--raw-le/--raw-be). As far as I can tell, we don't need --prev or --gain anymore, as the next version of SC will support reading the MPC RG headers (from both SV7 and SV8) and apply those directly using our standard firmware-based RG system.

We could disable MPC->PCM/AIFF support, but that would leave our older products having to use MP3 for transcoding.

So do you think it would be easy to add raw output support to mpcdec?
andyslim is offline   Reply With Quote