Page 1 of 2

Play Video/Audio stream from console or on tv start

Posted: Tue Apr 12, 2011 9:59 am
by arris69
hi,
played a bit around with messagebox stuff and upnp.
result are some network captures, so it's easy to start video play from shellscript with netcat.
this is just a proof of concept, feel free to implement it in some way.
(see actions and parameters: /mtd_rwarea/dlna_web_root/dmr/AVTransport1.xml)

set the url: (CurrentURI), CurrentURIMetaData, normaly it should provide some information about the media but its' not a "must" but can't be empty.

Code: Select all

POST /upnp/control/AVTransport1 HTTP/1.1
SOAPACTION: urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI
Connection: close
Content-Length: 619
Content-Type: text/xml
Host: 192.168.1.51:52235
User-Agent: HttpSamyGO/1.1

<?xml version='1.0' encoding='UTF-8' standalone='no' ?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID><CurrentURI>http://75.101.165.227:8080/app/iLJy+VD9xyYqv5jtERGBijAeiqUmYWqCFzy4Li6gM0uMzI8pYoRWTxqp+UxEy14ibHGOrLpqJTkjI+WE6Q6lbQ6e2+1X96ToH8lGCv0f4f88M0jxU6S6z4SwC8KOCoMhscRxjOiy4CJVzNNeCGQxpw==.mp4</CurrentURI><CurrentURIMetaData><DIDL-Lite></DIDL-Lite></CurrentURIMetaData></u:SetAVTransportURI></s:Body></s:Envelope>
start playing: InstanceID, Speed.

Code: Select all

POST /upnp/control/AVTransport1 HTTP/1.1
SOAPACTION: urn:schemas-upnp-org:service:AVTransport:1#Play
Connection: close
Content-Length: 321
Content-Type: text/xml
Host: 192.168.1.51:52235
User-Agent: HttpSamyGO/1.1

<?xml version='1.0' encoding='UTF-8' standalone='no' ?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><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>
stop playing: needs just InstanceID.

Code: Select all

POST /upnp/control/AVTransport1 HTTP/1.1
SOAPACTION: urn:schemas-upnp-org:service:AVTransport:1#Stop
Connection: close
Content-Length: 305
Content-Type: text/xml
Host: 192.168.1.51:52235
User-Agent: HttpSamyGO/1.1

<?xml version='1.0' encoding='UTF-8' standalone='no' ?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Stop xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID>0</InstanceID></u:Stop></s:Body></s:Envelope>
happy coding
arris

Re: Play Video/Audio stream from console or on tv start

Posted: Tue Apr 12, 2011 8:30 pm
by erdem_ua
Our TVs could play videos from within SOAP messages? Impressive :)

Re: Play Video/Audio stream from console or on tv start

Posted: Tue Apr 12, 2011 9:13 pm
by juusso
Few months ago here was a request for this kind of hack with award of $200 (or smth like it). Is this offer still active? :D

Re: Play Video/Audio stream from console or on tv start

Posted: Tue Apr 12, 2011 9:50 pm
by erdem_ua
I think it's for C5000 series.

Re: Play Video/Audio stream from console or on tv start

Posted: Wed Apr 13, 2011 8:39 am
by juusso
Yes, might you are right.

Why this hack shouldn`t work on C series TV if we successfully use send messages to TV tool from B series on C Tv`s.
From this point of view i think the invention of arris might work on C series aswell. IMHO.

Re: Play Video/Audio stream from console or on tv start

Posted: Wed Apr 13, 2011 3:42 pm
by arris69
erdem_ua wrote:I think it's for C5000 series.
i did the test on B7020.
it shuld work with any device what supports "upnp-renderer?"

in theory also pause, seek, volume control etc. is supported but think some functions needs extra info about the media in CurrentURIMetaData

hth
arris

Re: Play Video/Audio stream from console or on tv start

Posted: Wed Jul 27, 2011 11:22 pm
by erdem_ua
I was talking about $200 bounty :D

Re: Play Video/Audio stream from console or on tv start

Posted: Wed Sep 07, 2011 9:44 am
by jw1001
Well, your "Content-Length: 532" seems wrong. My editor counts 543, plus 20 bytes for end-of-line characters (CRLF). That would cause message rejection.