PDA

View Full Version : flac over http



MattC
2008-08-19, 00:50
Hi,

I have a slightly curious problem, that I wonder if anyone can help me with, in as much as I don't seem to be able to play flac files served up from a webserver.

I have a server here called getz, and all three of these URLs play fine in xmms

http://getz/music/test/skunk.flac
http://getz/music/test/skunk.wav
http://getz/music/test/skunk.mp3

but the flac one doesn't play on the squeezeboxes when I use Internet Radio / Tune In URL

I don't understand why. The squeezebox says "Error: No Items In Playlist" The wav and the mp3 play fine on the squeezebox via Tune In URL.

some finer detail:

SqueezeCenter Version: 7.1 - 22170 @ Mon Jul 28 13:31:43 PDT 2008 - Debian - EN - iso-8859-1
Perl Version: 5.8.8 i486-linux-gnu-thread-multi
Platform Architecture: i686-linux
Hostname: getz
Server Port Number: 9000

very grateful for any help
thanks
Matt

funkstar
2008-08-19, 07:00
I can't say for sure, but I would guess that SC7 isn't expecting to have a FLAC radio station (which is what it assumes the URL is) so doesn't know what to do with the input.

Why are you trying to do this anyway?

MattC
2008-08-19, 07:19
Hi funkstar,

thanks for replying.


I can't say for sure, but I would guess that SC7 isn't expecting to have a FLAC radio station (which is what it assumes the URL is) so doesn't know what to do with the input.

Why are you trying to do this anyway?

I have a tuner attached to my server, and was following the ideas laid out here:

http://www.blott-online.com/soundcard.html

but instead of lame I was hoping to use flac for best quality. (I know I could use wav for best quality, but wanted to save bandwidth where I knew I could) I found out that this didn't work for flac, but did for both mp3 and wav, so in order to rule out any errors in what I had done, I took it back a stage to find the results of my first post.....

should I file this as a "bug" do you think?


thanks
Matt

MattC
2008-08-19, 07:51
it looks like apache is returning a content-type of application/x-flac for flac files, but the types.conf that ships with squeezecenter only has audio/x-flac and audio/flac listed against the flac type. I've added application/x-flac to types.conf, and now with the logging turned up a bit, I get this entry in my logfile:

[08-08-19 15:48:01.2122] Slim::Networking::IO::Select::select (250) Error: Select task failed: Can't locate object method "filename"
via package "IO::String" at /usr/local/slimserver/Slim/Formats/FLAC.pm line 1179.

does that help at all?


thanks
Matt

funkstar
2008-08-19, 11:26
Kind of a bit above me head to be honest :)

It can't hurt to raise a bug for this and reference this thread for more details.

MattC
2008-08-19, 23:36
I'm (obviously!) not a perl programmer, but this not particularly elegant fix works for me:


# diff /usr/local/slimserver/Slim/Formats/FLAC.pm /usr/local/slimserver/Slim/Formats/FLAC.pm.orig

1179,1183d1178
< if (substr($url, 0, 4) eq "http") {
< # http stream - don't bother
< return (-1, undef);
< }
<


I think I'll go and log a bug so this can be fixed properly in the main source tree.

thanks
Matt