PDA

View Full Version : AAC Files on Squeezebox without re-encoding?



Kevin Murphy
2005-01-02, 14:37
Hello,

I recently posted to the list trying to find a way to play AAC files on
my SliMP3 using a Linux box to run slimserver. Thanks to everyone who
helped with that, I finally ended up with the following entry in
convert.conf to make it work:

mov mp3 * *
[faad] -w -f 2 $FILE$ | [lame] -x -m s -r -S -q 3 -s 44.1 - -

Now, I expected to have to re-encode the files to MP3 in order to play
them on the SliMP3. However, I recently ordered (and am eagerly
awaiting shipment of) a Squeezebox-wired. I'm wondering what I'll need
to do (or if I even can) stream the audio to the SB as PCM instead of
wasting the processor time on the server (and losing the quality) to
re-encode to MP3 before sending them.

From what I recall, the -x parameter in the lame command line was the
cornerstone of this whole thing working, because it had to byte-swap the
output from faad. I'm first curious why the output from faad needs to
be byte-swapped to be played, and second curious if there is any way to
do this without running through lame and without degrading the quality
of the audio.

I tried adding the following entry to convert.conf, and commented out
the above for testing:

mov mp3 squeezebox *
[faad] -w -f 2 $FILE$

And when I ran SoftSqueeze against the server with these settings, I got
"Problem: Can't open file for:" blah blah blah...

Am I incorrect in assuming that SoftSqueeze will be able to use
squeezebox specific settings? And if not, then does anyone have any
thoughts on what I might do to make this work?

Thanks!

--Kevin Murphy

kdf
2005-01-02, 14:44
Quoting Kevin Murphy <skoro (AT) skoroworld (DOT) com>:

> Hello,
>
> I recently posted to the list trying to find a way to play AAC files on
> my SliMP3 using a Linux box to run slimserver. Thanks to everyone who
> helped with that, I finally ended up with the following entry in
> convert.conf to make it work:
>
> mov mp3 * *
> [faad] -w -f 2 $FILE$ | [lame] -x -m s -r -S -q 3 -s 44.1 - -
>
> Now, I expected to have to re-encode the files to MP3 in order to play
> them on the SliMP3. However, I recently ordered (and am eagerly
> awaiting shipment of) a Squeezebox-wired. I'm wondering what I'll need
> to do (or if I even can) stream the audio to the SB as PCM instead of
> wasting the processor time on the server (and losing the quality) to
> re-encode to MP3 before sending them.
>
> From what I recall, the -x parameter in the lame command line was the
> cornerstone of this whole thing working, because it had to byte-swap the
> output from faad. I'm first curious why the output from faad needs to
> be byte-swapped to be played, and second curious if there is any way to
> do this without running through lame and without degrading the quality
> of the audio.
>
> I tried adding the following entry to convert.conf, and commented out
> the above for testing:
>
> mov mp3 squeezebox *
> [faad] -w -f 2 $FILE$
>
> And when I ran SoftSqueeze against the server with these settings, I got
> "Problem: Can't open file for:" blah blah blah...

it should be:
mov wav * *
[faad] -w -f 2 $FILE$

the second param is the output format, so your original mod was on track, but
would have still bee used only for mp3 output.

-kdf

Kevin Murphy
2005-01-02, 14:54
Oh good lord, is my face red... You're absolutely right. However,
making that change (and I tried aif as well, since the -f 2 option on
faad creates a pcm stream) still didn't fix the problem. In fact I'm
quite sure it's related to the aforementioned byte-swapping issue, as I
can't get any player to play the resulting files direct from faad...

Any other thoughts?

Thanks!

--Kevin

kdf wrote:
> it should be:
> mov wav * *
> [faad] -w -f 2 $FILE$
>
> the second param is the output format, so your original mod was on track, but
> would have still bee used only for mp3 output.

Triode
2005-01-02, 15:14
Kevin,

Are you using a faad compile based on the recent CVS? This modified the output of faad when writing to stdout. I use the following
with a compile based on the current CVS.

