Commit 157bf6fe authored by Moe's avatar Moe 😎

Teenage Turtle

parent a80c1e4e
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -23,6 +23,7 @@
"pluginKeys":{
"Motion":"change_this_to_something_very_random____make_sure_to_match__/plugins/motion/conf.json",
"OpenCV":"change_this_to_something_very_random____make_sure_to_match__/plugins/opencv/conf.json",
"OpenALPR":"SomeOpenALPRkeySoPeopleDontMessWithYourShinobi"
"OpenALPR":"SomeOpenALPRkeySoPeopleDontMessWithYourShinobi",
"PythonYolo":"SomeOpenALPRkeySoPeopleDontMessWithYourShinobi"
}
}
\ No newline at end of file
......@@ -248,11 +248,15 @@
"info": [
{
"name": "detail=stream_type",
"field": "Stream Type",
"field": "Stream Type",
"description": "The method that will used to consume the video stream.",
"default": "HLS",
"example": "",
"possible": [
{
"name": "Poseidon",
"info": "Simulates a streaming MP4 file but using the data of a live stream. Includes Audio. Some browsers can play it like a regular MP4 file. Streams over HTTP or WebSocket."
},
{
"name": "MJPEG",
"info": "Standard Motion JPEG image. No audio."
......
......@@ -114,6 +114,10 @@
"Saved Filters": "Saved Filters",
"Filter Name": "Filter Name",
"Find Where": "Find Where",
"Reason": "Reason",
"Detection Engine": "Detection Engine",
"X Point": "X Point",
"Y Point": "Y Point",
"Sort By": "Sort By",
"Start Time": "Start Time",
"End Time": "End Time",
......@@ -128,6 +132,10 @@
"Greater Than": "Greater Than",
"Less Than": "Less Than",
"Less Than or Equal to": "Less Than or Equal to",
"Contains": "Contains",
"Does Not Contain": "Does Not Contain",
"AND": "AND",
"OR": "OR",
"Like": "Like",
"Matches": "Matches",
"Not Matches": "Not Matches",
......@@ -293,6 +301,8 @@
"Recording Timestamp": "Recording Timestamp",
"Recording Watermark": "Recording Watermark",
"Region Editor": "Region Editor",
"Detector Filters": "Detector Filters",
"Filter for Objects only": "Filter for Objects only",
"Custom": "Custom",
"Detector": "Detector",
"Connected": "Connected",
......@@ -380,6 +390,7 @@
"Recording Flags": "Recording Flags",
"Output Method": "Output Method",
"Webhook": "Webhook",
"Event Webhook Error": "Event Webhook Error",
"Webhook URL": "Webhook URL",
"Command on Trigger": "Command on Trigger",
"Command": "Command",
......@@ -388,6 +399,7 @@
"Save Events to SQL": "Save Events to SQL",
"Email on Trigger": "Email on Trigger <small>Emails go to the main account holder's login address.</small>",
"Attach Video Clip": "Attach Video Clip",
"Discord": "Discord",
"Discord Alert on Trigger": "Discord Alert on Trigger",
"Allow Next Email": "Allow Next Email <small>in Minutes</small>",
"Allow Next Discord Alert": "Allow Next Discord Alert <small>in Minutes</small>",
......@@ -459,6 +471,7 @@
"Audio": "Audio",
"Mute Audio": "Mute Audio",
"No Audio": "No Audio",
"Popout Monitor on Event": "Popout Monitor on Event",
"aac": "aac",
"ac3": "ac3",
"libmp3lame": "libmp3lame",
......@@ -473,6 +486,7 @@
"Bottom Left": "Bottom Left",
"WebM (libvpx)": "WebM (libvpx)",
"Poseidon": "Poseidon",
"HEVC (H.265)": "HEVC (H.265)",
"MP4 (copy, libx264, libx265)": "MP4 (copy, libx264, libx265)",
"Default": "Default",
"libvpx (Default)": "libvpx (Default)",
......@@ -517,8 +531,10 @@
"No Videos Found": "No Videos Found",
"FileNotExistText": "Cannot save non existant file. Something went wrong.",
"CameraNotRecordingText": "Settings may be incompatible. Check encoders. Restarting...",
"Camera is not running": "Camera is not running",
"Camera is not recording": "Camera is not recording",
"Camera is not streaming": "Camera is not streaming",
"Process Started": "Process Started",
"Restarting Process": "Restarting Process",
"Restarting": "Restarting",
"Starting": "Starting",
......@@ -660,6 +676,10 @@
"hevc_qsv": "H.265 (Quick Sync Video)",
"vp8_qsv": "VP8 (Quick Sync Video)",
"mpeg2_qsv": "MPEG2 (Quick Sync Video)",
"h264_mmal": "H.264 (Raspberry Pi)",
"mpeg2_mmal": "MPEG-2 (Raspberry Pi)",
"mpeg4_mmal": "MPEG-4 (Raspberry Pi)",
"h264_omx": "H.264 openMAX (Raspberry Pi)",
"h264_vaapi": "H.264 VA-API (Intel HW Accel)",
"h264_nvenc": "H.264 NVENC (NVIDIA HW Accel)",
"hevc_nvenc": "H.265 NVENC (NVIDIA HW Accel)",
......
......@@ -610,6 +610,10 @@
"h264_nvenc": "H. 264 NVENC (NVIDIA HW Accel)",
"h264_qsv": "H. 264 (Quick Sync Video)",
"h264_vaapi": "H. 264 VA-API (Intel HW Accel)",
"h264_mmal": "H.264 (Raspberry Pi)",
"mpeg2_mmal": "MPEG-2 (Raspberry Pi)",
"mpeg4_mmal": "MPEG-4 (Raspberry Pi)",
"h264_omx": "H.264 openMAX (Raspberry Pi)",
"hevc_cuvid": "H. 265 CUVID",
"hevc_nvenc": "H. 265 NVENC (NVIDIA HW Accel)",
"hevc_qsv": "H. 265 (Quick Sync Video)",
......
......@@ -287,6 +287,7 @@ form.modal-body{margin:0}
.dropdown-menu.scrollable{max-height:300px}
.upload_file input{display:none}
#video_preview .stream-objects{right:0;margin:auto;display:inline-block;position:relative;width:auto}
.stream-block,.stream-objects{overflow: hidden!important}
.stream-objects{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}
.stream-objects .tag{position:absolute;bottom:100%;left:0;background:red;color:#fff;font-family:monospace;font-size:80%;border-radius:5px 5px 0 0 ;padding:3px 5px;}
.stream-objects .stream-detected-object{position:absolute;top:0;left:0;border:3px solid red;background:transparent;border-radius:5px}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -24,6 +24,33 @@
</label>
</div>
</div>
<div class="form-group-group grey">
<h4><%-lang['2-Factor Authentication']%></h4>
<div class="form-group">
<label><div><span><%-lang['Enabled']%></span></div>
<div><select class="form-control" detail="factorAuth">
<option value="0" selected><%-lang.No%></option>
<option value="1"><%-lang.Yes%></option>
</select></div>
</label>
</div>
<div class="form-group">
<label><div><span><%-lang.Email%></span></div>
<div><select class="form-control" detail="factor_mail">
<option value="1" selected><%-lang.Yes%></option>
<option value="0"><%-lang.No%></option>
</select></div>
</label>
</div>
<div class="form-group u_discord_bot_input u_discord_bot_1">
<label><div><span><%-lang.Discord%></span></div>
<div><select class="form-control" detail="factor_discord">
<option value="0" selected><%-lang.No%></option>
<option value="1"><%-lang.Yes%></option>
</select></div>
</label>
</div>
</div>
<div class="form-group-group grey">
<h4><%-lang.Profile%></h4>
<div class="form-group">
......@@ -41,14 +68,6 @@
<div><input class="form-control" type="password" name="password_again"></div>
</label>
</div>
<div class="form-group">
<label><div><span><%-lang['2-Factor Authentication']%> (<%-lang.Email%>)</span></div>
<div><select class="form-control" detail="factorAuth">
<option value="0" selected><%-lang.No%></option>
<option value="1"><%-lang.Yes%></option>
</select></div>
</label>
</div>
<% if(!details.sub){ %>
<% if(details.edit_size!=='0'){ %>
<div class="form-group">
......@@ -116,11 +135,19 @@
</div>
</label>
</div>
<div class="form-group">
<label><div><span><%-lang['Alert Sound Delay']%></span></div>
<div><input class="form-control" detail="audio_delay" placeholder="1"></div>
</label>
</div>
<div class="form-group">
<label><div><span><%-lang['Alert Sound Delay']%></span></div>
<div><input class="form-control" detail="audio_delay" placeholder="1"></div>
</label>
</div>
<div class="form-group">
<label><div><span><%-lang['Popout Monitor on Event']%></span></div>
<div><select class="form-control" detail="event_mon_pop">
<option value="0" selected><%-lang.No%></option>
<option value="1"><%-lang.Yes%></option>
</select></div>
</label>
</div>
</div>
<% if(!details.sub){ %>
<div class="form-group-group blue">
......
......@@ -20,6 +20,7 @@ if(data.url.charAt(data.url.length - 1) !== '/'){
<script src="<%=data.url%>libs/js/poseidon.js"></script>
<script src="<%=data.url%>libs/js/hls.min.js"></script>
<script src="<%=data.url%>libs/js/flv.min.js"></script>
<script src="<%=data.url%>libs/js/libde265.min.js"></script>
<% if(data.addon){
var ar={}
decodeURI(data.addon).split('|').forEach(function(v){
......@@ -133,7 +134,7 @@ $(document).ready(function(){
})
</script>
<div class="shinobi_stream" id="<%= data.name %>">
<% switch(mon.details.stream_type){
case'jpeg':
%><img class="stream-element"><%
......@@ -148,8 +149,8 @@ $(document).ready(function(){
%><canvas class="stream-element"></canvas><%
break;
} %>
<% if(data.addon&&data.addon.indexOf('gui')>-1){ %>
<div class="shinobi_hud">
<div class="shinobi_viewers" title="Current number of viewers"></div>
......@@ -170,11 +171,30 @@ $(document).ready(function(){
$.shinobi.mon={}
};
$.shinobi.init=function(d){
if($.shinobi.mon[d.id].Base64 && $.shinobi.mon[d.id].Base64.connected){
$.shinobi.mon[d.id].Base64.disconnect()
}
if($.shinobi.mon[d.id].Poseidon){
$.shinobi.mon[d.id].Poseidon.destroy()
}
if ($.shinobi.mon[d.id].h265Player) {
$.shinobi.mon[d.id].h265Player.stop()
}
if($.shinobi.mon[d.id].h265Socket && $.shinobi.mon[d.id].h265Socket.connected){
$.shinobi.mon[d.id].h265Socket.disconnect()
}
if($.shinobi.mon[d.id].h265HttpStream && $.shinobi.mon[d.id].abort){
$.shinobi.mon[d.id].h265HttpStream.abort()
}
if($.shinobi.mon[d.id].flv){
$.shinobi.mon[d.id].flv.destroy()
}
if($.shinobi.mon[d.id].hls){
$.shinobi.mon[d.id].hls.destroy()
}
clearInterval($.shinobi.mon[d.id].jpegInterval);
switch($.shinobi.mon[d.id].details.stream_type){
case'b64':
if($.shinobi.mon[d.id].Base64 && $.shinobi.mon[d.id].Base64.connected){
$.shinobi.mon[d.id].Base64.disconnect()
}
$.shinobi.mon[d.id].Base64 = io('<%=data.url%>',{transports: ['websocket'], forceNew: false})
var ws = $.shinobi.mon[d.id].Base64
ws.on('diconnect',function(){
......@@ -209,7 +229,7 @@ $(document).ready(function(){
// }
// ctx.getContext("2d").drawImage(image,d.x,d.y,d.width,d.height)
ctx.getContext("2d").drawImage(image,d.x,d.y,ctx.width,ctx.height)
URL.revokeObjectURL($.ccio.mon[d.ke+d.id+user.auth_token].imageUrl)
URL.revokeObjectURL($.shinobi.mon[d.id].imageUrl)
}
ws.on('data',function(imageData){
try{
......@@ -232,9 +252,6 @@ $(document).ready(function(){
case'mp4':
var stream = $('#SHINOBI_'+d.ke+'_'+d.id+' .stream-element');
if($.shinobi.mon[d.id].details.stream_flv_type==='ws'){
if($.shinobi.mon[d.id].Poseidon){
$.shinobi.mon[d.id].Poseidon.destroy()
}
var createPoseidon = function(){
$.shinobi.mon[d.id].Poseidon = new Poseidon({
video: stream[0],
......@@ -261,11 +278,38 @@ $(document).ready(function(){
stream.attr('src','<%=data.url%><%=data.auth%>/mp4/'+d.ke+'/'+d.id+'/s.mp4')
}
break;
case'h265':
var player = $.shinobi.mon[d.id].h265Player
var video = $('#SHINOBI_'+d.ke+'_'+d.id+' .stream-element')[0]
player = new libde265.RawPlayer(video)
player.set_status_callback(function(msg, fps) {
})
player.launch()
if($.shinobi.mon[d.id].details.stream_flv_type==='ws'){
$.shinobi.mon[d.id].h265Socket = io(url,{transports: ['websocket'], forceNew: false})
var ws = $.shinobi.mon[d.id].h265Socket
ws.on('diconnect',function(){
console.log('h265Socket Stream Disconnected')
})
ws.on('connect',function(){
ws.emit('h265',{
auth:'<%=data.auth%>',
ke:d.ke,
uid:'<%=data.uid%>',
id:d.id,
url: '<%=data.url%>'
// channel: channel
})
ws.on('data',function(imageData){
player._handle_onChunk(imageData)
})
})
}else{
$.shinobi.mon[d.id].h265HttpStream = player.createHttpStream('<%=data.url%><%=data.auth%>/h265/'+d.ke+'/'+d.id+'/s.hevc')
}
break;
case'flv':
if (flvjs.isSupported()) {
if($.shinobi.mon[d.id].flv){
$.shinobi.mon[d.id].flv.destroy()
}
var options = {};
// if($.shinobi.mon[d.id].details.stream_flv_type==='ws'){
// if($.shinobi.mon[d.id].details.stream_flv_maxLatency&&$.shinobi.mon[d.id].details.stream_flv_maxLatency!==''){
......@@ -307,9 +351,9 @@ $(document).ready(function(){
k=d.mon.details;
k.jpegInterval=parseFloat(k.jpegInterval);
if(!k.jpegInterval||k.jpegInterval===''||isNaN(k.jpegInterval)){k.jpegInterval=1}
if(!$.shinobi.mon[d.mon.mid].jpegInterval){
clearInterval($.shinobi.mon[d.mon.mid].jpegInterval);
$.shinobi.mon[d.mon.mid].jpegInterval=setInterval(function(){
if(!$.shinobi.mon[d.id].jpegInterval){
clearInterval($.shinobi.mon[d.id].jpegInterval);
$.shinobi.mon[d.id].jpegInterval=setInterval(function(){
$('#SHINOBI_'+d.ke+'_'+d.id+' .stream-element').attr('src','<%=data.url%><%=data.auth%>/jpeg/'+d.mon.ke+'/'+d.mon.mid+'/s.jpg?time='+(new Date()).getTime())
},1000/k.jpegInterval);
}
......@@ -317,9 +361,6 @@ $(document).ready(function(){
case'hls':
var video = $('#SHINOBI_'+d.ke+'_'+d.id+' .stream-element')[0];
d.url='<%=data.url%><%=data.auth%>/hls/'+d.ke+'/'+d.id+'/s.m3u8';
if($.shinobi.mon[d.id].hls){
$.shinobi.mon[d.id].hls.destroy()
}
if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)||(navigator.userAgent.match(/(Safari)/)&&!navigator.userAgent.match('Chrome'))) {
video.src=d.url;
video.play();
......@@ -386,7 +427,7 @@ $(document).ready(function(){
$(window).resize();
// d.mon.details=JSON.stringify(d.mon.details);
d.mon.id = d.mon.mid
$.shinobi.mon[d.mon.mid]=d.mon;
$.shinobi.mon[d.id] = d.mon;
$.shinobi.init(d.mon);
break;
}
......@@ -413,4 +454,4 @@ $(document).ready(function(){
$.shinobi.init(monitor);
})
$('.shinobi_ws_http_toggle').show()
</script>
\ No newline at end of file
</script>
......@@ -163,6 +163,7 @@
<% include blocks/monitoredit.ejs %>
<% include blocks/probe.ejs %>
<% include blocks/region.ejs %>
<% include blocks/detectorfilters.ejs %>
<% include blocks/confirm.ejs %>
<% if(config.DropboxAppKey){ %>
<!--Dropbox Library, Change data-app-key to your app key. -->
......@@ -179,6 +180,7 @@
<script src="<%-originalURL%>libs/js/socket.io.js"></script>
<script src="<%-originalURL%>libs/js/fullcalendar.min.js"></script>
<script src="<%-originalURL%>libs/js/hls.min.js"></script>
<script src="<%-originalURL%>libs/js/libde265.min.js"></script>
<script type="text/javascript" src="<%-originalURL%>libs/js/flv.shinobi.js">;</script>
<script src="<%-originalURL%>libs/js/menu.js"></script>
<script src="<%-originalURL%>libs/js/clock.js"></script>
......@@ -193,4 +195,4 @@
<script src="<%-originalURL%>libs/js/gridstack.min.js"></script>
<script src="<%-originalURL%>libs/js/gridstack.jQueryUI.min.js"></script>
<script><% include ../libs/js/main.dash2.js %></script>
<% include blocks/help.ejs %>
\ No newline at end of file
<% include blocks/help.ejs %>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment