hzeller / gmrender-resurrect

Resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer. Fork of GMediaRenderer to add some features to make it usable.
GNU General Public License v2.0
834 stars 202 forks source link

HTTP streaming not working when running as root #63

Open fl4p opened 10 years ago

fl4p commented 10 years ago

Hi all,

running gmediarender without root permissions works just fine.

However I need to run it with root permissions since I am using jackaudiosink for audio playback, and connecting to the jack server requires root permissions on this system.

As soon as I run "sudo gmediarender" the following errors appear on the console when starting to play an MP3 file:

ERROR [2014-06-03 23:14:29.612813 | gstreamer] uridecodebin1: Error: No URI handler implemented for "http". (Debug: gsturidecodebin.c(1285): gen_source_element (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin1)
ERROR [2014-06-03 23:14:29.616396 | gstreamer] setting play state failed (2)
ERROR [2014-06-03 23:14:29.618992 | upnp] upnp_set_error: Playing failed
ERROR [2014-06-03 23:14:30.668587 | gstreamer] uridecodebin1: Error: No URI handler implemented for "http". (Debug: gsturidecodebin.c(1285): gen_source_element (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin1)
ERROR [2014-06-03 23:14:30.672818 | gstreamer] setting play state failed (2)
ERROR [2014-06-03 23:14:30.675738 | upnp] upnp_set_error: Playing failed

Any ideas how to configure the HTTP handler for the root account? I already reinstalled the good-plugins package, without any success.

Regards Fabian

nivw commented 6 years ago

seems you need you pi user to be in the groups pulse AND pulse-access. To do this:

$ sudo gpassword -a pi pulse $ sudo gpassword -a pi pulse-access

But now I get this error:

gmediarender 0.0.7-git started [ gmediarender 2017-09-09_fa3baff (libupnp-1.6.19+git20160116; glib-2.50.3; gstreamer-0.10.36) ]. Logging switched off. Enable with --logfile= (e.g. --logfile=/dev/stdout for console) Ready for rendering. ERROR [2017-09-21 19:45:51.894807 | gstreamer] playsink2: Error: Configured audiosink sink is not working. (Debug: gstplaysink.c(1899): gen_audio_chain (): /GstPlayBin2:play/GstPlaySink:playsink2) ERROR [2017-09-21 19:45:51.900532 | gstreamer] source: Error: Internal data flow error. (Debug: gstbasesrc.c(2625): gst_base_src_loop (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin1/GstSoupHTTPSrc:source: streaming task paused, reason not-linked (-1)) ERROR [2017-09-21 19:48:38.353299 | gstreamer] play: Error: No URI set (Debug: gstplaybin2.c(3824): setup_next_source (): /GstPlayBin2:play) ERROR [2017-09-21 19:48:38.353878 | upnp] upnp_set_error: Pause failed ERROR [2017-09-21 19:48:52.286084 | gstreamer] decodebin21: Error: Your GStreamer installation is missing a plug-in. (Debug: gstdecodebin2.c(3576): gst_decode_bin_expose (): /GstPlayBin2:play/GstURIDecodeBin:uridecodebin1/GstDecodeBin2:decodebin21: no suitable plugins found)

And to solve that I had to install this: $ sudo apt-get install gstreamer0.10-plugins-ugly

I am also using the common pulseaudio, so I had to change the init script to use this option: --gstout-audiosink=autoaudiosink

And now it works I will commit these fixes soon