EasyDSS high-performance RTMP, HLS (m3u8), HTTP-FLV, Nodejs RTSP streaming media server solution of the calling bat or sh script

About EasyDSS streaming media server

EasyDSS commercial streaming media server solution is a set of on-demand streaming, transcoding and management, broadcast, video, search, time-shifting playback in one complete set of commercial streaming media server solution, EasyDSS high-performance RTMP Streaming push server supports RTMP stream, sync output HTTP, RTMP, HLS, HTTP- FLV, stream distribution supports push / pull stream distribution, support second opening, the GOP buffer, recording, retrieval, playback, video download, web management and other functions, It is currently on the market most reasonable a commercial streaming media server! Details see the official website: http://www.easydss.com

EasyDSS

This article will tell you how to call in Nodejs bat or sh script?

The project will be called to bat and sh script, how to use Nodejs project as well?

1. Install shelljs

npm install shelljs --save

2. Other relevant dependent

npm install co --save

3. Package asynchronous method

var shell = require('shelljs');
exports.exec = function(command) {
    return Promise.resolve({
        then: function(onFulfill, onReject) {
            shell.exec(command, function(code, stdout, stderr) {
                onFulfill({ code: code, out: stdout, error: stderr });
            })
        }
    });
 }

4. synchronous call execution

var ossshell = require('./shell.js');

function demo(){
    return Promise.resolve({
    then: function(onFulfill, onReject) {
            co(function*() {
                    var command = "";
                    if (platform.startsWith("win")) {
                       //如果是windows
                        command = `call trans_process.bat`;
                    } else { 
                        //如果是linux
                        command = `sh ./trans_process.sh`;
                    }
                    yield ossshell.exec(command);
                    onFulfill();
                }
            }).catch(function(e) {
                onReject(new Error(e));
            })
        }
    });
}

EasyDSS related functions

EasyDSS commercial streaming media server to provide a one-stop transcoding, demand, live, time-shifted playback service, which greatly simplifies the development and integration work, and EasyDSS supports a variety of features, fully able to meet the needs of enterprise information technology aspects of video :

  • Multi-screen playback: support Flash, HTML5 player, compatible with Windows, Android, iOS, Mac and other operating systems.

  • Free combination: seamless connection between EasyDSS software products, but also EasyDSS streaming media server software can interface with other third-party platform, the combination of flexibility and freedom.

  • Support cloud architecture: support Ali cloud, cloud Tencent, Huawei cloud, Albatron, seven cattle cloud storage and other major cloud service providers, cloud infrastructure to support the deployment more flexible.

  • And CDN seamless: EasyDSS software and product support network places, Dili, flood, etc. CDN blue seamless.

  • Secondary development simple: to provide programming language independent of the RESTful API interfaces, as long as the understanding of JS, HTML, JAVA, ASP.NET either, PHP, ASP and other development language, you can use RESTful API EasyDSS provided for secondary development.

  • Easy to use: graphical user module clear, simple process, easy to get started.

How EasyDarwin support demand and RTMP / HLS live? EasyDSS!

EasyDSS application scenarios

EasyDSS
EasyDSS
EasyDSS

Guess you like

Origin blog.csdn.net/EasyDSS/article/details/93465400