IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Open standards for network audio streaming to local devices, Many closed-box solutions but any open-source? / uPNP recommendations?
alive
post Apr 15 2012, 16:56
Post #1





Group: Members
Posts: 81
Joined: 3-March 05
Member No.: 20311



Hi,
Some years ago, I had a room mate who had an Airport Express, which we hooked up to the stereo in the living room so any of us could stream music from our own iTunes-compatible PC's. Needless to say, I absolutely fell in love with the functionality even though it meant I couldn't use fb2k for it. But since we don't live together anymore, i've been missing this kind of functionality at home. Also there were some things that were missing out on the Airport which I think could be done better.

I don't wanna mess around with buying cheap 10-meter cables every time the last one breaks, and having it lie across the living room whenever I want to listen to music from my laptop in my couch, or changing it over to my PC if I want to watch a movie or play a game from there, etc. Hope you get the picture. Having cables lying around the house is something i want less of.

There are, as mentioned before, commercial closed-box devices which have been engineered well and probably work really good. But they cost money and are all dependent on the manufacturer to think up and implement new features and improvements. They cost money for each receiver and, correct me if I'm wrong, do not have good cross-platform support. I have a Windows 7 PC for gaming, Ubuntu laptop for work, small Linux server for local media hosting, and my girlfriend has a Windows laptop. In the future, who knows, one of us might even get a smartphone or some other fancy network-capable device that would need hooking up to the sound system. Suffice to say, in such conditions a closed-source implementation is lacking in flexibility.

What about reciever devices? Currently they cost money for each receiver, based on a model of embedded devices which need their own power source, not possible to just install the capability on any network-enabled device with quality sound output capabilities. An open-source solution could open up the possibility to use virtually ANY device as a sound reciever.

Also I'd like to install my old amp/speakers in the kitchen and have the ability to change sound destination seamlessly to either location or both synchronously.
Because of the wish for playing video games and watching movies, the solution would have to be absolutely low-latency. Thanks to extreme bandwith and processing power available to us today cheap, I think it could be possible.

And maybe my always-on linux media hosting device could double as a networked media jukebox, in which guests of a party could connect to a web interface with their phones and enqueue a local mp3, stream music from their own device, or even enqueue a youtube music video? I'm talking quite some years down the road for this idea, of course.

Does anyone know if there are any projects to make this (or something similar) happen?
I once looked through the documentation of PulseAudio and think I understood that they support the capability for networked sound outputs but had such a hard time understanding the documentation that I never got as far as trying to hack something together. Maybe there are other audio server software implementations that could be willed into a similar configuration?
Are there perhaps cheap and partly open commercial solutions available that I haven't come accross? I have to admit, I haven't even spent that much time researching the subject, but a quick google search yields me nothing worth examining further, other than the commercial solutions and the pitfalls they have.

Maybe there's something I just haven't thought through here? Please, any ideas, criticisms, contributions, suggestions. I'm just posting this idea here to see if it makes any sense and to find out if anyone has had similar thoughts.

Thank you for reading smile.gif

edit: This is so embarrasing. I've completely glossed over implementing the features via UPnP.

This post has been edited by alive: Apr 15 2012, 17:05


--------------------
Pusk is the new Start.
Go to the top of the page
+Quote Post
alive
post Apr 15 2012, 17:19
Post #2





Group: Members
Posts: 81
Joined: 3-March 05
Member No.: 20311



Okay, this is so embarrasing, it's beyond my words to explain. I had heard about UPnP previously but apparently I was too thick-headed to understand it at the time. It does exactly what I've just written a forum post about and even more! It's better than anything I could ever come up with.

Suggestions for available implementations are very much welcome. Thanks.


--------------------
Pusk is the new Start.
Go to the top of the page
+Quote Post
AudioKitten
post Apr 16 2012, 00:58
Post #3





Group: Members
Posts: 18
Joined: 11-April 12
Member No.: 98656



