Live streaming from PulseAudio in Ubuntu 12.04



Hi,

I'm trying to listen to the output from my laptop's sound card via a
DLNA client, without success.

I have tried with both rygel 0.14.0 in Ubuntu 12.04 and also rygel
0.14.2 packages picked out of the Ubuntu development packages but both
exhibit the same behaviour.

I've tried both making use of the existing output device and also using
the separate 'DLNA/UPnP Streaming' but with no difference in behaviour.

Using my Android 2.3.3 phone as a test client I can see this in the
'Connected Media' part of the default 'Music' app:

"Audio on gdh-x60s" 
  -> Output Devices 
     -> "Built-in Audio Analogue Stereo"

but when I select that, Android says "unable to play this type of audio
file" and the console from which I ran the 'rygel' command says:

(rygel:21837): Rygel-CRITICAL **: Error from pipeline
RygelHTTPGstResponse: gstsouphttpsrc.c(924):
gst_soup_http_src_finished_cb
(): /GstPipeline:RygelHTTPGstResponse/GstBin:transcoder-source/GstSoupHTTPSrc:souphttpsrc1:
libsoup status code 4

Other rygel-related tasks work well - e.g. when I run VLC with the
'dbus' interface for MPRIS2 support I can reliably 'beam' and control
video from my Android phone to VLC - that's really cool :D

Digging deeper, I fired up Wireshark to see what was going on and when
Android asks for :

POST /Control/org.gnome.UPnP.MediaServer2.PulseAudio/RygelContentDirectory HTTP/1.1
Host: 10.0.0.43:60216
User-Agent: AwoX/1.1 UPnP/1.0 DLNADOC/1.50

... in the XML response are buried HTTP URLs to the MP3 and LPCM
transcoded versions of the live stream:

http://10.0.0.43:60216/org.gnome.UPnP.MediaServer2.PulseAudio/i/L29yZy9nbm9tZS9VUG5QL01lZGlhU2VydmVyMi9QdWxzZUF1ZGlvL1NpbmtzLzA%3D/tr/LPCM.lpcm

and

http://10.0.0.43:60216/org.gnome.UPnP.MediaServer2.PulseAudio/i/L29yZy9nbm9tZS9VUG5QL01lZGlhU2VydmVyMi9QdWxzZUF1ZGlvL1NpbmtzLzA%3D/tr/MP3.mp3

However when I try to 'wget' either of those URLs from the commandline,
I get a 0-byte file, although the Content-Type is correct

gdh@gdh-x60s:~$ wget
"http://10.0.0.43:60216/org.gnome.UPnP.MediaServer2.PulseAudio/i/L29yZy9nbm9tZS9VUG5QL01lZGlhU2VydmVyMi9QdWxzZUF1ZGlvL1NpbmtzLzA%3D/tr/LPCM.lpcm"; -O /dev/null
--2012-07-09 22:04:24--
http://10.0.0.43:60216/org.gnome.UPnP.MediaServer2.PulseAudio/i/L29yZy9nbm9tZS9VUG5QL01lZGlhU2VydmVyMi9QdWxzZUF1ZGlvL1NpbmtzLzA%3D/tr/LPCM.lpcm
Connecting to 10.0.0.43:60216... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [audio/L16]
Saving to: `/dev/null'

2012-07-09 22:04:24 (0.00 B/s) - `/dev/null' saved [0]

gdh@gdh-x60s:~$ wget
"http://10.0.0.43:60216/org.gnome.UPnP.MediaServer2.PulseAudio/i/L29yZy9nbm9tZS9VUG5QL01lZGlhU2VydmVyMi9QdWxzZUF1ZGlvL1NpbmtzLzA%3D/tr/MP3.mp3"; -O /dev/null
--2012-07-09 22:04:47--
http://10.0.0.43:60216/org.gnome.UPnP.MediaServer2.PulseAudio/i/L29yZy9nbm9tZS9VUG5QL01lZGlhU2VydmVyMi9QdWxzZUF1ZGlvL1NpbmtzLzA%3D/tr/MP3.mp3
Connecting to 10.0.0.43:60216... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [audio/mpeg]
Saving to: `/dev/null'

2012-07-09 22:04:47 (0.00 B/s) - `/dev/null' saved [0]

Unsurprisingly, the Android client has a hard time playing a zero-byte
stream:

GET /org.gnome.UPnP.MediaServer2.PulseAudio/i/L29yZy9nbm9tZS9VUG5QL01lZGlhU2VydmVyMi9QdWxzZUF1ZGlvL1NpbmtzLzA%3D/tr/MP3.mp3 HTTP/1.1
Host: 10.0.0.44
User-Agent: HTC Streaming Player tmo_uk / 1.0 / htc_saga / 2.3.3

HTTP/1.1 200 OK
Date: Mon, 09 Jul 2012 20:59:39 GMT
Content-Type: audio/mpeg
contentFeatures.dlna.org:
DLNA.ORG_PN=MP3;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000
Connection: close

(there is no data - the TCP connection is closed at this point)

Is my logic flawed? Should this not 'Just Work' ?

I did try to get this working on a previous Ubuntu 11.04 with exactly
the same behaviour, but assumed that it was a bit early days and so
didn't pursue it.

This time round I'm interested to solve it :)

Cheers,
Gavin.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]