Added some missing capabilities to SRT

Attempted to fix SRT push & embed links.
Push works, embed needs help

Changed capa to say UDP port as it is binding UDP

added methods to dtsc for output. added webrtc whip as input push url

added url_rel to DTSC

added "/" to the always_match and source_match for SDP and playlist to match with other protocols

updated Playlist to have source/always_match as array.
Noticed "variables_match" which is unused, what to do with it?

fix typo in -h controller text
This commit is contained in:
Balder 2023-10-19 14:00:50 +02:00 committed by Thulinma
parent d040421df9
commit ec757f48e9
8 changed files with 57 additions and 16 deletions

View file

@ -144,24 +144,24 @@ c.append(h);h.stupidtable();var m=function(){var a=[],b;for(b in mist.data.activ
"undefined"){var f=mist.data.totals[c].all_protocols.clients,w=0;if(f.length){for(a in f)w=w+f[a][1];w=Math.round(w/f.length)}}g.html(UI.format.number(w));if(w==0&&e.online==1)e.online=2;w=$("<td>").css("text-align","right").css("white-space","nowrap");(!("ischild"in e)||!e.ischild)&&w.html($("<button>").text("Settings").click(function(){UI.navto("Edit",$(this).closest("tr").data("index"))})).append($("<button>").text("Delete").click(function(){var a=$(this).closest("tr").data("index");if(confirm('Are you sure you want to delete the stream "'+ "undefined"){var f=mist.data.totals[c].all_protocols.clients,w=0;if(f.length){for(a in f)w=w+f[a][1];w=Math.round(w/f.length)}}g.html(UI.format.number(w));if(w==0&&e.online==1)e.online=2;w=$("<td>").css("text-align","right").css("white-space","nowrap");(!("ischild"in e)||!e.ischild)&&w.html($("<button>").text("Settings").click(function(){UI.navto("Edit",$(this).closest("tr").data("index"))})).append($("<button>").text("Delete").click(function(){var a=$(this).closest("tr").data("index");if(confirm('Are you sure you want to delete the stream "'+
a+'"?')){delete mist.data.streams[a];var b={};mist.data.LTS?b.deletestream=[a]:b.streams=mist.data.streams;mist.send(function(){UI.navto("Streams")},b)}}));f=$("<span>").text(e.name);e.ischild&&f.css("padding-left","1em");var h=UI.format.status(e),i=$("<button>").text("Preview").click(function(){UI.navto("Preview",$(this).closest("tr").data("index"))}),q=$("<button>").text("Embed").click(function(){UI.navto("Embed",$(this).closest("tr").data("index"))});if("filesfound"in C[c]||e.online<0){h.html(""); a+'"?')){delete mist.data.streams[a];var b={};mist.data.LTS?b.deletestream=[a]:b.streams=mist.data.streams;mist.send(function(){UI.navto("Streams")},b)}}));f=$("<span>").text(e.name);e.ischild&&f.css("padding-left","1em");var h=UI.format.status(e),i=$("<button>").text("Preview").click(function(){UI.navto("Preview",$(this).closest("tr").data("index"))}),q=$("<button>").text("Embed").click(function(){UI.navto("Embed",$(this).closest("tr").data("index"))});if("filesfound"in C[c]||e.online<0){h.html("");
i="";g.html("");q=""}j.append($("<tr>").data("index",c).html($("<td>").html(f).attr("title",e.name=="..."?"The results were truncated":e.name).addClass("overflow_ellipsis")).append($("<td>").text(e.source).attr("title",e.source).addClass("description").addClass("overflow_ellipsis").css("max-width","20em")).append($("<td>").data("sort-value",e.online).html(h)).append(g).append($("<td>").css("white-space","nowrap").html(i).append(q)).append(w));a++}},{totals:a,active_streams:true})};if(mist.data.LTS){var r= i="";g.html("");q=""}j.append($("<tr>").data("index",c).html($("<td>").html(f).attr("title",e.name=="..."?"The results were truncated":e.name).addClass("overflow_ellipsis")).append($("<td>").text(e.source).attr("title",e.source).addClass("description").addClass("overflow_ellipsis").css("max-width","20em")).append($("<td>").data("sort-value",e.online).html(h)).append(g).append($("<td>").css("white-space","nowrap").html(i).append(q)).append(w));a++}},{totals:a,active_streams:true})};if(mist.data.LTS){var r=
0,Ma=0;for(f in mist.data.streams){h=mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"];if(!h)break;if(mist.inputMatch(h.source_match,mist.data.streams[f].source)){C[f].source=C[f].source+"*";C[f].filesfound=null;mist.send(function(a,b){var c=b.stream,d=0,e;a:for(e in a.browse.files){var g;for(g in mist.data.capabilities.inputs)if(!(g.indexOf("Buffer")>=0||g.indexOf("Buffer.exe")>=0||g.indexOf("Folder")>=0||g.indexOf("Folder.exe")>=0)&&mist.inputMatch(mist.data.capabilities.inputs[g].source_match, 0,Ma=0;for(f in mist.data.streams){h=mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"];if(!h)break;if(mist.inputMatch(h.source_match,mist.data.streams[f].source)){C[f].source=C[f].source+"*";C[f].filesfound=null;mist.send(function(a,b){var c=b.stream,d=0,e;a:for(e in a.browse.files){var w;for(w in mist.data.capabilities.inputs)if(!(w.indexOf("Buffer")>=0||w.indexOf("Buffer.exe")>=0||w.indexOf("Folder")>=0||w.indexOf("Folder.exe")>=0)&&mist.inputMatch(mist.data.capabilities.inputs[w].source_match,
"/"+a.browse.files[e])){var w=c+"+"+a.browse.files[e];C[w]=oa(w,mist.data.streams[c]);C[w].source=mist.data.streams[c].source+a.browse.files[e];d++;if(d>=500){C[c+"+zzzzzzzzz"]={ischild:true,name:"...",online:-1};break a}}}"files"in a.browse&&a.browse.files.length?C[c].filesfound=true:mist.data.streams[c].filesfound=false;Ma++;if(r==Ma){mist.send(function(){m()},{active_streams:true});UI.interval.set(function(){m()},5E3)}},{browse:mist.data.streams[f].source},{stream:f});r++}}if(r==0){mist.send(function(){m()}, "/"+a.browse.files[e])){var g=c+"+"+a.browse.files[e];C[g]=oa(g,mist.data.streams[c]);C[g].source=mist.data.streams[c].source+a.browse.files[e];d++;if(d>=500){C[c+"+zzzzzzzzz"]={ischild:true,name:"...",online:-1};break a}}}"files"in a.browse&&a.browse.files.length?C[c].filesfound=true:mist.data.streams[c].filesfound=false;Ma++;if(r==Ma){mist.send(function(){m()},{active_streams:true});UI.interval.set(function(){m()},5E3)}},{browse:mist.data.streams[f].source},{stream:f});r++}}if(r==0){mist.send(function(){m()},
{active_streams:true});UI.interval.set(function(){m()},5E3)}}else{mist.send(function(){m()},{active_streams:true});UI.interval.set(function(){m()},5E3)}}};if(mist.data.LTS){var qa=0,Na=0,u={},Oa=[];for(g in mist.data.streams)if(mist.inputMatch((mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"]).source_match,mist.data.streams[g].source))Oa.push(g),mist.send(function(a,c){var d=c.stream,e=0,g;a:for(g in a.browse.files){var f;for(f in mist.data.capabilities.inputs)if(!(f.indexOf("Buffer")>= {active_streams:true});UI.interval.set(function(){m()},5E3)}}else{mist.send(function(){m()},{active_streams:true});UI.interval.set(function(){m()},5E3)}}};if(mist.data.LTS){var qa=0,Na=0,u={},Oa=[];for(g in mist.data.streams)if(mist.inputMatch((mist.data.capabilities.inputs.Folder||mist.data.capabilities.inputs["Folder.exe"]).source_match,mist.data.streams[g].source))Oa.push(g),mist.send(function(a,c){var d=c.stream,e=0,g;a:for(g in a.browse.files){var f;for(f in mist.data.capabilities.inputs)if(!(f.indexOf("Buffer")>=
0||f.indexOf("Folder")>=0)&&mist.inputMatch(mist.data.capabilities.inputs[f].source_match,"/"+a.browse.files[g])){u[d+"+"+a.browse.files[g]]=true;e++;if(e>=500){u[d+"+zzzzzzzzz"]=true;break a}}}Na++;qa==Na&&mist.send(function(){for(var a in mist.data.active_streams){var c=mist.data.active_streams[a].split("+");if(c.length>1&&c[0]in mist.data.streams){u[mist.data.active_streams[a]]=true;C[mist.data.active_streams[a]]=oa(mist.data.active_streams[a],mist.data.streams[c[0]])}}u=Object.keys(u);u=u.concat(Object.keys(mist.data.streams)); 0||f.indexOf("Folder")>=0)&&mist.inputMatch(mist.data.capabilities.inputs[f].source_match,"/"+a.browse.files[g])){u[d+"+"+a.browse.files[g]]=true;e++;if(e>=500){u[d+"+zzzzzzzzz"]=true;break a}}}Na++;qa==Na&&mist.send(function(){for(var a in mist.data.active_streams){var c=mist.data.active_streams[a].split("+");if(c.length>1&&c[0]in mist.data.streams){u[mist.data.active_streams[a]]=true;C[mist.data.active_streams[a]]=oa(mist.data.active_streams[a],mist.data.streams[c[0]])}}u=Object.keys(u);u=u.concat(Object.keys(mist.data.streams));
u.sort();pa(b,u,Oa)},{active_streams:true})},{browse:mist.data.streams[g].source},{stream:g}),qa++;0==qa&&mist.send(function(){for(var a in mist.data.active_streams){var c=mist.data.active_streams[a].split("+");if(c.length>1&&c[0]in mist.data.streams){u[mist.data.active_streams[a]]=true;C[mist.data.active_streams[a]]=oa(mist.data.active_streams[a],mist.data.streams[c[0]])}}u=Object.keys(u);mist.data.streams&&(u=u.concat(Object.keys(mist.data.streams)));u.sort();pa(b,u)},{active_streams:!0})}else pa(b, u.sort();pa(b,u,Oa)},{active_streams:true})},{browse:mist.data.streams[g].source},{stream:g}),qa++;0==qa&&mist.send(function(){for(var a in mist.data.active_streams){var c=mist.data.active_streams[a].split("+");if(c.length>1&&c[0]in mist.data.streams){u[mist.data.active_streams[a]]=true;C[mist.data.active_streams[a]]=oa(mist.data.active_streams[a],mist.data.streams[c[0]])}}u=Object.keys(u);mist.data.streams&&(u=u.concat(Object.keys(mist.data.streams)));u.sort();pa(b,u)},{active_streams:!0})}else pa(b,
Object.keys(mist.data.streams));break;case "Edit":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a,b)},{capabilities:!0});c.append("Loading..");return}z=!1;""!=b&&(z=!0);if(z){var Pa=b,p=mist.data.streams[Pa];c.find("h2").append(' "'+Pa+'"')}else c.html($("<h2>").text("New Stream")),p={};var Qa=[];for(r in mist.data.capabilities.inputs)Qa.push(mist.data.capabilities.inputs[r].source_match);var fa=$("<div>"),Ra=function(a){var c={};if(!mist.data.streams)mist.data.streams= Object.keys(mist.data.streams));break;case "Edit":if("undefined"==typeof mist.data.capabilities){mist.send(function(){UI.navto(a,b)},{capabilities:!0});c.append("Loading..");return}z=!1;""!=b&&(z=!0);if(z){var Pa=b,p=mist.data.streams[Pa];c.find("h2").append(' "'+Pa+'"')}else c.html($("<h2>").text("New Stream")),p={};var Qa=[];for(r in mist.data.capabilities.inputs)Qa.push(mist.data.capabilities.inputs[r].source_match);var fa=$("<div>"),Ra=function(a){var c={};if(!mist.data.streams)mist.data.streams=
{};mist.data.streams[p.name]=p;b!=p.name&&delete mist.data.streams[b];c.addstream={};c.addstream[p.name]=p;if(b!=p.name)c.deletestream=[b];if(p.stop_sessions&&b!=""){c.stop_sessions=b;delete p.stop_sessions}mist.send(function(){delete mist.data.streams[p.name].online;delete mist.data.streams[p.name].error;UI.navto(a,a=="Preview"?p.name:"")},c)},Sa=$("<style>").text("button.saveandpreview { display: none; }"),P=$("<span>"),ra=function(){var a=c.find("[name=name]").val();if(a){var b=parseURL(mist.user.host), {};mist.data.streams[p.name]=p;b!=p.name&&delete mist.data.streams[b];c.addstream={};c.addstream[p.name]=p;if(b!=p.name)c.deletestream=[b];if(p.stop_sessions&&b!=""){c.stop_sessions=b;delete p.stop_sessions}mist.send(function(){delete mist.data.streams[p.name].online;delete mist.data.streams[p.name].error;UI.navto(a,a=="Preview"?p.name:"")},c)},Sa=$("<style>").text("button.saveandpreview { display: none; }"),P=$("<span>"),ra=function(){var a=c.find("[name=name]").val();if(a){var b=parseURL(mist.user.host),
d=c.find("[name=source]").val(),e=d.match(/@.*/);e&&(e=e[0].substring(1));var g=d.replace(/(?:.+?):\/\//,""),g=g.split("/"),g=g[0],g=g.split(":"),g=g[0];(d=d.match(/:\d+/))&&(d=d[0]);var f={},h=["RTMP","RTSP","RTMP.exe","RTSP.exe"],i;for(i in h)h[i]in mist.data.capabilities.connectors&&(f[h[i]]=mist.data.capabilities.connectors[h[i]].optional.port["default"]);var h={RTMP:1935,"RTMP.exe":1935,RTSP:554,"RTSP.exe":554,TS:-1,"TS.exe":-1},k;for(k in f){for(i in mist.data.config.protocols){var l=mist.data.config.protocols[i]; d=c.find("[name=source]").val(),e=d.match(/@.*/);e&&(e=e[0].substring(1));var g=d.replace(/(?:.+?):\/\//,""),g=g.split("/"),g=g[0],g=g.split(":"),g=g[0];(d=d.match(/:\d+/))&&(d=d[0]);var f={},h=["RTMP","RTSP","RTMP.exe","RTSP.exe","TSSRT","TSSRT.exe"],i;for(i in h)h[i]in mist.data.capabilities.connectors&&(f[h[i]]=mist.data.capabilities.connectors[h[i]].optional.port["default"]);var h={RTMP:1935,"RTMP.exe":1935,RTSP:554,"RTSP.exe":554,TSSRT:-1,"TSSRT.exe":-1,TS:-1,"TS.exe":-1},k;for(k in f){for(i in mist.data.config.protocols){var l=
if(l.connector==k){if("port"in l)f[k]=l.port;break}}f[k]=f[k]==h[k]?"":":"+f[k]}f.TS="";f["TS.exe"]="";P.find(".field").closest("label").hide();for(i in f){var q;k=d?d:f[i];switch(i){case "RTMP":case "RTMP.exe":q="rtmp://"+b.host+k+"/"+(e?e:"live")+"/";P.find(".field.RTMPurl").setval(q).closest("label").show();P.find(".field.RTMPkey").setval(a==""?"STREAMNAME":a).closest("label").show();q=q+(a==""?"STREAMNAME":a);break;case "RTSP":case "RTSP.exe":q="rtsp://"+b.host+k+"/"+(a==""?"STREAMNAME":a)+(e? mist.data.config.protocols[i];if(l.connector==k){if("port"in l)f[k]=l.port;break}}f[k]=f[k]==h[k]?"":":"+f[k]}f.TS="";f["TS.exe"]="";P.find(".field").closest("label").hide();for(i in f){var q;k=d?d:f[i];switch(i){case "RTMP":case "RTMP.exe":q="rtmp://"+b.host+k+"/"+(e?e:"live")+"/";P.find(".field.RTMPurl").setval(q).closest("label").show();P.find(".field.RTMPkey").setval(a==""?"STREAMNAME":a).closest("label").show();q=q+(a==""?"STREAMNAME":a);break;case "TSSRT":case "TSSRT.exe":q="srt://"+b.host+
"?pass="+e:"");break;case "TS":case "TS.exe":q="udp://"+(g==""?b.host:g)+k+"/"}P.find(".field."+i.replace(".exe","")).setval(q).closest("label").show()}}},Ta=$("<div>"),sa={},u=[],Ua=$("<div>");for(r in mist.data.capabilities.processes)u.push([r,mist.data.capabilities.processes[r].hrn?mist.data.capabilities.processes[r].hrn:mist.data.capabilities.processes[r].name]);if(u.length){var jb=[{label:"New process",type:"select",select:u,value:u[0][0],pointer:{main:sa,index:"process"},"function":function(){var a= k+"?streamname="+(a==""?"STREAMNAME":a);break;case "RTSP":case "RTSP.exe":q="rtsp://"+b.host+k+"/"+(a==""?"STREAMNAME":a)+(e?"?pass="+e:"");break;case "TS":case "TS.exe":q="udp://"+(g==""?b.host:g)+k+"/"}P.find(".field."+i.replace(".exe","")).setval(q).closest("label").show()}}},Ta=$("<div>"),sa={},u=[],Ua=$("<div>");for(r in mist.data.capabilities.processes)u.push([r,mist.data.capabilities.processes[r].hrn?mist.data.capabilities.processes[r].hrn:mist.data.capabilities.processes[r].name]);if(u.length){var jb=
$(this).getval();if(a!=null){var a=mist.data.capabilities.processes[a],b=[$("<h4>").text(a.name+" Process options")];Ua.html(UI.buildUI(b.concat(mist.convertBuildOptions(a,sa))))}}},Ua];Ta.append(UI.buildUI([$("<br>"),$("<h3>").text("Stream processes"),{label:"Stream processes",itemLabel:"stream process",type:"sublist",sublist:jb,saveas:sa,pointer:{main:p,index:"processes"}}]))}c.append(UI.buildUI([{label:"Stream name",type:"str",validate:["required","streamname"],pointer:{main:p,index:"name"},help:"Set the name this stream will be recognised by for players and/or stream pushing."}, [{label:"New process",type:"select",select:u,value:u[0][0],pointer:{main:sa,index:"process"},"function":function(){var a=$(this).getval();if(a!=null){var a=mist.data.capabilities.processes[a],b=[$("<h4>").text(a.name+" Process options")];Ua.html(UI.buildUI(b.concat(mist.convertBuildOptions(a,sa))))}}},Ua];Ta.append(UI.buildUI([$("<br>"),$("<h3>").text("Stream processes"),{label:"Stream processes",itemLabel:"stream process",type:"sublist",sublist:jb,saveas:sa,pointer:{main:p,index:"processes"}}]))}c.append(UI.buildUI([{label:"Stream name",
{label:"Source",type:"browse",filetypes:Qa,pointer:{main:p,index:"source"},help:"<p> Below is the explanation of the input methods for MistServer. Anything between brackets () will go to default settings if not specified. </p> <table class=valigntop> <tr> <th colspan=3><b>File inputs</b></th> </tr> <tr> <th>File</th> <td> Linux/MacOS:&nbsp;/PATH/FILE<br> Windows:&nbsp;/cygdrive/DRIVE/PATH/FILE </td> <td> For file input please specify the proper path and file.<br> Supported inputs are: DTSC, FLV, MP3. MistServer Pro has TS, MP4, ISMV added as input. </td> </tr> <th> Folder </th> <td> Linux/MacOS:&nbsp;/PATH/<br> Windows:&nbsp;/cygdrive/DRIVE/PATH/ </td> <td> A folder stream makes all the recognised files in the selected folder available as a stream. </td> </tr> <tr><td colspan=3>&nbsp;</td></tr> <tr> <th colspan=3><b>Push inputs</b></th> </tr> <tr> <th>RTMP</th> <td>push://(IP)(@PASSWORD)</td> <td> IP is white listed IP for pushing towards MistServer, if left empty all are white listed.<br> PASSWORD is the application under which to push to MistServer, if it doesn't match the stream will be rejected. PASSWORD is MistServer Pro only. </td> </tr> <tr> <th>RTSP</th> <td>push://(IP)(@PASSWORD)</td> <td>IP is white listed IP for pushing towards MistServer, if left empty all are white listed.</td> </tr> <tr> <th>TS</th> <td>tsudp://(IP):PORT(/INTERFACE)</td> <td> IP is the IP address used to listen for this stream, multi-cast IP range is: 224.0.0.0 - 239.255.255.255. If IP is not set all addresses will listened to.<br> PORT is the port you reserve for this stream on the chosen IP.<br> INTERFACE is the interface used, if left all interfaces will be used. </td> </tr> <tr><td colspan=3>&nbsp;</td></tr> <tr> <th colspan=3><b>Pull inputs</b></th> </tr> <tr> <th>DTSC</th> <td>dtsc://MISTSERVER_IP:PORT/(STREAMNAME)</td> <td>MISTSERVER_IP is the IP of another MistServer to pull from.<br> PORT is the DTSC port of the other MistServer. (default is 4200)<br> STREAMNAME is the name of the target stream on the other MistServer. If left empty, the name of this stream will be used. </td> </tr> <tr> <th>HLS</th> <td>http://URL/TO/STREAM.m3u8</td> <td>The URL where the HLS stream is available to MistServer.</td> </tr> <tr> <th>RTSP</th> <td>rtsp://(USER:PASSWORD@)IP(:PORT)(/path)</td> <td> USER:PASSWORD is the account used if authorization is required.<br> IP is the IP address used to pull this stream from.<br> PORT is the port used to connect through.<br> PATH is the path to be used to identify the correct stream. </td> </tr> </table>", type:"str",validate:["required","streamname"],pointer:{main:p,index:"name"},help:"Set the name this stream will be recognised by for players and/or stream pushing."},{label:"Source",type:"browse",filetypes:Qa,pointer:{main:p,index:"source"},help:"<p> Below is the explanation of the input methods for MistServer. Anything between brackets () will go to default settings if not specified. </p> <table class=valigntop> <tr> <th colspan=3><b>File inputs</b></th> </tr> <tr> <th>File</th> <td> Linux/MacOS:&nbsp;/PATH/FILE<br> Windows:&nbsp;/cygdrive/DRIVE/PATH/FILE </td> <td> For file input please specify the proper path and file.<br> Supported inputs are: DTSC, FLV, MP3. MistServer Pro has TS, MP4, ISMV added as input. </td> </tr> <th> Folder </th> <td> Linux/MacOS:&nbsp;/PATH/<br> Windows:&nbsp;/cygdrive/DRIVE/PATH/ </td> <td> A folder stream makes all the recognised files in the selected folder available as a stream. </td> </tr> <tr><td colspan=3>&nbsp;</td></tr> <tr> <th colspan=3><b>Push inputs</b></th> </tr> <tr> <th>RTMP</th> <td>push://(IP)(@PASSWORD)</td> <td> IP is white listed IP for pushing towards MistServer, if left empty all are white listed.<br> PASSWORD is the application under which to push to MistServer, if it doesn't match the stream will be rejected. PASSWORD is MistServer Pro only. </td> </tr> <tr> <th>SRT</th> <td>push://(IP)</td> <td> IP is white listed IP for pushing towards MistServer, if left empty all are white listed.<br> </td> </tr> <tr> <th>RTSP</th> <td>push://(IP)(@PASSWORD)</td> <td>IP is white listed IP for pushing towards MistServer, if left empty all are white listed.</td> </tr> <tr> <th>TS</th> <td>tsudp://(IP):PORT(/INTERFACE)</td> <td> IP is the IP address used to listen for this stream, multi-cast IP range is: 224.0.0.0 - 239.255.255.255. If IP is not set all addresses will listened to.<br> PORT is the port you reserve for this stream on the chosen IP.<br> INTERFACE is the interface used, if left all interfaces will be used. </td> </tr> <tr><td colspan=3>&nbsp;</td></tr> <tr> <th colspan=3><b>Pull inputs</b></th> </tr> <tr> <th>DTSC</th> <td>dtsc://MISTSERVER_IP:PORT/(STREAMNAME)</td> <td>MISTSERVER_IP is the IP of another MistServer to pull from.<br> PORT is the DTSC port of the other MistServer. (default is 4200)<br> STREAMNAME is the name of the target stream on the other MistServer. If left empty, the name of this stream will be used. </td> </tr> <tr> <th>HLS</th> <td>http://URL/TO/STREAM.m3u8</td> <td>The URL where the HLS stream is available to MistServer.</td> </tr> <tr> <th>RTSP</th> <td>rtsp://(USER:PASSWORD@)IP(:PORT)(/path)</td> <td> USER:PASSWORD is the account used if authorization is required.<br> IP is the IP address used to pull this stream from.<br> PORT is the port used to connect through.<br> PATH is the path to be used to identify the correct stream. </td> </tr> </table>",
"function":function(){var a=$(this).val();Sa.remove();P.html("");if(a!=""){var b=null,d;for(d in mist.data.capabilities.inputs)if(typeof mist.data.capabilities.inputs[d].source_match!="undefined"&&mist.inputMatch(mist.data.capabilities.inputs[d].source_match,a)){b=d;break}if(b===null)fa.html($("<h3>").text("Unrecognized input").addClass("red")).append($("<span>").text("Please edit the stream source.").addClass("red"));else{b=mist.data.capabilities.inputs[b];fa.html($("<h3>").text(b.name+" Input options")); "function":function(){var a=$(this).val();Sa.remove();P.html("");if(a!=""){var b=null,d;for(d in mist.data.capabilities.inputs)if(typeof mist.data.capabilities.inputs[d].source_match!="undefined"&&mist.inputMatch(mist.data.capabilities.inputs[d].source_match,a)){b=d;break}if(b===null)fa.html($("<h3>").text("Unrecognized input").addClass("red")).append($("<span>").text("Please edit the stream source.").addClass("red"));else{b=mist.data.capabilities.inputs[b];fa.html($("<h3>").text(b.name+" Input options"));
var e=mist.convertBuildOptions(b,p);"always_match"in mist.data.capabilities.inputs[d]&&mist.inputMatch(mist.data.capabilities.inputs[d].always_match,a)&&e.push({label:"Always on",type:"checkbox",help:"Keep this input available at all times, even when there are no active viewers.",pointer:{main:p,index:"always_on"}});fa.append(UI.buildUI(e));if(b.name=="Folder")c.append(Sa);else if(["Buffer","Buffer.exe","TS","TS.exe"].indexOf(b.name)>-1){d=[$("<br>"),$("<span>").text("Configure your source to push to:")]; var e=mist.convertBuildOptions(b,p);"always_match"in mist.data.capabilities.inputs[d]&&mist.inputMatch(mist.data.capabilities.inputs[d].always_match,a)&&e.push({label:"Always on",type:"checkbox",help:"Keep this input available at all times, even when there are no active viewers.",pointer:{main:p,index:"always_on"}});fa.append(UI.buildUI(e));if(b.name=="Folder")c.append(Sa);else if(["Buffer","Buffer.exe","TS","TS.exe"].indexOf(b.name)>-1){d=[$("<br>"),$("<span>").text("Configure your source to push to:")];
switch(b.name){case "Buffer":case "Buffer.exe":d.push({label:"RTMP full url",type:"span",clipboard:true,readonly:true,classes:["RTMP"],help:"Use this RTMP url if your client doesn't ask for a stream key"});d.push({label:"RTMP url",type:"span",clipboard:true,readonly:true,classes:["RTMPurl"],help:"Use this RTMP url if your client also asks for a stream key"});d.push({label:"RTMP stream key",type:"span",clipboard:true,readonly:true,classes:["RTMPkey"],help:"Use this key if your client asks for a stream key"}); switch(b.name){case "Buffer":case "Buffer.exe":d.push({label:"RTMP full url",type:"span",clipboard:true,readonly:true,classes:["RTMP"],help:"Use this RTMP url if your client doesn't ask for a stream key"});d.push({label:"RTMP url",type:"span",clipboard:true,readonly:true,classes:["RTMPurl"],help:"Use this RTMP url if your client also asks for a stream key"});d.push({label:"RTMP stream key",type:"span",clipboard:true,readonly:true,classes:["RTMPkey"],help:"Use this key if your client asks for a stream key"});
d.push({label:"RTSP",type:"span",clipboard:true,readonly:true,classes:["RTSP"]});break;case "TS":case "TS.exe":a.charAt(0)=="/"?d=[]:d.push({label:"TS",type:"span",clipboard:true,readonly:true,classes:["TS"]})}P.html(UI.buildUI(d));ra()}}}}},{label:"Stop sessions",type:"checkbox",help:"When saving these stream settings, kill this stream's current connections.",pointer:{main:p,index:"stop_sessions"}},P,$("<br>"),{type:"custom",custom:fa},Ta,{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Streams")}}, d.push({label:"SRT",type:"span",clipboard:true,readonly:true,classes:["TSSRT"]});d.push({label:"RTSP",type:"span",clipboard:true,readonly:true,classes:["RTSP"]});break;case "TS":case "TS.exe":a.charAt(0)=="/"?d=[]:d.push({label:"TS",type:"span",clipboard:true,readonly:true,classes:["TS"]})}P.html(UI.buildUI(d));ra()}}}}},{label:"Stop sessions",type:"checkbox",help:"When saving these stream settings, kill this stream's current connections.",pointer:{main:p,index:"stop_sessions"}},P,$("<br>"),{type:"custom",
{type:"save",label:"Save","function":function(){Ra("Streams")}},{type:"save",label:"Save and Preview","function":function(){Ra("Preview")},classes:["saveandpreview"]}]}]));c.find("[name=name]").keyup(function(){ra()});ra();break;case "Preview":""==b&&UI.navto("Streams");var Q=parseURL(mist.user.host),W=Q.protocol,T=Q.host,J=":8080",v=W+T+J+"/";for(r in mist.data.config.protocols)if(s=mist.data.config.protocols[r],"HTTP"==s.connector||"HTTP.exe"==s.connector){s.pubaddr&&s.pubaddr.length?"string"== custom:fa},Ta,{type:"buttons",buttons:[{type:"cancel",label:"Cancel","function":function(){UI.navto("Streams")}},{type:"save",label:"Save","function":function(){Ra("Streams")}},{type:"save",label:"Save and Preview","function":function(){Ra("Preview")},classes:["saveandpreview"]}]}]));c.find("[name=name]").keyup(function(){ra()});ra();break;case "Preview":""==b&&UI.navto("Streams");var Q=parseURL(mist.user.host),W=Q.protocol,T=Q.host,J=":8080",v=W+T+J+"/";for(r in mist.data.config.protocols)if(s=mist.data.config.protocols[r],
typeof s.pubaddr?v=s.pubaddr.replace(/\/$/,"")+"/":s.pubaddr.length&&(v=s.pubaddr[0].replace(/\/$/,"")+"/"):(J=s.port?":"+s.port:":8080",v=W+T+J+"/");break}var S=$("<div>").css({display:"flex","flex-flow":"row wrap","flex-shrink":1,"min-width":"auto"}),X="";-1==b.indexOf("+")&&(X=$("<button>").text("Settings").addClass("settings").click(function(){UI.navto("Edit",b)}));c.html($("<div>").addClass("bigbuttons").append(X).append($("<button>").text("Embed").addClass("embed").click(function(){UI.navto("Embed", "HTTP"==s.connector||"HTTP.exe"==s.connector){s.pubaddr&&s.pubaddr.length?"string"==typeof s.pubaddr?v=s.pubaddr.replace(/\/$/,"")+"/":s.pubaddr.length&&(v=s.pubaddr[0].replace(/\/$/,"")+"/"):(J=s.port?":"+s.port:":8080",v=W+T+J+"/");break}var S=$("<div>").css({display:"flex","flex-flow":"row wrap","flex-shrink":1,"min-width":"auto"}),X="";-1==b.indexOf("+")&&(X=$("<button>").text("Settings").addClass("settings").click(function(){UI.navto("Edit",b)}));c.html($("<div>").addClass("bigbuttons").append(X).append($("<button>").text("Embed").addClass("embed").click(function(){UI.navto("Embed",
b)})).append($("<button>").addClass("cancel").addClass("return").text("Return").click(function(){UI.navto("Streams")}))).append($("<h2>").text('Preview of "'+b+'"')).append(S);var K=encodeURIComponent(b),Va=$("<div>").css("flex-shrink","1").css("min-width","auto").css("max-width","100%");S.append(Va);var Wa=$("<div>"),Y=$("<div>").text("Loading player..").css("max-width","100%").css("flex-shrink","1").css("min-width","auto"),ta=$("<div>").addClass("controls");Va.append(Y).append(Wa).append(ta);$("link#devcss").length|| b)})).append($("<button>").addClass("cancel").addClass("return").text("Return").click(function(){UI.navto("Streams")}))).append($("<h2>").text('Preview of "'+b+'"')).append(S);var K=encodeURIComponent(b),Va=$("<div>").css("flex-shrink","1").css("min-width","auto").css("max-width","100%");S.append(Va);var Wa=$("<div>"),Y=$("<div>").text("Loading player..").css("max-width","100%").css("flex-shrink","1").css("min-width","auto"),ta=$("<div>").addClass("controls");Va.append(Y).append(Wa).append(ta);$("link#devcss").length||
c.append($("<link>").attr("rel","stylesheet").attr("type","text/css").attr("href",v+"skins/dev.css").attr("id","devcss"));var Xa=function(){Wa.text("");var d=document.createElement("script");c.append(d);d.src=v+"player.js";d.onerror=function(){Y.html($("<p>").append('Failed to load <a href="'+v+'player.js">'+v+"player.js</a>.")).append($("<p>").append("Please check if you've activated the HTTP protocol, if your http port is blocked, or if you're trying to load HTTPS on an HTTP page.")).append($("<button>").text("Reload").css("display", c.append($("<link>").attr("rel","stylesheet").attr("type","text/css").attr("href",v+"skins/dev.css").attr("id","devcss"));var Xa=function(){Wa.text("");var d=document.createElement("script");c.append(d);d.src=v+"player.js";d.onerror=function(){Y.html($("<p>").append('Failed to load <a href="'+v+'player.js">'+v+"player.js</a>.")).append($("<p>").append("Please check if you've activated the HTTP protocol, if your http port is blocked, or if you're trying to load HTTPS on an HTTP page.")).append($("<button>").text("Reload").css("display",
"block").click(function(){Xa()}))};d.onload=function(){var e=b,g=function(){var a=MistVideoObject.reference;ta.html("");ta.append(a.UI.buildStructure({type:"container",classes:["mistvideo-column"],style:{flexShrink:1},children:[{"if":function(){return this.playerName&&this.source},then:{type:"container",classes:["mistvideo-description"],style:{display:"block"},children:[{type:"playername",style:{display:"inline"}},{type:"text",text:"is playing",style:{margin:"0 0.2em"}},{type:"mimetype"}]}},{type:"decodingIssues", "block").click(function(){Xa()}))};d.onload=function(){var e=b,g=function(){var a=MistVideoObject.reference;ta.html("");ta.append(a.UI.buildStructure({type:"container",classes:["mistvideo-column"],style:{flexShrink:1},children:[{"if":function(){return this.playerName&&this.source},then:{type:"container",classes:["mistvideo-description"],style:{display:"block"},children:[{type:"playername",style:{display:"inline"}},{type:"text",text:"is playing",style:{margin:"0 0.2em"}},{type:"mimetype"}]}},{type:"decodingIssues",

View file

@ -4353,7 +4353,7 @@ var UI = {
var port = {}; var port = {};
var trythese = ['RTMP','RTSP','RTMP.exe','RTSP.exe']; var trythese = ['RTMP','RTSP','RTMP.exe','RTSP.exe','TSSRT','TSSRT.exe'];
for (var i in trythese) { for (var i in trythese) {
if (trythese[i] in mist.data.capabilities.connectors) { if (trythese[i] in mist.data.capabilities.connectors) {
port[trythese[i]] = mist.data.capabilities.connectors[trythese[i]].optional.port['default']; port[trythese[i]] = mist.data.capabilities.connectors[trythese[i]].optional.port['default'];
@ -4364,6 +4364,8 @@ var UI = {
'RTMP.exe': 1935, 'RTMP.exe': 1935,
RTSP: 554, RTSP: 554,
'RTSP.exe': 554, 'RTSP.exe': 554,
TSSRT: -1,
'TSSRT.exe': -1,
TS: -1, TS: -1,
'TS.exe': -1 'TS.exe': -1
}; };
@ -4395,6 +4397,10 @@ var UI = {
$livestreamhint.find('.field.RTMPkey').setval((streamname == '' ? 'STREAMNAME' : streamname)).closest('label').show(); $livestreamhint.find('.field.RTMPkey').setval((streamname == '' ? 'STREAMNAME' : streamname)).closest('label').show();
str += (streamname == '' ? 'STREAMNAME' : streamname); str += (streamname == '' ? 'STREAMNAME' : streamname);
break; break;
case 'TSSRT':
case 'TSSRT.exe':
str = 'srt://'+host.host+useport+'?streamname='+(streamname == '' ? 'STREAMNAME' : streamname);
break;
case 'RTSP': case 'RTSP':
case 'RTSP.exe': case 'RTSP.exe':
str = 'rtsp://'+host.host+useport+'/'+(streamname == '' ? 'STREAMNAME' : streamname)+(passw ? '?pass='+passw : ''); str = 'rtsp://'+host.host+useport+'/'+(streamname == '' ? 'STREAMNAME' : streamname)+(passw ? '?pass='+passw : '');
@ -4512,6 +4518,13 @@ var UI = {
PASSWORD is the application under which to push to MistServer, if it doesn\'t match the stream will be rejected. PASSWORD is MistServer Pro only.\ PASSWORD is the application under which to push to MistServer, if it doesn\'t match the stream will be rejected. PASSWORD is MistServer Pro only.\
</td>\ </td>\
</tr>\ </tr>\
<tr>\
<th>SRT</th>\
<td>push://(IP)</td>\
<td>\
IP is white listed IP for pushing towards MistServer, if left empty all are white listed.<br>\
</td>\
</tr>\
<tr>\ <tr>\
<th>RTSP</th>\ <th>RTSP</th>\
<td>push://(IP)(@PASSWORD)</td>\ <td>push://(IP)(@PASSWORD)</td>\
@ -4625,6 +4638,13 @@ var UI = {
classes: ['RTMPkey'], classes: ['RTMPkey'],
help: 'Use this key if your client asks for a stream key' help: 'Use this key if your client asks for a stream key'
}); });
fields.push({
label: 'SRT',
type: 'span',
clipboard: true,
readonly: true,
classes: ['TSSRT']
});
fields.push({ fields.push({
label: 'RTSP', label: 'RTSP',
type: 'span', type: 'span',

View file

@ -292,7 +292,7 @@ int main_loop(int argc, char **argv){
Controller::conf.addOption( Controller::conf.addOption(
"logfile", JSON::fromString("{\"long\":\"logfile\", \"short\":\"L\", \"arg\":\"string\" " "logfile", JSON::fromString("{\"long\":\"logfile\", \"short\":\"L\", \"arg\":\"string\" "
"\"default\":\"\",\"help\":\"Redirect all standard output to a " "\"default\":\"\",\"help\":\"Redirect all standard output to a "
"log file, provided with an argument\"}")); "log file, provided with an argument.\"}"));
Controller::conf.addOption( Controller::conf.addOption(
"accesslog", JSON::fromString("{\"long\":\"accesslog\", \"short\":\"A\", \"arg\":\"string\" " "accesslog", JSON::fromString("{\"long\":\"accesslog\", \"short\":\"A\", \"arg\":\"string\" "
"\"default\":\"LOG\",\"help\":\"Where to write the access log. " "\"default\":\"LOG\",\"help\":\"Where to write the access log. "

View file

@ -11,8 +11,8 @@ namespace Mist{
inputPlaylist::inputPlaylist(Util::Config *cfg) : Input(cfg){ inputPlaylist::inputPlaylist(Util::Config *cfg) : Input(cfg){
capa["name"] = "Playlist"; capa["name"] = "Playlist";
capa["desc"] = "Enables Playlist Input"; capa["desc"] = "Enables Playlist Input";
capa["source_match"] = "*.pls"; capa["source_match"].append("/*.pls");
capa["always_match"] = "*.pls"; capa["always_match"].append("/*.pls");
capa["variables_match"] = "*.pls"; capa["variables_match"] = "*.pls";
capa["priority"] = 9; capa["priority"] = 9;
capa["hardcoded"]["resume"] = 1; capa["hardcoded"]["resume"] = 1;

View file

@ -38,8 +38,8 @@ namespace Mist{
count = 0; count = 0;
capa["name"] = "SDP"; capa["name"] = "SDP";
capa["desc"] = "This input allows pulling of RTP packets using a provided SDP file"; capa["desc"] = "This input allows pulling of RTP packets using a provided SDP file";
capa["source_match"].append("*.sdp"); capa["source_match"].append("/*.sdp");
capa["always_match"].append("*.sdp"); capa["always_match"].append("/*.sdp");
capa["priority"] = 9; capa["priority"] = 9;
capa["codecs"]["video"].append("H264"); capa["codecs"]["video"].append("H264");
capa["codecs"]["video"].append("HEVC"); capa["codecs"]["video"].append("HEVC");

View file

@ -100,6 +100,14 @@ namespace Mist{
capa["push_urls"].append("dtsc://*"); capa["push_urls"].append("dtsc://*");
capa["incoming_push_url"] = "dtsc://$host:$port/$stream?pass=$password"; capa["incoming_push_url"] = "dtsc://$host:$port/$stream?pass=$password";
capa["url_rel"] = "/$";
capa["methods"][0u]["handler"] = "dtsc";
capa["methods"][0u]["type"] = "dtsc";
capa["methods"][0u]["hrn"] = "DTSC";
capa["methods"][0u]["priority"] = 10;
JSON::Value opt; JSON::Value opt;
opt["arg"] = "string"; opt["arg"] = "string";
opt["default"] = ""; opt["default"] = "";

View file

@ -174,6 +174,14 @@ namespace Mist{
capa["desc"] = "Real time streaming of TS data over SRT"; capa["desc"] = "Real time streaming of TS data over SRT";
capa["deps"] = ""; capa["deps"] = "";
capa["incoming_push_url"] = "srt://$host:$port?streamid=$stream";
capa["url_rel"] = "?streamid=$";
capa["methods"][0u]["handler"] = "srt";
capa["methods"][0u]["type"] = "srt";
capa["methods"][0u]["hrn"] = "SRT";
capa["methods"][0u]["priority"] = 10;
capa["optional"]["streamname"]["name"] = "Stream"; capa["optional"]["streamname"]["name"] = "Stream";
capa["optional"]["streamname"]["help"] = "What streamname to serve if no streamid is given by the other end of the connection"; capa["optional"]["streamname"]["help"] = "What streamname to serve if no streamid is given by the other end of the connection";
capa["optional"]["streamname"]["type"] = "str"; capa["optional"]["streamname"]["type"] = "str";
@ -215,6 +223,8 @@ namespace Mist{
capa["codecs"][0u][2u].append("+JSON"); capa["codecs"][0u][2u].append("+JSON");
capa["codecs"][1u][0u].append("rawts"); capa["codecs"][1u][0u].append("rawts");
cfg->addConnectorOptions(8889, capa); cfg->addConnectorOptions(8889, capa);
capa["optional"]["port"]["name"] = "UDP port";
capa["optional"]["port"]["help"] = "UDP port to listen on";
config = cfg; config = cfg;
capa["push_urls"].append("srt://*"); capa["push_urls"].append("srt://*");

View file

@ -174,6 +174,9 @@ namespace Mist{
capa["desc"] = "Provides WebRTC output"; capa["desc"] = "Provides WebRTC output";
capa["url_rel"] = "/webrtc/$"; capa["url_rel"] = "/webrtc/$";
capa["url_match"] = "/webrtc/$"; capa["url_match"] = "/webrtc/$";
capa["incoming_push_url"] = "http://$host:$port/webrtc/$stream";
capa["codecs"][0u][0u].append("H264"); capa["codecs"][0u][0u].append("H264");
capa["codecs"][0u][0u].append("VP8"); capa["codecs"][0u][0u].append("VP8");
capa["codecs"][0u][0u].append("VP9"); capa["codecs"][0u][0u].append("VP9");