Yes, PulseAudio does support network streaming. I'm actually working on my own implementation if it at the moment using a wireless router with custom firmware. If I ever get it to work right I'll write a post here about how to do it but if you want to try it yourself what you need is a wireless router with a USB port, a USB sound card, a copy of DD-WRT firmware (make sure the router is compatible with it), and then the PulseAudio software to install onto the flashed router.

Anyway, just be aware that PulseAudio does resample your sound stream in order to support multiplexing. I haven't figured out a way around it, either. I have no idea whether or not UPnP has the same restrictions when used in a server-->controller-->renderer arrangement.

That's a project for the future. What I would really like would be a hacked router that operates as both a DLNA server and a DLNA renderer with my laptop acting as the DLNA controller. The problem is that while there are plenty of server softwares for Linux I can't find a single DLNA controller application.
Go to the top of the page
+Quote Post
alive
post Apr 16 2012, 08:46
Post #4





Group: Members
Posts: 81
Joined: 3-March 05
Member No.: 20311



Thanks for the reply!
I'd be very interested in reading your findings.
While reading up on using UPnP for this purpose, I came across a post where a guy had tested PulseAudio network streaming and found that wireless 802.1g didn't have enough bandwith but 1gig etherned did have enough (No word on the exact bandwith needed though).
PulseAudio probably resamples, as you said, to a very high bandwith stream. That's sub-optimal IMO.


I've been researching implementing the idea through UPnP and found that it is painstakingly possible through using gmediarender on the sound reciever and having a MediaServer/MediaController elsewhere. The weakness is that UPnP support in applications today is dodgy to say the least. Also it does not seem possible to send live computer sound (ie stream game sound) through UPnP, at least not in it's current implementations.

PulseAudio currently does seem as the least bad of implementing the idea.


--------------------
Pusk is the new Start.
Go to the top of the page
+Quote Post
AudioKitten
post Apr 16 2012, 10:38
Post #5





Group: Members
Posts: 18
Joined: 11-April 12
Member No.: 98656



Well... I know you can set Pulse to certain bit depths and sampling rates as well as controlling the resampler quality. I challenge anyone to tell the difference between 44.1/16 pure and 44.1/16 up-sampled to 192/24 with a high quality sampler. However that's nice and CPU intensive, too. So in this case the biggest advantage to non-resampled sound over resampled sound would be the lowered CPU usage. All things considered, if the laptop is doing the heavy lifting that could be a major advantage.

I need to have a look at the specifications a bit more to see if the server or the client is in charge of the resampling. If it's the server I might have to rethink my use of a router and instead opt for something like an Atom based mini computer. To the test bench!

My current setup calls for the pulseaudio server to be used mostly for Youtube, Pandora and other kinds of things. I bought a Turtle Beach AudioTron for 20 bucks off of Craig's List a week or two ago for pure music listening mostly so I wouldn't have to have a computer open in front of me with its fan making noise and it's screen distracting me from my musical concentration and enjoyment. So far the AudioTron looks pretty cool but I haven't really had a chance to play with it a great deal owing mostly to the fact that it's a three prong outlet and I don't have one of those and I haven't had the chance to install a CGFI outlet yet. I will report more on the device once I'm done setting it up because it does have a lot of promise. Instead of relying on some funny quasi-standard like DLNA it uses the nice-and-easy NFS (network file system) standard which is dirt easy to implement on a network. It's only disadvantage is the only lossless codec it understands is WAV... which is a shame but I hear there are special NFS server thingies that can convert FLACs into WAVs on the fly but I haven't even begun to explore those yet. On the plus side, these "vintage" network audio players are DIRT cheap.

