Senior Member
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135
|
this stuff is dear to my heart, as i've spent the last 2 years tweaking and perfecting this type of setup - so, i'll probably save you hours of anxiety and sleepless nights.
a short history: i've used winamp, shoutcast, icecast, oddcast, jack, flumotion, xmms, gnump3d, ampache, jinzora, and vlc (i may have left something out...)
i now use two of the above: vlc for local and lan; gnump3d for internet streams.
ultimately, imho, vlc is the single best solution for both local/lan and internet, but it can be a cpu hog if not tweaked properly (constantly running at about 17% cpu usage if internet streaming is invoked, because of transcoding options necessary to downsample the output. since it's 'working' even if there are no internet connections (and i'm the only one who would be connecting), this cpu usage is unnecessary.)
gnump3d, on the other hand, streams over the net only on demand, hence no cpu usage unless i'm connected.
briefly, i'm set up thusly:
vlc runs in the background at startup. there is no gui; for control i use a telnet remote control interface, plus there is an http web interface (pretty basic, but functional enough). hence, my pc is playing music randomly, 24/7. turning on my stereo is like turning on the radio - there's always music playing, and i certainly can't complain about the song selection. the stereo is simply connected via rca>stereo/line-out jack. plus, of course, if my pc speakers are on, there's music there, as well. if i'm in another part of the house, then i point an instance of vlc at the mp3 pc, and i have the same music (albeit with a slight lag (but we can call it 'echo' stereo enhancement) playing there.
the difference between using vlc internally vs gnump3d is that with gnump3d the same 'playlist' can't be streamed 'simultaneously' to each client, so the music in each part of your home would be different. (when i say 'can't', it means i haven't necessarily figured out how to do so - if someone has perfected this, please feel free to discuss...)
the largest single issue with vlc is its syntax; it took me eons to get it right for both lan and internet streaming (two distinct streams: a 'raw' stream for the lan (highest quality), and a downsampled stream for the internet).
here's the command line for a double stream:
vlc -I http --extraintf rc --control http:rc --rc-host :4800 --http-host:7000 --no-rc-show-pos --volume 512 --spdif -vvv /home/laptop/all.m3u --random --sout-keep --sout '#duplicate{dst=display,dst="std{access=http,mux=raw,url=192.168.3.2:8000}",dst="transcode{acodec=vo rb,aenc=vorbis{quality=.5},ab=16,samplerate=22500,channels=2}:standard{access=http,mux=ogg,url=192.1 68.3.2:8888}"}'
here's single stream:
vlc -I http --control http:rc --rc-host :4800 --http-host :7000 --no-rc-show-pos --volume 500 --spdif -vvv /home/laptop/all.m3u --random --sout-keep --sout '#duplicate{dst=display,dst="std{access=http,mux=raw,url=192.168.3.2:8000}"}'
believe me, getting the apostophes and quote marks, commas, spaces, expressions, etc in just the 'right' order was a labour of love (and i still don't know the whys and wherefores, just that it works.)
if you forge ahead with either of these commands, it's important that you actually open a telnet instance (telnet localhost 4800 (or 192.168.3.2 4800)), otherwise vlc's cpu usage is in the 80's....
almost lastly, i'll explain what each does:
double stream:
vlc opens with an http interface on port 7000 and a telnet interface on 4800. it plays the playlist 'all.m3u' randomly. it keeps the stream alive between songs. it 'streams' the output to display (local sound), in raw format to port 8000 (for the lan), and sends a downsampled (.5 quality, 16 bit, stereo, ogg) stream to port 8888.
the single stream:
um, same thing without the second stream.
lastly, i use madman media library tool to compile the playlist. i searched forever to come up with a suitable playlist manager, tried many (couldn't get some to compile, so i can't say i actually tried them....), and finally settled on madman. it's not perfect, but it does the trick (15000 songs in database), though i have to send the playlist to xmms in order to save it. again, if anyone has a better solution, i'm all ears.
cheers,
|