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
848 stars 205 forks source link

ERROR:root:Playing failed from dlna.py github project from https://github.com/cherezov/dlnap/blob/master/dlnap/dlnap.py #245

Open Stephan69 opened 2 years ago

Stephan69 commented 2 years ago

pi@seeedberry-ko97:~/projects/dlnap/dlnap $ sudo python dlnap.py --ip 192.168.178.209 --play ~/Downloads/frankie.mp3 --log debug INFO:DlnapDevice:=> New DlnapDevice (ip = 192.168.178.209) initialization.. /home/pi/projects/dlnap/dlnap/dlnap.py:381: DeprecationWarning: Flags not at the start of the expression '\n(?i)location:\s(.' (truncated) t = re.findall('\n(?i)location:\s(.)\r\s', raw, re.M) INFO:DlnapDevice:location: http://192.168.178.209:49494/description.xml INFO:DlnapDevice:port: 49494 DEBUG:DlnapDevice:description xml: {'root': [{'specVersion': [{'major': ['1'], 'minor': ['0']}], 'device': [{'deviceType': ['urn:schemas-upnp-org:device:MediaRenderer:1'], 'presentationURL': ['https://www.hifiberry.com'], 'friendlyName': ['HiFiBerry-KO97'], 'manufacturer': ['HiFiBerry'], 'manufacturerURL': ['https://www.hifiberry.com'], 'modelDescription': ['HiFiBerry audio player'], 'modelName': ['HiFiBerryOS'], 'modelNumber': ['0.0.8'], 'modelURL': ['https://www.hifiberry.com'], 'UDN': ['uuid:0a2c6730-1b25-49aa-8598-8215ecdd83f8'], 'iconList': [{'icon': [{'mimetype': ['image/png'], 'width': ['64'], 'height': ['64'], 'depth': ['24'], 'url': ['/upnp/grender-64x64.png']}, {'mimetype': ['image/png'], 'width': ['128'], 'height': ['128'], 'depth': ['24'], 'url': ['/upnp/grender-128x128.png']}]}], 'serviceList': [{'service': [{'serviceType': ['urn:schemas-upnp-org:service:AVTransport:1'], 'serviceId': ['urn:upnp-org:serviceId:AVTransport'], 'SCPDURL': ['/upnp/rendertransportSCPD.xml'], 'controlURL': ['/upnp/control/rendertransport1'], 'eventSubURL': ['/upnp/event/rendertransport1']}, {'serviceType': ['urn:schemas-upnp-org:service:ConnectionManager:1'], 'serviceId': ['urn:upnp-org:serviceId:ConnectionManager'], 'SCPDURL': ['/upnp/renderconnmgrSCPD.xml'], 'controlURL': ['/upnp/control/renderconnmgr1'], 'eventSubURL': ['/upnp/event/renderconnmgr1']}, {'serviceType': ['urn:schemas-upnp-org:service:RenderingControl:1'], 'serviceId': ['urn:upnp-org:serviceId:RenderingControl'], 'SCPDURL': ['/upnp/rendercontrolSCPD.xml'], 'controlURL': ['/upnp/control/rendercontrol1'], 'eventSubURL': ['/upnp/event/rendercontrol1']}]}]}], 'URLBase': ['http://192.168.178.209:49494/']}]} INFO:DlnapDevice:friendlyName: HiFiBerry-KO97 INFO:DlnapDevice:control_url: /upnp/control/rendertransport1 INFO:DlnapDevice:rendering_control_url: /upnp/control/rendercontrol1 INFO:DlnapDevice:=> Initialization completed HiFiBerry-KO97 @ 192.168.178.209 DEBUG:DlnapDevice:POST /upnp/control/rendertransport1 HTTP/1.1 User-Agent: /home/pi/projects/dlnap/dlnap/dlnap.py/0.15 Accept: /* Content-Type: text/xml; charset="utf-8" HOST: 192.168.178.209:49494 Content-Length: 401 SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Stop" Connection: Close

<?xml version="1.0" encoding="utf-8"?>

01 ERROR:root:{'s:Envelope': [{'s:Body': [{'u:StopResponse': []}]}]} DEBUG:DlnapDevice:POST /upnp/control/rendertransport1 HTTP/1.1 User-Agent: /home/pi/projects/dlnap/dlnap/dlnap.py/0.15 Accept: */* Content-Type: text/xml; charset="utf-8" HOST: 192.168.178.209:49494 Content-Length: 507 SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI" Connection: Close 0/home/pi/Downloads/frankie.mp3 ERROR:root:{} DEBUG:DlnapDevice:POST /upnp/control/rendertransport1 HTTP/1.1 User-Agent: /home/pi/projects/dlnap/dlnap/dlnap.py/0.15 Accept: */* Content-Type: text/xml; charset="utf-8" HOST: 192.168.178.209:49494 Content-Length: 401 SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Play" Connection: Close 01 ERROR:root:{'s:Envelope': [{'s:Body': [{'s:Fault': [{'faultcode': ['s:Client'], 'faultstring': ['UPnPError'], 'detail': [{'UPnPError': [{'errorCode': ['501'], 'errorDescription': ['Playing failed']}]}]}]}]}]} ERROR:root:Playing failed
Stephan69 commented 2 years ago

works fine from BubbleUpNp on android with mp3 however....any ideas?

Stephan69 commented 2 years ago

/bin/gmediarender

gmediarender 0.0.8 started [ gmediarender 0.0.8 (libupnp-1.14.6; glib-2.66.8; gstreamer-1.18.4) ]. Logging switched off. Enable with --logfile= (or --logfile=stdout for console) Ready for rendering. ERROR [2022-01-29 22:30:58.482077 | gstreamer] uridecodebin0: Error: Invalid URI "/root/frankie.mp3". (Debug: ../gst/playback/gsturidecodebin.c(1423): gen_source_element (): /GstPlayBin:play/GstURIDecodeBin:uridecodebin0) ERROR [2022-01-29 22:30:58.482970 | gstreamer] setting play state failed (2) ERROR [2022-01-29 22:30:58.484438 | upnp] upnp_set_error: Playing failed (704)

mill1000 commented 2 years ago

Looks like you need the --proxy option to dlnap.py when playing local files.

Stephan69 commented 2 years ago

Looks like you need the --proxy option to dlnap.py when playing local files.

I will give it a try... But the problem also occurs when on the same host for dlna.py and gmedia process

mill1000 commented 2 years ago

It will still likely be needed. As the log says /root/frankie.mp3 is not a valid URI. To play local files gstreamer's playbin requires a URI like file:///root/frankie.mp3. But I doubt dlnap.py will send that because it probably assumes the renderer and itself are on different systems.