As for there not being enough bandwidth in 802.11g for streaming 44.1/16 audio or even 192/24 I highly doubt that! 802.11g was designed to provide up to 54Mbit/s through a theoretically perfect connection. Since we don't live in Faraday cadges we don't get anything near that but, off the top of my head, you can reasonably expect at least 5-7Mbit/s. Given that 192/24 audio, by my calculations 4.6Mbit/s uncompressed, and given that PulseAudio, to the best of my knowledge, uses some form of compression when networked I'd say it's plenty. That being said, network stability might be an issue in which case you might want to try increasing the Pulse server's buffer and/or improve your network hardware. A good way to improve the network hardware would be to invest in a good antenna. "Antenna rolling" 802.11g is really simple. I would suggest either buying a more powerful omnidirectional antenna or buying/making a directional antenna and pointing it appropriately.

By the way, my suggestion if a wireless router wasn't so much for the wireless but for the fact that custom firmware is much, much better developed for wireless products than wired products. You can always disable the radios and strip off the antennas if you so desire.

Oh, there's another possibility with regards to routers and music. You could attach the sound card to the router and then use a simple command line based music player to play music files directly using a Telnet or SSH terminal to control it. The only problem is that it would be a bit fussy but I could see maybe writing a nifty little plug-in or other front end for a personal computer to send the commands through the console to control it. Imagine: an open source Squeezebox for under 50 bucks, new!

Who said you had to be an audiophile tweako to have fun hacking your stereo system! laugh.gif
Go to the top of the page
+Quote Post
cpchan
post Apr 16 2012, 12:53
Post #6





Group: Members
Posts: 299
Joined: 14-July 07
Member No.: 45304



QUOTE (alive @ Apr 15 2012, 12:19) *
I had heard about UPnP previously but apparently I was too thick-headed to understand it at the time. It does exactly what I've just written a forum post about and even more! It's better than anything I could ever come up with.

Suggestions for available implementations are very much welcome. Thanks.


I currently use Mediatomb, it might be already included in your distro.

Go to the top of the page
+Quote Post
2Bdecided
post Apr 16 2012, 13:23
Post #7


ReplayGain developer


Group: Developer
Posts: 5364
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



There are thousands of DLNA (UPnP) compatible devices out there.

Whether they work as nicely as you might want is another question, but you're certainly not tied into a particular manufacturer or OS, or even a single server or control point.

Cheers,
David.
Go to the top of the page
+Quote Post
AudioKitten
post Apr 16 2012, 13:34
Post #8





Group: Members
Posts: 18
Joined: 11-April 12
Member No.: 98656



QUOTE (2Bdecided @ Apr 16 2012, 05:23) *
There are thousands of DLNA (UPnP) compatible devices out there.

Whether they work as nicely as you might want is another question, but you're certainly not tied into a particular manufacturer or OS, or even a single server or control point.

Cheers,
David.


The problem with DLNA is that so far there aren't any DLNA controllers for Linux which makes UPnP a poor choice for Linux users who want to manage their sound system from their computer. Of course, maybe I'm wrong and someone did make a control point for Linux that I just don't know about, who knows. If you know of one I'd definitely like to know about it!

Of course, the other problem with DLNA as a standard is that nobody seems to actually follow the standard so two devices actually working together can sometimes come down to hit-and-miss.
Go to the top of the page
+Quote Post
cpchan
post Apr 16 2012, 13:58
Post #9





Group: Members
Posts: 299
Joined: 14-July 07
Member No.: 45304



QUOTE (AudioKitten @ Apr 16 2012, 08:34) *
The problem with DLNA is that so far there aren't any DLNA controllers for Linux which makes UPnP a poor choice for Linux users who want to manage their sound system from their computer. Of course, maybe I'm wrong and someone did make a control point for Linux that I just don't know about, who knows. If you know of one I'd definitely like to know about it!


https://en.wikipedia.org/wiki/List_of_UPnP_...player_software

and search for Linux.
Go to the top of the page
+Quote Post
phofman
post Apr 16 2012, 19:29
Post #10





Group: Members
Posts: 332
Joined: 14-February 12
Member No.: 97162



alive, I understand what your goal is. You want to have a single "network soundcard" to which other PCs could connect and use as their own soundcard.

