Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Stephan69 opened this issue Jan 29, 2022 · 5 comments

Comments

@Stephan69
Copy link

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

     <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
           <u:Stop xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
              <InstanceID>0</InstanceID><Speed>1</Speed>
           </u:Stop>
        </s:Body>
     </s:Envelope>

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

     <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
           <u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
              <InstanceID>0</InstanceID><CurrentURI>/home/pi/Downloads/frankie.mp3</CurrentURI><CurrentURIMetaData></CurrentURIMetaData>
           </u:SetAVTransportURI>
        </s:Body>
     </s:Envelope>

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

     <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        <s:Body>
           <u:Play xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
              <InstanceID>0</InstanceID><Speed>1</Speed>
           </u:Play>
        </s:Body>
     </s:Envelope>

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
Copy link
Author

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

@Stephan69
Copy link
Author

/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
Copy link
Contributor

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

@Stephan69
Copy link
Author

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants