mobile CCTV,mobile surveillance,police body worn cameras
标题: RTMP url [打印本页] author: CamillaTang time: 2017-11-30 15:49 标题: RTMP url how to get video preview from cam by RTMP url? How to create a rtmp url?
author: besovideo time: 2017-11-30 15:52
hi, you set up your own smarteye server?
and how about that URL you test that day?
rtmp://188.121.2.252:1935/bvapp/PU_29238465_00_20171128_124236_7623 author: CamillaTang time: 2017-11-30 15:58
yes, client had installed smarteye serverauthor: CamillaTang time: 2017-11-30 16:03
client added a line to java script and when he was starting player in web CMS it show him rtmp urlauthor: CamillaTang time: 2017-11-30 16:05
but he does not know exactly how to create this url manually to get preview from each camauthor: fanghj90 time: 2017-11-30 16:22
hi, Did you change the web cms code?
you want to play video in web CMS? not show rtmp url?author: IBeli time: 2017-11-30 16:41
In the Web Simple, We call the function named 'swOpenEx' to open a SWVideoChanel and preview on a div, So this process include create a rtmp url and preview.
if want to create an url manually please follow steps below
1、 call function named 'swOpenEx' , it has 4 args , callback , div , prototype, media. you should set prototype with string "rtmp" . others follow the document or ack here
2、if callback function be called, it mean rtmp url creatd OK, and you can call function 'swGetUrl' to get it
function testOpenVideo() { var chanel = session.swGetPuChanel('PU_55AA0000', 0); if (chanel) { var result = chanel.swOpenEx({ div: null, //if you set a html div element id here we will preview on the div prototype: 'rtmp', //rtmp > hls // callback: function (options, response) { if(response.emms.code == jSW.RcCode.RC_CODE_S_OK){//if open successfully var rtmpurl = chanel.swGetUrl() alert(rtmpurl ); }document.getElementById('id_GetUrl_Button').disabled = 'false'; } }); if (result != jSW.RcCode.RC_CODE_S_OK) { alert('open error: ' + result); } } else { alert('没有该设备通道'); } } author: CamillaTang time: 2017-11-30 16:43
Yes ,he added one line to web cms code (to java script). because web cms has a flash player which plays rtmp streams,so he added popup to show url that player is currently play. but he need this rtmp to connect cms to external system,so he would be good to know if there is possibility to get directly video preview from cam by rtmp.how to create rtmp urls? author: besovideo time: 2017-11-30 16:45
let me explain,
first a smarteye server with WEB API plugin must be installed and runs up.
then a stream request must be done first manually or by code,
then you may find a RTMP URL based on this session with PU_ID+sessionID+channelNO+yyyymmdd_hhmmss+a random number,
such as you did last time,
rtmp://188.121.2.252:1935/bvapp/PU_29238465_00_20171128_124236_7623
欢迎光临 mobile CCTV,mobile surveillance,police body worn cameras (http://bbs.besovideo.com:8067/)