Coder Social home page Coder Social logo

getusermedia-to-rtmp's Introduction

HTML5 to RTMP streaming gateway proxy

This project intends to allow an endpoint user to submit RTMP live video streaming directly using web browser and getUserMedia, without installing additional software. Currently, only Firefox with MediaRecorder API is supported.

Usage

Start the server by npm install and node server.js, then open firefox to http://127.0.0.1:8888/ . The rtmp stream will be submitted to rtmp://127.0.0.1/live by default.

Please make sure there's an rtmp server up and running; try nginx-rtmp-module if you don't have one.

In production, the server should limit what the client can choose to push stream to.

How does it work

From getUserMedia, MediaRecorder, via socket.io to nodejs, then to ffmpeg transcoding and publishing to rtmp. You can guess what happened in between.

Limitation and To-Dos

This is still a relatively primitive project, and a lot of work still need to be done.

  • No Audio Yet

The audio stream is corrupted due to timestamp issues if streamed directly. Should be resolved if ffmpeg is configured properly.

  • No Chrome Yet

Beside MediaRecorder implementation issue, Chrome forces getUserMedia to be requested over SSL. (will deal with that later)

  • No resolution adjustment on server-side yet

The server should allow resizing the output video. (coming soon)

  • Configurable server with SSL (coming soon)

  • Configurable client (coming soon)

  • socket.io has bad efficiency doing binary websocket

Should migrate to raw websocket (later).

  • Rate-limiting

Consider automatically adjust upstream rate via WebSocket bufferedAmount attribute. (Note that locally the rate can only be adjusted by video size...)

getusermedia-to-rtmp's People

Contributors

chenxiaoqino avatar

Watchers

 avatar

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.