[pulseaudio-tickets] [Bug 42804] raop module does not work with shairport

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Aug 7 21:57:20 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=42804

--- Comment #22 from Matthias <pulseaudio at niafc.de> ---
(In reply to comment #21)
> @Martin and Matthias,
> 
> First, thank you guys (and Christophe, of course!) for your interest and
> hard work on RAOP2. I realized the same UDP port issue which Matthias
> described, and wrote a patch independently.
> 
> https://github.com/hfujita/pulseaudio-raop2/commit/
> bcec418665ae3650471acc59b9b849cc55646843
> 
> In my patch it will first try to bind the local port, since some of the
> default port might already be used by other applications, then announce that
> port to the server (AirPlay device).
> 
> I'm actually not working on shairport (working on my AV receiver), but I
> think we can share most of the findings.

Hajime, I just found a bug in someone elses code and patched it - thanks should
go to Martin and Christophe for implementing UDP in the raop sink.

Btw: My patched version of Martin's code works with shairplay (in the sense of
"it plays a song from my host remotely") but does not work with my Minx Air
200. I also have a Pioneer VSX-922 to test with. I will try that device next.

I also tried node_airtunes by Laurent Perrin
(https://github.com/radioline/node_airtunes) and it worked out of the box with
my Minx Air (did not test with shairplay yet). Its implemented in Javascript
and C++ using node.js and seems pretty mature. It uses ALAC to encode audio
frames (whereas raop_udp  just adds an ALAC header and sends PCM frames at the
moment).

I compared the RTP/RTSP/RTCP streams of both implementations (to my Minx Air
200) and found the following differences which I plan to have a deeper look on:

* raop_udp (as mentioned before) sends PCM frames with an ALAC header and
encrypts these with an AES key. If I read
http://git.zx2c4.com/Airtunes2/about/#streaming-audio-to-an-airtunes-2-compatible-server
correctly, one should either send PCM frames (with an ALAC header?) unencrypted
or encode the frames with ALAC and optionally encrypt them (as does
node_airtunes).

* Due to that (as I suspect at the moment) packets sent by node_airtunes are
much smaller (86 bytes) than those sent by raop_udp (~ 1470 bytes). As this is
close to the network MTU (at least in my setup) this _could_ be the reason why
my remote device does not play songs remotely due to network issues. UDP is
connectionless in the end. My remote shairplay box is connected to my WIFI
bridge via cabled ethernet, whereas the Minx Air 200 is connected via WIFI. As
the Minx also has a RJ-45 connector, I will try to connect it using an ethernet
cable and test again.

My next steps after testing the cabled setup would be:

1. Remove the ALAC header from the frames sent by raop_udp.
2. Use Apple's free implementation of ALAC to encode frames with ALAC before
sending if 1. does not work.

I will report back as soon as I found some time to work on this.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20130808/d022b7ad/attachment.html>


More information about the pulseaudio-bugs mailing list