GithubHelp home page GithubHelp logo

tom2kota / stream-rtmp Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 1.0 105 KB

Node Media Server package & RTMP Server ... DEMO:

Home Page: https://stream-rtmp-server.herokuapp.com

JavaScript 100.00%
rtmp-server obs-studio node-media-server

stream-rtmp's Introduction

stream-rtmp

Node Media Server package and c RTMP server ... DEMO:


App Structure

image

image


REPOS:

Client of Video Stream

JSON server for stream-client

Node Media Server package & RTMP Server


DEMOS:

Client of Video Stream

JSON server for stream-client

Node Media Server package & RTMP Server


Node-Media-Server

npmjs

Install

npm version (recommended)

mkdir nms
cd nms
npm install node-media-server
vi app.js
const NodeMediaServer = require('node-media-server');
 
const config = {
  rtmp: {
    port: 1935,
    chunk_size: 60000,
    gop_cache: true,
    ping: 30,
    ping_timeout: 60
  },
  http: {
    port: 8000,
    allow_origin: '*'
  }
};
 
var nms = new NodeMediaServer(config)
nms.run();

node app.js

OBS Studio

Open Broadcaster Software

Linux Install Directions

wiki docs

xserver-xorg version 1.18.4 or newer is recommended to avoid potential performance issues with certain features in OBS, such as the fullscreen projector.

FFmpeg is required. If you do not have the FFmpeg installed (if you're not sure, then you probably don't have it), you can get it with the following commands:

sudo apt install ffmpeg

Then you can install OBS with the following commands, make sure you enabled the multiverse repo in Ubuntu's software center (NOTE: On newer versions of ubuntu adding a repository automatically apt updates.):

sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt upgrade
sudo apt install obs-studio

or

sudo snap install obs-studio

Run OBS with the following command:

obs-studio

or OBS Studio Ubuntu using Ubuntu Software-GUIs

image

Customize OBS Stream
SETTINGS => Stream

STREAM TYPE => Custom Streaming Server

URL => rtmp://localhost/live

STREAM KEY => 1 (for the stream with ID:1)

CLOSE SETTINGS

PRESS THE BUTTON => Start Streaming

RESULT: http://localhost:3000/streams/1

Run Node Media Server
node index.js
const NodeMediaServer = require('node-media-server');

const config = {
    rtmp: {
        port: 1935,
        chunk_size: 60000,
        gop_cache: true,
        ping: 30,
        ping_timeout: 60
    },
    http: {
        port: 8000,
        allow_origin: '*'
    }
};

var nms = new NodeMediaServer(config)
nms.run();

Node Media Server v2.1.9

Node Media Rtmp Server started on port: 1935

Node Media Http Server started on port: 8000

Node Media WebSocket Server started on port: 8000

Deploy

Heroku support says that they only allow 80 and 443 HTTP/S ports and they do not officially support RTMP.


references

Разработка приложения для потокового вещания с помощью Node.js и React

stream-rtmp's People

Contributors

tom2kota avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

srizan10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.