Don´t work with [TV]Samsung LED32
See original GitHub issue$ python --version
Python 3.6.2
$ uname -a
Linux blackbird 4.13.5-1-ARCH #1 SMP PREEMPT Fri Oct 6 09:58:47 CEST 2017 x86_64 GNU/Linux
$ dlnap.py --device tv --play ~/Videos/aviao.mp4 --proxy --log debug
INFO:DlnapDevice:=> New DlnapDevice (ip = 10.0.200.86) initialization..
INFO:DlnapDevice:location: http://10.0.200.86:7676/smp_11_
INFO:DlnapDevice:port: 7676
DEBUG:DlnapDevice:description xml: {'root': [{'specVersion': [{'major': ['1'], 'minor': ['0']}], 'device': [{'deviceType': ['urn:schemas-upnp-org:device:MediaRenderer:1'], 'pnpx:X_compatibleId': ['MS_DigitalMediaDeviceClass_DMR_V001'], 'df:X_deviceCategory': ['Display.TV.LCD Multimedia.DMR'], 'dlna:X_DLNADOC': ['DMR-1.50'], 'friendlyName': ['[TV]Samsung LED32'], 'manufacturer': ['Samsung Electronics'], 'manufacturerURL': ['http://www.samsung.com/sec'], 'modelDescription': ['Samsung TV DMR'], 'modelName': ['UN32J4303'], 'modelNumber': ['AllShare1.0'], 'modelURL': ['http://www.samsung.com/sec'], 'serialNumber': ['20110517DMR'], 'UDN': ['uuid:1017df81-000e-1000-aa9a-b8bbaff0dbce'], 'sec:deviceID': ['CPCHDC2MYPGGE'], 'iconList': [{'icon': [{'mimetype': ['image/jpeg'], 'width': ['48'], 'height': ['48'], 'depth': ['24'], 'url': ['/dmr/icon_SML.jpg']}, {'mimetype': ['image/jpeg'], 'width': ['120'], 'height': ['120'], 'depth': ['24'], 'url': ['/dmr/icon_LRG.jpg']}, {'mimetype': ['image/png'], 'width': ['48'], 'height': ['48'], 'depth': ['24'], 'url': ['/dmr/icon_SML.png']}, {'mimetype': ['image/png'], 'width': ['120'], 'height': ['120'], 'depth': ['24'], 'url': ['/dmr/icon_LRG.png']}]}], 'serviceList': [{'service': [{'serviceType': ['urn:schemas-upnp-org:service:RenderingControl:1'], 'serviceId': ['urn:upnp-org:serviceId:RenderingControl'], 'controlURL': ['/smp_13_'], 'eventSubURL': ['/smp_14_'], 'SCPDURL': ['/smp_12_']}, {'serviceType': ['urn:schemas-upnp-org:service:ConnectionManager:1'], 'serviceId': ['urn:upnp-org:serviceId:ConnectionManager'], 'controlURL': ['/smp_16_'], 'eventSubURL': ['/smp_17_'], 'SCPDURL': ['/smp_15_']}, {'serviceType': ['urn:schemas-upnp-org:service:AVTransport:1'], 'serviceId': ['urn:upnp-org:serviceId:AVTransport'], 'controlURL': ['/smp_19_'], 'eventSubURL': ['/smp_20_'], 'SCPDURL': ['/smp_18_']}]}], 'sec:ProductCap': ['Y2014,WebURIPlayable,SeekTRACK_NR,NavigateInPause,ScreenMirroringP2PMAC=5e:49:7d:b3:1d:2b'], 'pnpx:X_hardwareId': ['VEN_0105&DEV_VD0001']}]}]}
INFO:DlnapDevice:friendlyName: [TV]Samsung LED32
INFO:DlnapDevice:control_url: /smp_19_
INFO:DlnapDevice:rendering_control_url: /smp_13_
INFO:DlnapDevice:=> Initialization completed
DEBUG:DlnapDevice:POST /smp_19_ HTTP/1.1
User-Agent: /home/mnemonic/bin/dlnap.py/0.15
Accept: */*
Content-Type: text/xml; charset="utf-8"
HOST: 10.0.200.86:7676
Content-Length: 401
SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Stop"
Connection: close
<?xml version="1.0" encoding="utf-8"?>
<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>
DEBUG:DlnapDevice:POST /smp_19_ HTTP/1.1
User-Agent: /home/mnemonic/bin/dlnap.py/0.15
Accept: */*
Content-Type: text/xml; charset="utf-8"
HOST: 10.0.200.86:7676
Content-Length: 532
SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"
Connection: close
<?xml version="1.0" encoding="utf-8"?>
<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>http://10.0.200.24:8000//home/mnemonic/Videos/aviao.mp4</CurrentURI><CurrentURIMetaData></CurrentURIMetaData>
</u:SetAVTransportURI>
</s:Body>
</s:Envelope>
DEBUG:DlnapDevice:POST /smp_19_ HTTP/1.1
User-Agent: /home/mnemonic/bin/dlnap.py/0.15
Accept: */*
Content-Type: text/xml; charset="utf-8"
HOST: 10.0.200.86:7676
Content-Length: 401
SOAPACTION: "urn:schemas-upnp-org:service:AVTransport:1#Play"
Connection: close
<?xml version="1.0" encoding="utf-8"?>
<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>
----------------------------------------
Exception happened during processing of request from ('10.0.200.86', 44253)
Traceback (most recent call last):
File "/usr/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python3.6/socketserver.py", line 348, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python3.6/socketserver.py", line 361, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.6/socketserver.py", line 696, in __init__
self.handle()
File "/usr/lib/python3.6/http/server.py", line 418, in handle
self.handle_one_request()
File "/usr/lib/python3.6/http/server.py", line 406, in handle_one_request
method()
File "/home/mnemonic/bin/dlnap.py", line 295, in do_GET
shutil.copyfileobj(f, self.wfile)
File "/usr/lib/python3.6/shutil.py", line 79, in copyfileobj
buf = fsrc.read(length)
File "/usr/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xee in position 31: invalid continuation byte
----------------------------------------
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
How to troubleshoot the Samsung TV that will not turn on
Ensure that your cable and outlet work properly. First, ensure that all the cabling is firmly inserted. Leave the TV unplugged for 30...
Read more >How to Fix a Samsung TV that Won't Turn On - YouTube
Here are some simple steps to take to fix a Samsung TV that won't turn on. Please take a moment and Subscribe for...
Read more >How to Fix a Samsung TV That Won't Turn On - Alphr
You may need to reset your remote control. Remove the batteries, then press and hold the “Power button” for about eight seconds. After...
Read more >Samsung TV No Sound—What to Do? - Alphr
1. The first things to try are, of course, the simplest ones. If you have a picture on your TV but no sound,...
Read more >Samsung TV Won't Turn On (You Should Try This Fix FIRST)
If your Samsung TV won't turn on you need to reset it. Unplug your TV and wait a full 60 seconds. While the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Finally I was able to figure out the problem, unfortunately the problem is the internal python proxy server that does not seem to work properly. The --proxy option does not work as it should.
I installed apache and set up a URL pointing to it and it worked correctly.
USING APACHE LIKE PROXY WORKED:
I also maybe noticed a bug in the script, when using a local URL the address sometimes goes wrong with // between the URLs
For example, using the command:
It will cause a CurrentURI:
Note that the address is // inserted, i don´t know if it is a bug in the script.
About the python internal proxy error, i googled the error and found somethings, maybe it help you to fix the bug:
https://stackoverflow.com/questions/5525915/python-socketserver-error-upon-connection https://stackoverflow.com/questions/12019189/python-socket-server-error https://stackoverflow.com/questions/28779942/python-http-server-giving-error-when-connected-to https://github.com/Steveice10/FBI/issues/318
I am not a python developer, but i think the proxy implementation in the script have a bug.
I hope you can fix it because this script is very nice.
Thank you in advance.
I wonder if this reproducible with python 3.4 and/or with other video file?