mov wav * *
[faad] -w -s 44100 $FILE$
mov mp3 * *
[faad] -w -s 44100 $FILE$ | [lame] -r -x -q $QUALITY$ -b $BITRATE$ - -

Adrian
----- Original Message -----
From: "Kevin Murphy" <skoro (AT) skoroworld (DOT) com>
To: "Slim Devices Discussion" <discuss (AT) lists (DOT) slimdevices.com>
Sent: Sunday, January 02, 2005 9:54 PM
Subject: [slim] AAC Files on Squeezebox without re-encoding?


> Oh good lord, is my face red... You're absolutely right. However, making that change (and I tried aif as well, since the -f 2
> option on faad creates a pcm stream) still didn't fix the problem. In fact I'm quite sure it's related to the aforementioned
> byte-swapping issue, as I can't get any player to play the resulting files direct from faad...
>
> Any other thoughts?
>
> Thanks!
>
> --Kevin
>
> kdf wrote:
>> it should be:
>> mov wav * *
>> [faad] -w -f 2 $FILE$
>>
>> the second param is the output format, so your original mod was on track, but
>> would have still bee used only for mp3 output.
>
>

Kevin Murphy
2005-01-02, 15:15
Actually, an interesting side-note here... The problem only appears to
happen when the -w option is used, causing faad to stream to stdio
instead of writing to a file itself. A comparison between WAV files
created in the two different fashions shows a filesize difference of 44
bytes.

--Kevin

Kevin Murphy wrote:
> Oh good lord, is my face red... You're absolutely right. However,
> making that change (and I tried aif as well, since the -f 2 option on
> faad creates a pcm stream) still didn't fix the problem. In fact I'm
> quite sure it's related to the aforementioned byte-swapping issue, as I
> can't get any player to play the resulting files direct from faad...
>
> Any other thoughts?
>
> Thanks!
>
> --Kevin
>
> kdf wrote:
>
>> it should be:
>> mov wav * *
>> [faad] -w -f 2 $FILE$
>>
>> the second param is the output format, so your original mod was on
>> track, but
>> would have still bee used only for mp3 output.
>
>
>

Kevin Murphy
2005-01-02, 15:19
Hrmm, this would be consistent with my findings... If you don't mind,
could you dig up what date you grabbed the CVS snapshot? What Linux
distro are you running? I'm running FC3 and I know I had issues the
last time I tried building faad from source (though that was when I was
going on the basis that I needed an older version, not a newer version,
so maybe this time will be different...)

Thanks!

--Kevin

Triode wrote:
> Kevin,
>
> Are you using a faad compile based on the recent CVS? This modified the
> output of faad when writing to stdout. I use the following with a
> compile based on the current CVS.
>
> mov wav * *
> [faad] -w -s 44100 $FILE$
> mov mp3 * *
> [faad] -w -s 44100 $FILE$ | [lame] -r -x -q $QUALITY$ -b
> $BITRATE$ - -
>
> Adrian

Triode
2005-01-02, 15:25
I used latest snapshot from from:
http://www.audiocoding.com dated 15092004.

Adrian
----- Original Message -----
From: "Kevin Murphy" <skoro (AT) skoroworld (DOT) com>
To: "Slim Devices Discussion" <discuss (AT) lists (DOT) slimdevices.com>
Sent: Sunday, January 02, 2005 10:19 PM
Subject: [slim] AAC Files on Squeezebox without re-encoding?


> Hrmm, this would be consistent with my findings... If you don't mind,
> could you dig up what date you grabbed the CVS snapshot? What Linux
> distro are you running? I'm running FC3 and I know I had issues the
> last time I tried building faad from source (though that was when I was
> going on the basis that I needed an older version, not a newer version,
> so maybe this time will be different...)
>
> Thanks!
>
> --Kevin
>
> Triode wrote:
>> Kevin,
>>
>> Are you using a faad compile based on the recent CVS? This modified the
>> output of faad when writing to stdout. I use the following with a
>> compile based on the current CVS.
>>
>> mov wav * *
>> [faad] -w -s 44100 $FILE$
>> mov mp3 * *
>> [faad] -w -s 44100 $FILE$ | [lame] -r -x -q $QUALITY$ -b
>> $BITRATE$ - -
>>
>> Adrian
>

