Re: Launching Rygel on headless server



On 29 May 2012 16:24, Cefn Hoile <mail gnome org cefn com> wrote:
> On 29 May 2012 12:48, Cefn Hoile <mail gnome org cefn com> wrote:
>> On 29 May 2012 10:44, Jens Georg <mail jensge org> wrote:
>>> On Mo, 2012-05-28 at 22:56 +0100, Cefn Hoile wrote:
>>>> Once I've installed all the debugging packages you mentioned, the
>>>> Segfault stops arising.
>>>
>>> That means you managed to install the gst-plugins-base libraries without
>>> installing the base plugins. Looks like some packaging dependendy
>>> problems.
>>>
>>>>
>>>> I was now able to see more meaningful errors when trying to attach to
>>>> the wav stream, which were associated with missing packages - needed
>>>> gstreamer0.10-pulseaudio to give me pulsesrc and
>>>> gstreamer0.10-plugins-good to give me wavpackenc
>>>
>>> Btw. wavpack is not WAV. wavpack is a lossless but compressing audio
>>> codec, similar to FLAC. WAV "encoding" is done by wavenc.
>>>
>>>>
>>>> I've arrived at this error which I don't know how to handle when
>>>> attaching to the Gstreamer Wave stream using VLC's UPNP browser (which
>>>> detects a stream from Rygel at my local
>>>> http://192.168.1.128:57845/GstLaunch/i/bXlwdWxzZWF1ZGlvc2luaw%3D%3D.wav
>>>> )
>>>>
>>>> (rygel:3140): Rygel-WARNING **: rygel-http-request.vala:97: Invalid seek request
>>>
>>> This is a known bug we need to address at some point; unfortunately this
>>> is a bit tricky (https://bugzilla.gnome.org/show_bug.cgi?id=659432 or
>>> https://bugzilla.gnome.org/show_bug.cgi?id=674736) It's ok with VLC as
>>> it does the right thing (retry without seeking).
>>>
>>>> (rygel:3140): Rygel-CRITICAL **: Error from pipeline
>>>> RygelHTTPGstResponse: pulsesrc.c(1480): gst_pulsesrc_prepare ():
>>>> /GstPipeline:RygelHTTPGstResponse/GstBin:bin0/GstPulseSrc:pulsesrc0
>>>
>>> Are you sure that the headphone thing is the correct pulse source?
>>>
>>> I've got something like
>>>
>>> mypulseaudiosink-title=Audio on @HOSTNAME@
>>> mypulseaudiosink-mime=audio/L16;rate=44100;channels=2
>>> mypulseaudiosink-launch=pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
>>>
>>> in my rygel.conf
>>>
>>>
>>
>> I'm still surprised it's a segfault, rather than a more elegantly
>> handled error, but glad I'm not experiencing it anymore.
>>
>> I've duplicated your suggested lines, in the hope that this would
>> relay the wave data from the soundcard without reencoding. I replaced
>> the alsa device name with the first device name which shows up when I
>> run
>>
>> pacmd list-sources
>>
>> ...as the mpd user, the name of this device being...
>>
>> alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-stereo.monitor
>>
>> Inspecting the soundcard through Alsa tools suggests that the hardware
>> shows up as...
>> mpd@gardner:/root$ cat /proc/asound/card0/pcm0p/sub0/hw_params
>> access: MMAP_INTERLEAVED
>> format: S16_LE
>> subformat: STD
>> channels: 2
>> rate: 44100 (44100/1)
>> period_size: 44100
>> buffer_size: 88200
>> ...so I'm guessing the mime type information matches with the
>> declaration you provided too.
>>
>> Having launched rygel (logged in as the mpd user) and when trying to
>> stream using VLC on my desktop from the detected endpoint (which
>> appears correctly), rygel reports the sync error as normal when the
>> stream starts but doesn't report a critical Gstreamer error, so I
>> guess it's doing something. In all the incorrect configurations so
>> far, the stream died immediately, so this is something like progress.
>>
>> However, I get VLC reporting 00:00 seconds in the stream and no sound
>> audible. Are you able to stream audible sound to VLC using the
>> configuration you shared with me?
>>
>> Thanks for all your help. I would have given up long ago without
>> confident guidance on this. I've attached my current rygel
>> configuration and the pacmd report on my devices in case anything
>> leaps out which needs to be differently configured.
>>
>> Cefn
>> http://cefn.com
>
> On further investigation I had some concerns that pulseaudio might not
> be in use by MPD, (and I'm still not sure it is) but running...
> cat /dev/urandom | pacat -d
> "alsa_output.usb-0d8c_C-Media_USB_Headphone_Set-00-Set.analog-stereo"
> ...generates noise from the speakers, without any noise appearing via
> the rygel-served stream, which remains at 00:00.
>
> I think this proves that Pulseaudio is indeed in use, and I'd expect
> noise via rygel in VLC, but instead it's silent. Hopefully this is a
> better test case to pursue.
>
> Cefn
> http://cefn.com

Finally I have success. The following command line proves that there's
an issue with VLC, since the following direct request to the
introspected UPnP-published stream...

curl http://192.168.1.128:36483/GstLaunch/i/bXlwdWxzZWF1ZGlvc2luaw%3D%3D
| pacat -p

...plays audio fine with no breaks, though a big delay. In VLC the
same stream apparently plays, but stalls at 00:00 and no audio comes
out.

I'll investigate other UPnP client options, or figure out a mime type
configuration which media clients will accept in order to decode this
format. This direct call to Pulseaudio is not a bad way to use Rygel
actually, although I was hoping for family and other home network
users to be able to do UPnP browsing through some kind of nice
interface, like VLC or Rhythmbox, perhaps I can just write a simple
GUI to connect desktops/etc to various systems around the house using
curl and pacat, assuming I can figure out how to get the corresponding
HTTP URLs for each source via some kind of UPnP library. Suggestions
for a simple (console?) tool to query available UPnP trees to find the
"Gst Launch" node?

I might be able to use this for audio connectivity from microphones
too, now I've figured it out, save buying a new baby alarm! Can I get
any control through Rygel to minimise buffering and hence reduce audio
delay?

Congratulations on the release!


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