很早前买了个小兴看看Memo,但是它明明支持RTSP功能却通过一些方式加密了播放地址
用Wireshark抓包后可看到请求视频地址的方式
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<pre class="inline:true decode:1 " ><span style="color: #22313f;">GET /common_page/GetVideoURL_lua.lua?codecType=1&_=1532614414122 HTTP/1.1 Accept: application/xml, text/xml, */*; q=0.01 X-Requested-With: XMLHttpRequest Referer: http://192.168.50.21/ Accept-Language: zh-Hans-CN,zh-Hans;q=0.5 Accept-Encoding: gzip, deflate User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko Host: 192.168.50.21 Connection: Keep-Alive Cookie: CurStreamID=1 HTTP/1.1 200 OK Server: Mini web server 1.0 ZTE corp 2005. Accept-Ranges: bytes Connection: close Cache-Control: no-cache,no-store Content-Length: 423 Content-Type: text/html; charset=utf-8 <ajax_response_xml_root><IF_ERRORPARAM>SUCC</IF_ERRORPARAM><IF_ERRORTYPE>SUCC</IF_ERRORTYPE><IF_ERRORSTR>SUCC</IF_ERRORSTR><IF_ERRORID>0</IF_ERRORID><OBJ_GETVIDEOURL_ID><Instance><ParaName>_InstID</ParaName><ParaValue>IGD</ParaValue><ParaName>webURL</ParaName><ParaValue>rtsp://192.168.50.21:554/live/ch00_0?token=vixcufLSMixBQwsC</ParaValue></Instance></OBJ_GETVIDEOURL_ID><codecType>1</co decType></ajax_response_xml_root> </span> |
本地简单利用的话就是构造一个GET请求,然后解析返回的xml即可,这里得到的地址是:
rtsp://192.168.50.21:554/live/ch00_0?token=vixcufLSMixBQwsC
要注意的是这个地址只能播放一次,下次需要重新获取新地址
浏览量: 22