Kevin Murphy
2005-01-02, 19:36
Hrmm, I still appear to be getting nowhere with this... I built the
snapshot you pointed me at (and later noticed that the FC3 supplied
build I was already using was actually newer) and I'm still getting the
same error...

Could someone perhaps point me at the proper debug options to find out
what's happening behind the scenes? "Could not open file" is annoyingly
vague and I have no idea where the failure point might be.

Thanks!

--Kevin

Triode wrote:
> I used latest snapshot from from:
> http://www.audiocoding.com dated 15092004.
>
> Adrian

kdf
2005-01-02, 21:58
Quoting Kevin Murphy <skoro (AT) skoroworld (DOT) com>:

> Hrmm, I still appear to be getting nowhere with this... I built the
> snapshot you pointed me at (and later noticed that the FC3 supplied
> build I was already using was actually newer) and I'm still getting the
> same error...
>
> Could someone perhaps point me at the proper debug options to find out
> what's happening behind the scenes? "Could not open file" is annoyingly
> vague and I have no idea where the failure point might be.

d_source should give you the best for first look.

outside of that, running from command line will allow you to see any errors that
come from the faad program itself.

-kdf

Kevin Murphy
2005-01-03, 00:25
Is softsqueeze in fact capable of playing a PCM stream? And does it
look for the definition "squeezebox" in the convert.conf file? Or does
it look for "softsqueeze"?

--Kevin

kdf wrote:
> Quoting Kevin Murphy <skoro (AT) skoroworld (DOT) com>:
>
>
>>Hrmm, I still appear to be getting nowhere with this... I built the
>>snapshot you pointed me at (and later noticed that the FC3 supplied
>>build I was already using was actually newer) and I'm still getting the
>>same error...
>>
>>Could someone perhaps point me at the proper debug options to find out
>>what's happening behind the scenes? "Could not open file" is annoyingly
>>vague and I have no idea where the failure point might be.
>
>
> d_source should give you the best for first look.
>
> outside of that, running from command line will allow you to see any errors that
> come from the faad program itself.
>
> -kdf
>
>

kdf
2005-01-03, 00:40
Quoting Kevin Murphy <skoro (AT) skoroworld (DOT) com>:

> Is softsqueeze in fact capable of playing a PCM stream? And does it
> look for the definition "squeezebox" in the convert.conf file? Or does
> it look for "softsqueeze"?
>
> --Kevin

Those 'definition' in reality no longer apply. What controls pcm/mp3 is the
player setting, under audio, for bitrate limiting.

Softsqueeze can play many formats, pcm included.

-kdf

Kevin Murphy
2005-01-03, 01:33
Ok, I had a whole pile of problems going on here...

First off, I was assuming that the Softsqueeze would work with
squeezebox-specific definitions, which does is not the case, I had to
define a softsqueeze section as well.

Second, something is royally screwed up with faad and its PCM output.
I'm currently using the wav output and it seems to be working fine.

So, I now have 3 definitions, one for the SliMP3 which passes the PCM
data through Lame which byte-swaps and re-encodes to MP3, one for the
Softsqueeze which decodes to WAV, and one for the Squeezebox (not yet
tested, still waiting for my SB) which decodes to WAV.

I'd prefer PCM, but I'll live with WAV. It's still less stress on the
server, and less lossy than re-encoding to MP3 before streaming it.

Thanks for the pointers once again, folks!

--Kevin

kdf wrote:
> Quoting Kevin Murphy <skoro (AT) skoroworld (DOT) com>:
>
>
>>Hrmm, I still appear to be getting nowhere with this... I built the
>>snapshot you pointed me at (and later noticed that the FC3 supplied
>>build I was already using was actually newer) and I'm still getting the
>>same error...
>>
>>Could someone perhaps point me at the proper debug options to find out
>>what's happening behind the scenes? "Could not open file" is annoyingly
>>vague and I have no idea where the failure point might be.
>
>
> d_source should give you the best for first look.
>
> outside of that, running from command line will allow you to see any errors that
> come from the faad program itself.
>
> -kdf
>
>