PDA

View Full Version : problems playing AAC files on linux with slimserver 5.3.1 (andsolution too)



Ovidiu Predescu
2004-10-03, 21:42
I recently bought a squeezebox and I'm very happy with it, you've done
a great job!

I installed slimserver on a linux box and copied my collection of
music from iTunes/MacOS X to it. I followed your faq on how to get AAC
files to play on linux, and I compiled faad from CVS and installed it.

After the installation however, slimserver would still not play my AAC
files. After some debugging, I discovered the reason why it doesn't
work.

In Source.pm, getConvertCommand correctly finds the new command, but
it fails to exit the loop because underMax() always returns 0. The
solution I found was to replace the following check in underMax()

if (defined($type) && $type eq 'mp3' ) {

with

if (defined($type) && ($type eq 'mp3' || $type eq 'wav')) {

Perhaps the above check needs to be extended to other file types as
well, I'm not sure.

I'd appreciate if you could integrate the change in the following
releases of slimserver.

Best regards,
Ovidiu

kdf
2004-10-03, 22:54
how does this change affect birtate limiting for other formats? or non bitrate
limiting for other formats?

the code was intended as a special case for mp3 input when the bitrate limiting
might be lower than the current mp3. I dont see how it has any bearing on AAC
exepct that you have forcibly munged the bitrate value.

-kdf

Quoting Ovidiu Predescu <ovidiu (AT) gmail (DOT) com>:

> I recently bought a squeezebox and I'm very happy with it, you've done
> a great job!
>
> I installed slimserver on a linux box and copied my collection of
> music from iTunes/MacOS X to it. I followed your faq on how to get AAC
> files to play on linux, and I compiled faad from CVS and installed it.
>
> After the installation however, slimserver would still not play my AAC
> files. After some debugging, I discovered the reason why it doesn't
> work.
>
> In Source.pm, getConvertCommand correctly finds the new command, but
> it fails to exit the loop because underMax() always returns 0. The
> solution I found was to replace the following check in underMax()
>
> if (defined($type) && $type eq 'mp3' ) {
>
> with
>
> if (defined($type) && ($type eq 'mp3' || $type eq 'wav')) {
>
> Perhaps the above check needs to be extended to other file types as
> well, I'm not sure.
>
> I'd appreciate if you could integrate the change in the following
> releases of slimserver.
>
> Best regards,
> Ovidiu
>

Ovidiu Predescu
2004-10-04, 12:00
I'm not familiar with the code at all, so you may have a point.

However, if the patch code I sent doesn't apply to file types other
than mp3, then perhaps the check for underMax should be probably moved
elsewhere in getConvertCommand(). Otherwise playing AAC files does not
work.

Thanks,
Ovidiu

On Sun, 03 Oct 2004 22:54:49 -0700, kdf <slim-mail (AT) deane-freeman (DOT) com> wrote:
> how does this change affect birtate limiting for other formats? or non bitrate
> limiting for other formats?
>
> the code was intended as a special case for mp3 input when the bitrate limiting
> might be lower than the current mp3. I dont see how it has any bearing on AAC
> exepct that you have forcibly munged the bitrate value.
>
> -kdf
>
>
>
> Quoting Ovidiu Predescu <ovidiu (AT) gmail (DOT) com>:
>
> > I recently bought a squeezebox and I'm very happy with it, you've done
> > a great job!
> >
> > I installed slimserver on a linux box and copied my collection of
> > music from iTunes/MacOS X to it. I followed your faq on how to get AAC
> > files to play on linux, and I compiled faad from CVS and installed it.
> >
> > After the installation however, slimserver would still not play my AAC
> > files. After some debugging, I discovered the reason why it doesn't
> > work.
> >
> > In Source.pm, getConvertCommand correctly finds the new command, but
> > it fails to exit the loop because underMax() always returns 0. The
> > solution I found was to replace the following check in underMax()
> >
> > if (defined($type) && $type eq 'mp3' ) {
> >
> > with
> >
> > if (defined($type) && ($type eq 'mp3' || $type eq 'wav')) {
> >
> > Perhaps the above check needs to be extended to other file types as
> > well, I'm not sure.
> >
> > I'd appreciate if you could integrate the change in the following
> > releases of slimserver.
> >
> > Best regards,
> > Ovidiu
> >

kdf
2004-10-04, 12:12
Quoting Ovidiu Predescu <ovidiu (AT) gmail (DOT) com>:

> I'm not familiar with the code at all, so you may have a point.
>
> However, if the patch code I sent doesn't apply to file types other
> than mp3, then perhaps the check for underMax should be probably moved
> elsewhere in getConvertCommand(). Otherwise playing AAC files does not
> work.
>
> Thanks,
> Ovidiu

there are several places where undermax is tested. This case is simply a
speical situcation that is not covered by others. When using other formats,
its easy to trigger bitrate limiting. When the input is MP3, this needs a
special case.

As for AAC, I have an aac file I use for testing that functions just fine on
linux. I would susggest that it is not simply a case of 'aac doesn't work',
but there might be something different about yoru particular file that triggers
a case that we do need to check.

is this AAC lossless? What does the d_source log output show when you try to
play that file? Specifically, it would be good to see what the server thinks
is the bitrate for this file, and what it is set for the output rate. underMax
may bereturning the right value because of mixing up the these two other
parameters in some way.

-kdf

kdf
2004-10-04, 12:26
Quoting Ovidiu Predescu <ovidiu (AT) gmail (DOT) com>:

> I'm not familiar with the code at all, so you may have a point.
>
> However, if the patch code I sent doesn't apply to file types other
> than mp3, then perhaps the check for underMax should be probably moved
> elsewhere in getConvertCommand(). Otherwise playing AAC files does not
> work.
>
> Thanks,
> Ovidiu

one other thing I thought of. Are you trying to play the AAC files as MP3? If
so, you need LAME installed as well. transcoding will fall back on WAV output
if LAME is not found. This may explain why you need to add WAV to the special
case. If you are intending to have your AAC file played back as wav, make sure
you go into player settings, audio and confirm that your bitrate limit setting
is set to "no limit". The default for a wired squeezebox is 'no limit', but if
the squeezebox is detected as wireless when first set up, teh default will set
to 320kbs MP3. This is designed to give the majority of users the best
out-of-the-box experience since 320kbps is far less likely to suffer ill
effects from a weak wireless signal, or interference.


also, for the future, patches and code implementation discussions are best done
on teh developers list:
http://lists.slimdevices.com/lists/listinfo/developers

This way to can keep up with the ongoin efforts in SQL backend and the rework of
the transcoding frameowrk.
-kdf