Sign up here and you can log into the forum!

AVRemote 0.4.1

General homebrew discussion area

Re: AVRemote 0.4.1   

Postby rRGWs6eR » Mon Sep 08, 2014 1:46 am

mad_ady wrote:I haven't used avremote, so I can't help you directly but you could do a packet capture between your phone and TV (assuming you have the ability) to see what DLNA messages get exchanged (they will be XML).

Regarding subtitles, I know that there are some proprietary extensions (for samsung) that encode the subtitle path in a property in the xml, but I'm not sure it is supported by most tools. If the subtitle is embedded into the file (e.g. mkv), then it's all good.


Thanks ady.

I should learn how capturing packets. Wish me luck.
rRGWs6eR
n00b
 
Posts: 3
Joined: Sun Sep 07, 2014 7:42 am

Re: AVRemote 0.4.1   

Postby rRGWs6eR » Tue Sep 09, 2014 12:57 am

Hey, I've got little success using gupnp-av-cp and wireshark. I saw
'SetAVTransportURI' and 'Play' request from captured packets.

Copied and sent to TV using `nc` then TV start playing! How can I do
this with avremote?

Any advice would be welcome.

Thanks.

seturi.req - saved from wireshark

Code: Select all
POST /smp_18_ HTTP/1.1
Host: 192.168.219.6:7676
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#SetAVTransportURI"
Accept-Language: en-us;q=1, en;q=0.5
Accept-Encoding: gzip
Content-Type: text/xml; charset="utf-8"
User-Agent: gupnp-av-cp GUPnP/0.20.12 DLNADOC/1.50
Connection: Keep-Alive
Content-Length: 1405

<?xml version="1.0"?><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://192.168.219.2:8200/MediaItems/157.avi</CurrentURI><CurrentURIMetaData>&lt;DIDL-Lite xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot; xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot; xmlns:dlna=&quot;urn:schemas-dlna-org:metadata-1-0/&quot;&gt;
&lt;item id=&quot;2$15$0$14$0&quot; parentID=&quot;2$15$0$14&quot;
restricted=&quot;1&quot;
refID=&quot;64$0$14$0&quot;&gt;&lt;dc:title&gt;Modern.Family.S04E01.HDTV.XviD-AFG&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.videoItem&lt;/upnp:class&gt;&lt;dc:creator&gt;DiVX&lt;/dc:creator&gt;&lt;dc:date&gt;2014-08-23T15:41:35&lt;/dc:date&gt;&lt;res
size=&quot;178192132&quot; duration=&quot;0:21:05.930&quot;
bitrate=&quot;140759&quot; sampleFrequency=&quot;48000&quot;
nrAudioChannels=&quot;2&quot; resolution=&quot;640x360&quot;
protocolInfo=&quot;http-get:*:video/avi:DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000&quot;&gt;http://192.168.219.2:8200/MediaItems/157.avi&lt;/res&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</CurrentURIMetaData></u:SetAVTransportURI></s:Body></s:Envelope>


play.req

Code: Select all
POST /smp_18_ HTTP/1.1
Host: 192.168.219.6:7676
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Play"
Accept-Language: en-us;q=1, en;q=0.5
Accept-Encoding: gzip
Content-Type: text/xml; charset="utf-8"
User-Agent: gupnp-av-cp GUPnP/0.20.12 DLNADOC/1.50
Connection: Keep-Alive
Content-Length: 287

<?xml version="1.0"?><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>


Code: Select all
$ avremote
Performing upnp discovery...
upnp:rootdevice   http://192.168.219.6:7676/smp_10_   192.168.219.6   7676
upnp:rootdevice   http://192.168.219.6:7676/smp_2_   192.168.219.6   7676
upnp:rootdevice   http://192.168.219.2:8200/rootDesc.xml   192.168.219.2   8200
Please specify a target device host and port.

$ cat seturi.req | nc 192.168.219.6 7676
HTTP/1.1 200 OK
Content-Length: 312
Content-Type: text/xml; charset="utf-8"
EXT:
SERVER: UPnP/1.0
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:SetAVTransportURIResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"></u:SetAVTransportURIResponse>
</s:Body>
</s:Envelope>

$ cat play.req | nc 192.168.219.6 7676
HTTP/1.1 200 OK
Content-Length: 286
Content-Type: text/xml; charset="utf-8"
EXT:
SERVER: UPnP/1.0
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:PlayResponse xmlns:u="urn:schemas-upnp-org:service:AVTransport:1"></u:PlayResponse>
</s:Body>
</s:Envelope>

$
rRGWs6eR
n00b
 
Posts: 3
Joined: Sun Sep 07, 2014 7:42 am

Re: AVRemote 0.4.1   

Postby mad_ady » Tue Sep 09, 2014 1:09 am

Well, I'm not sure how you can use them with avremote (you'd have to look through its code (is it available?) to see what it does), but if you have it working with nc, you could script your own solution... Something like this:
1. Expose your media content through http on the wdtv (e.g. add a link under /tmp/www-plugins to your media xmount) and test a wget on that url (you will also need to disable HTTP authentication in apache (there is a patch that does just that commited last week to svn)).
2. Hack together a basic script with sed cat and nc to modify the XMLs you captured and replace the media items with the items you pass as parameters.
3. Profit :D
User avatar
mad_ady
Developer
 
Posts: 4520
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: AVRemote 0.4.1   

Postby kroetkroet » Fri Jul 17, 2015 12:11 am

Okay! Still not sure if you are a spambot :lol:
WDLXTV-fan! - In case you need further assistance: read our WIKI, search our Forum and most of all: donate 'something' to b-rad for his great efforts!!!
User avatar
kroetkroet
Beta Tester
 
Posts: 1004
Joined: Mon Apr 05, 2010 11:53 pm

Re: AVRemote 0.4.1   

Postby mad_ady » Fri Jul 17, 2015 12:25 am

Either a spam bot, or the noob of the year :)
User avatar
mad_ady
Developer
 
Posts: 4520
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Previous

Return to WDTV G2 & WDTV Live homebrew discussion

Who is online

Users browsing this forum: No registered users and 1 guest