I think you are right, uPnP server will not work as a virtual soundcard for the system it runs on. You are looking for something lower level than uPnP/DLNA.

IIUC, you have the following requirements:

1. Interface at soundcard level - it must accept sound from standard existing applications, i.e. provide a virtual sound card.

2. Mixing multiple streams from multiple PCs

3. Connecting different OSes - multiplatform solution

4. Simple device discovery

I am afraid currently there is no ready-made rock-solid multiplatform solution. I know only about pulseaudio and jackd. They all offer 2, 3, 4. However, I do not know how pulseaudio and jack handle the virtual soundcard requirement in windows. I think jack can emulate an ASIO device, no idea about pulseaudio. If you drop the windows requirement, the life gets suddenly much easier. As always :-)

That is the reason we do not get to see multiplatform network soundcards, eventhough the technology has allowed them for a decade. There is simply no standard network audio card protocol.
Go to the top of the page
+Quote Post
alive
post Apr 17 2012, 17:54
Post #11





Group: Members
Posts: 81
Joined: 3-March 05
Member No.: 20311



Thanks phofman! That is one of the things I was aiming for. Actually I was thinking of a mix between what you described, and what is possible using UPnP today.

Man, I wish the future could be here soon.


--------------------
Pusk is the new Start.
Go to the top of the page
+Quote Post
dZeus
post Apr 18 2012, 13:38
Post #12





Group: Members
Posts: 13
Joined: 2-January 06
Member No.: 26824



I think I'm doing some of what you want to achieve on my home network and audio system.

Here's what I use:
- Linksys NSLU2 de-underclocked at 266MHz running Debian Wheezy (requires good linux knowledge to get up and running). This can be replaced by any computer that supports Linux and with enough horsepower and RAM to decode compressed audio formats.
- A good quality USB soundcard hooked up to the linux machine, acting as a DAC. This needs to be supported by ALSA (do a google search before you buy something). I use a Terratec Producer Phase 26 USB.
- Rygel uPNP mediarenderer. Does not require X/Gnome/etc. to run. In other words, it can run on 'the bare metal' of a headless machine and work as a media renderer for your networked devices. Much like Philips streamium devices, but without an interface to control the mediarenderer locally. You will have to send music from a remote device using UPNP. This can be windows, linux, etc. Rygel uses the gstreamer multimedia framework, and thus can play anything gstreamer can play. Which includes OGG, WMA, MP3, AAC, etc.
- minidlna can run as UPNP Mediaserver. My NSLU2 doesn't have enough RAM (32MB) to run both at the same time, but if you use any hardware that is less ancient than my NSLU2 it should work just fine. I like minidlna because it is very light on resources, and supports things like streaming subtitles to Samsung televisions (which is not yet? in the DLNA/UPNP specs).
- As a controlpoint for Windows Vista, I use either eezupnp or leia. If you have Windows 7 you can just use WMP12 as controlpoint (I've tested it and it works fine). Leia and eezupnp are actually ported Linux applications, so you could use the same from a linux client. I'm sure there are plenty of controlpoints for Apple or cellphones. I've read that cellphones running Nokia's Symbian platform come with integrated UPNP stuff. No idea about other platforms.

Right now my issues with this setup:
- Rygel doesn't support reading and applying replaygain tags
- Rygel doesn't support gapless playback
- my NSLU2's 32MB RAM is on the extremely low side for playing back AAC (disk swapping causes breaks in playback at times)
- the lack of hardware floating point in the ARM CPU in my NSLU2 makes it too slow for floating point decoding of formats. Most formats have fixed point decoders available, but I haven't been able to find a fixed point WMA decoder that works with the gstreamer framework yet. The Rockbox project has done tremendous work in creating/optimizing fixed point decoders, but are not as good at backporting their decoders to the project they originate from (and sometimes the people running the originating projects are not interested in fixed point decoders either).
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th December 2014 - 15:49