Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Personal Use FLAC Streaming Solutions?

Cliff posted more than 8 years ago | from the not-all-streams-are-mp3 dept.

Music 46

Kulaid982 asks: "A friend of mine has challenged me to put together an internet music server for him. Ideally he'd like to stream music from his apartment to work. I'm aware of mod_mp3 for Apache, and Shoutcast seems to be a great streaming option, however, most of his music is FLAC or WAV. Obviously, .wav files are only streamable over the fastest networks, so is there an option for on the fly encoding to MP3 or FLAC to stream it? This will be a dedicated music-streaming box for his own personal use. I'm sure someone out there has already done this or something similar, so please share; how'd you pull it off?""Some technical specifics: The box is a P3 800 with 512MB of RAM, so I'm thinking Linux over Windows; his internet connection is 3 Mbps down, 256kbps up; and his collection is ~400GB, and is a mix of WAV, FLAC, and SHN (SHORTEN) formats."

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered


shoutcast (0)

Anonymous Coward | more than 8 years ago | (#12365762)

migt be good but windows over linux? why?

Re:shoutcast (1)

JFitzsimmons (764599) | more than 8 years ago | (#12365869)

Did you do any bit of research at all on this?

Icecast will suit your needs just fine - it'll take your files, and encode on the fly to either vorbis or mp3. If icecast doesn't have native support for the file formats you want, grab something like foobar2000, play everything through that, and get the plugins that pipe that sound output to icecast for post-proccessing.

Icecast homepage [icecast.org]

Re:shoutcast (1)

Jebediah21 (145272) | more than 8 years ago | (#12366923)

I haven't looked at icecast for a while but when I was looking to see what would stream flac, nothing came right out and said it. Nice to know Icecast will.

Re:shoutcast (1)

Guspaz (556486) | more than 8 years ago | (#12367205)

I don't believe it can stream FLAC. The point is the guy wants to stream content in either MP3 or FLAC or another format, but doesn't seem to realize that the tools that stream to shoutcast or icecast transcode from the input format to the output format.

For example, when you stream with winamp to shoutcast or icecast, it plays/decodes the input files just like when you normally play content, and then it runs it through an encoder and streams it to the server.

So, I think the parent poster meant, using Icecast you can serve up the transcoded stream.

Re:shoutcast (1, Informative)

Anonymous Coward | more than 8 years ago | (#12367592)

I don't believe it can stream FLAC.

It would use too much bandwidth anyway. CD audio (WAV) would use 1411.2 kbps, and FLAC wouldn't reduce that by more than half. Assuming the FLAC is 70% of the input size in the worst case, and TCP overhead limits you to 80% of your line speed, you'd need a connection with 1.2 Mbps upload.

SDSL could work, but many ISPs wouldn't like you uploading at that speed all day, so you'd probably need a T1 (unless you live close enough to work to use 802.11 or dry-pair DSL).

Re:shoutcast (1)

Guspaz (556486) | more than 8 years ago | (#12367972)

FLAC seems to often be closer to 50% of the input size, so it is safer to say that an 888kbit upstream would be required. This should be possible on the higher tier cable internet offerings in Quebec (Canada). The companies that offer unmetered connections do not tend to care about upstream usage; I leave my machine on with BitTorrent uploading with a 60KB/s (480kbit) cap for most of the time, and have yet to hear even a single complaint. This is the benefit of being with Bell Canada; they are so huge they do not care.

Unfortunately, all ADSL in Quebec has an upstream of only 800kbit (640kbit usable post-overhead), so it could not do it. It would not have any problem with mono FLAC content however, which might be an option for streaming.

Realistically though, the person who posed the Ask Slashdot didn't really want to stream in FLAC, he just suggested that because he stupidly didn't do any research at all before Asking Slashdot.

Re:shoutcast (1)

Jebediah21 (145272) | more than 8 years ago | (#12373404)

Ok, that would be why I scratched if off the list. Since this is just for a local network anything under 5 mbps would work, hence transcoding would be a useless step for my purposes.

Re:shoutcast (1)

Guspaz (556486) | more than 8 years ago | (#12376606)

On a local network there is no point streaming it at all; you might as well just play files right over SMB.

Use... (3, Informative)

keeleysam (792221) | more than 8 years ago | (#12365856)

-Windows 2000 or XP
-Winamp 2.92 (yes i know its old but it supports shoutcast)
-SHN and FLAC Winamp plugins
-Winamp Shoutcast DSP plugin
-Windows Shoutcast server

The DSP enocdes to MP3 on the fly, and really dosn't use much in the way of system resources.

The only problem i cna think of is remote control.

Re:Use... (1)

blorg (726186) | more than 8 years ago | (#12366083)

The only problem i cna think of is remote control.
There are plenty of web front ends for Winamp that allow you to control it through a browser (just Google - can't remember offhand the particular one I used); or alternatively there is always Terminal Services/VNC, etc.

Re:Use... (2, Informative)

pyrrhonist (701154) | more than 8 years ago | (#12367114)

Winamp 2.92 (yes i know its old but it supports shoutcast)

The newest version of WinAMP (5.08) supports the SHOUTcast plugin just fine. You don't need to get an old version.

Re:Use... (2, Insightful)

keeleysam (792221) | more than 8 years ago | (#12367344)

5 is too bloated and 3 is too buggy

Re:Use... (1, Informative)

Anonymous Coward | more than 8 years ago | (#12371744)

All of the resource usage from Winamp 5 comes from the skin engine. Turn that off & it will run like 2.x

Remote Control (0)

Anonymous Coward | more than 8 years ago | (#12376254)

I have almost that exact setup with the BrowseAmp [browseamp.com] plugin for Winamp which lets you control everything from a password protected web interface, it's pretty sweet.

SlimServer (5, Informative)

spiralscratch (634649) | more than 8 years ago | (#12366058)

Get it here [slimdevices.com]

Runs great on my server, which is almost identical system to the one specified. It should handle everything you need, including multiple formats and transcoding.

Their hardware is not required (but as an owner of one, I can say it is cool).

SlimServer? Apache::MP3? (3, Informative)

legLess (127550) | more than 8 years ago | (#12366179)

Have you looked at SlimServer [slimdevices.com] ? It's an open source Perl server designed to power Slim Devices' MP3 players.

I used it for a bit, but ditched it in favor of Lincoln Stein's Apache::MP3 [cpan.org] . My SO still uses SlimServer to stream from home to work, though. The two coexist well on my little Debian server. I don't know if SlimServer supports FLAC; Apache::MP3 does.

Re:SlimServer? Apache::MP3? (2, Informative)

Grotus (137676) | more than 8 years ago | (#12371913)


As long as a command line tool to decode the audio exists which can direct its output to standard out, it can be transcoded and streamed using SlimServer.

Winamp (2, Informative)

TheSHAD0W (258774) | more than 8 years ago | (#12366226)

When Winamp runs the Shoutcast plug-in, it decodes the music, no matter what format, then recompresses it before sending it out to the server. FLAC won't faze it.

Repeat after me (0, Troll)

c0d3h4x0r (604141) | more than 8 years ago | (#12366511)

I will not Ask Slashdot without trying Google first.
I will not Ask Slashdot without trying Google first.
I will not Ask Slashdot without trying Google first.

No, you repeat after me (3, Funny)

tepples (727027) | more than 8 years ago | (#12366658)

I will not dismiss a question with "Ask Google" without giving keywords.
I will not dismiss a question with "Ask Google" without giving keywords.
I will not dismiss a question with "Ask Google" without giving keywords.

Re:No, you repeat after me (2, Funny)

Seumas (6865) | more than 8 years ago | (#12366750)

I will not dismiss an "Ask Google" remark that doesn't give keywords to a question without giving keywords myself.

Re:No, you repeat after me (1)

sootman (158191) | more than 8 years ago | (#12367760)

If the author has a sixth-grade reading comprehension level, he can read his own post and find the keywords in it--personal, streaming, wav, mp3, flac, server, etc. The (-1, Troll) parent was right.

Re:No, you repeat after me (3, Informative)

c0d3h4x0r (604141) | more than 8 years ago | (#12368522)

Just literally plugging the question into Google usually yields plenty of information:

Personal Use FLAC Streaming Solutions? [google.com]

It's a fun game to play -- try it with other recent Ask Slashdot entries and you start to see how asinine most of the posted questions actually are.

gnump3d (1)

Jebediah21 (145272) | more than 8 years ago | (#12366640)

I've been wondering if this can do it. I think it would work by adding the right mime types, but I never got it working and haven't messed with it for almost a year.

Re:gnump3d (2, Informative)

stevey (64018) | more than 8 years ago | (#12366780)

Yes you can do it, and if it doesn't work for you mail me (I'm the author).

Re:gnump3d (1)

Jebediah21 (145272) | more than 8 years ago | (#12366804)

Wow! Talk about response :D I did see something on the mailing list when I searched, but have not been back to the machine in quite a while. Nice to know as I wanted to keep my collection in FLAC. Thanks.

Re:gnump3d (1)

l0rd (52169) | more than 8 years ago | (#12369466)

I for one can also vouch for gnump3d. Been using it now for a couple of years, and it works very nicely. Seeing that your buddy has a P3-800, converting wavs to mp3 in real time should be doable too.

You don't need anything special. (1, Redundant)

Guspaz (556486) | more than 8 years ago | (#12367227)

This is not worthy of an Ask Slashdot question. You did NO research and should have Asked Google first. Try searching for "stream mp3" and shoutcast is the FIRST RESULT.

The player (Usually WinAmp) decodes the content, transcodes it to MP3 or Vorbis, and streams it to the Shoutcast or Icecast server.

Why stream FLAC? (1)

eightball (88525) | more than 8 years ago | (#12367791)

FLAC only compresses to about half the size of the corresponding WAV. That doesn't seem that much of a difference to me, especially going over public internet.

one part: upling speed (3, Informative)

sootman (158191) | more than 8 years ago | (#12367886)

I can tell you from personal experience (since it's what I have) that a 256k uplink is not enough to reliably stream a 128kbps file. It is just baaaarely enough to move 1 MB per minute, which is about what a 128k mp3 winds up being, and given real-world network conditions, you will never get a reliable enough link to even play one song without pauses. So, the next step down is 112k or 96k.

At that point, the files are getting pretty small. A 128k mp3 is 1/10 the size of a .wav, and if FLAC gives 50% compression, 96k files--the largest you might expect to stream smoothly--is still 1/6 the size. So that 400 GB can shrink to about 60 GB (at which point, a 60 GB iPod becomes worth considering as well*) so there's not much reason not to just compress the whole collection to 96kbps mp3 or AAC or OGG and use that compressed copy as the source of what gets served/streamed.

* an iPod would solve a lot of problems while creating very few. The main problem is the cost. OTOH, it doesn't depend on network availability. It can be used in a lot more places than a computer can. It will play mp3, aac, wav, aiff, and Apple's lossless codec. And it can store files and do other cool things.

Re:one part: upling speed (3, Informative)

Bishop (4500) | more than 8 years ago | (#12368361)

In my experience you can stream 128kbit/s on a 256kbit/s link if a large enough recieve buffer is used. You can almost stream 196kbit/s reliably.

I agree with the idea of compressing the music and storeing it in a more portable format.

Re:one part: upling speed (2)

l0rd (52169) | more than 8 years ago | (#12369462)

This depends on two things:

1) Your provider. If your provider is decent you will have a good upstream which is able to stream 128k continuously. Unfortunately this is not the case for everyone....

2) The packet filter you use (or if you use a packet filter at all). You can set up PF to prioritize certain traffic so your streams don't suffer from concurrent downloads.

If the 2 above statements are true (you have a decent provider and are user PF), then you certainly can stream 128k reliably over a 256k upstream. Otherwise you're most certainly screwed.

Ampache (4, Informative)

phlipper (133836) | more than 8 years ago | (#12368548)

http://www.ampache.org/ [ampache.org] - It's a LAMP-based server, easy to use w/ some good features.

Currently the following file formats are supported.

* MP3 (Id3v1 & Id3v2)
* RM
* M4A/AAC/MP4 (Itunes files)

Re:Ampache (1)

mbrinkm (699240) | more than 8 years ago | (#12370535)

I currently have Ampache installed with the majority of my collection in FLAC.

While it will "read" your FLAC collection, to my knowledge Ampache currently does not support streaming of FLAC encoded audio. If someone knows how to do it, I would like to know. (And I did search the forums and there were unanswered questions that addressed this so I didn't ask any myself)

You can still use Ampache on the local machine as a collection / playlist manager with FLAC, and it does work flawlessly over the net with MP3 streaming.

Re:Ampache (2, Informative)

vollmerk (740066) | more than 8 years ago | (#12381094)

This is a limatation of the FLAC codec as far as I understand, I'm pretty sure there was an update to it that allows streaming... But don't quote me on that it's late and I'm tired.

Just to pimp my produce a little more it also supports output to

* Any Player that can read a https STREAM
* Local Play through Moosic
* Local Play through MPD
* Multicasting using IceCast

And it can generate the following Playlist types

* Extended m3u
* Simple m3u

Public SVN: https://svn.ampache.org/trunk [ampache.org]
Themes: http://www.ampache.org/themes/ [ampache.org]

I could go on, but you should just try it for yourself, http://www.ampache.org/support/faq.php [ampache.org]

-Karl Vollmer
Lead Developer, Ampache

Re:Ampache (1)

mbrinkm (699240) | more than 8 years ago | (#12382116)

"This is a limatation of the FLAC codec as far as I understand, I'm pretty sure there was an update to it that allows streaming... But don't quote me on that it's late and I'm tired. "

I thought that was what I saw on the forums, but I couldn't remember so I left the reason why out of my response. I tried using the downsampling settings to transcode from FLAC to MP3 on the fly for streaming, but I was unsuccessful. I'll check to see if there is an upgrade available for the codec installed on my machines.

I just installed Ampache on Monday and haven't had the time to play around with it. So far it has worked flawlessly with MP3 streaming and I haven't had any issues. I definitely like Ampache for listening to my music while at work.

some solutions (2, Insightful)

Sithgunner (529690) | more than 8 years ago | (#12368825)

I have a music server setup at my parents' home with tons of music encoded as flac, and I live at another place by myself and I listen there over the internet, so I don't even have to keep a single CD myself.

What I did may not help you directly, because this is a UNIX method, but if you do have UNIX, then try running nfs over those 2 points (Yes, if you really want to, put Cygwin on Window machines and you can mount them just fine or there is Service For Unix from Microsoft for free.)

Nfs is the best network filesystem that preserves the bandwidth over network imo (I run 100mbps up/down on both location and it keeps the bandwidth just fine over nfs. smb and rest just somehow cuts down the bandwidth, but may still run enough bandwidth for flacs)

But you can also try to put VPN against those 2 machines (if you got a WinXP Pro on one side, I think you can set it up as VPN server, that is if your network at your work allows the traffic), and have the home local drive exported as Windows share and mount it on the other side.

If you still can't have it done, maybe the easiest in terms of getting it up for the network is running Apache web server at home.

Once you get Apache running and have the music folder viewable from outside (maybe you want to put some password protection or something), you can just launch foobar2k or winamp and make it access to your server via global ip and have it streamed.

This is only like accessing another web server in the world, so it is very unlikely that you get network restriction.

If your IP is dynamic, you can consider getting a service like www.no-ip.com so you can have a consistent name along with your changing IP, so you can access without problems.

Hope one of it works for you.

SlimServer (2, Informative)

Y Ddraig Goch (596795) | more than 8 years ago | (#12369969)

http://slimdevices.com/ [slimdevices.com]

I use SlimServer alot. It comes with a software version of the SqueezeBox 2 (which supports ssl tunneling), it can also transcode on the fly to a lower bitrate (must install lame). This is a fantastic feature. I rip my music to mps vbr and transcode to a suitable bitrate for my outbound streams. SlimDevices also has a great support list and most questions are answered in short order.

How about this. . . . (0)

Anonymous Coward | more than 8 years ago | (#12375413)

Why not use a . . . wait for this . . . RADIO OR A PORTABLE MP3 PLAYER!!! Rotate your collection once in a while. Why must there be a complicated answer for everything!?

You're quite the friend... (0)

Anonymous Coward | more than 8 years ago | (#12379240)

A friend of mine has challenged me to put together an internet music server for him

So, I challenge you to give me $50,000!

Winamp and Shoutcast (2, Informative)

haplo21112 (184264) | more than 8 years ago | (#12382964)

I have a shoutcast stream which is done as follows.

I have a shoutcast server which is feed by winamp ruiing on a windows box. It plays back my files in random mode, and with the shout plugin for winamp shouts the stream into the shoutcast sever. The shoucast server then broad casts on the internet. Been up and running for 3 years now zero issues. It just works.

I have also added a freeware product called wwwinamp from Halo 8 productions (The original was actually made by the winamp/shoutcast guys as well, but they droped it and the Halo 8 guy picked it up). The wwwinamp allows be to contol the feed over the internet from a browser.

A different perspective (1)

amliebsch (724858) | more than 8 years ago | (#12392966)

I got tired of dicking around with this codec nonsense, having to deal with keeping a personal server up and running, and dealing with buffering problems caused by ISP uplink throttling. I finally just forked over the $10/mo for Rhapsody, which has a nice-sized library and can be streamed to any PC that has internet access. Problem solved.
Check for New Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account