Giter VIP home page Giter VIP logo

3las's Introduction

3LAS (Low Latency Live Audio Streaming)

3LAS a browser-based low latency audio streaming solution for use in mobile devices. It's based on HTML5 (WebRTC, fallback via WebSockets and Web Audio API) and is written in TypeScript/JavaScript.

Requirements

Server side

Client side

  • WebRTC support (browser)

OR (Fallback)

  • WebSocket support (browser)
  • Web Audio API support (browser)
  • Decoder for respective audio format (browser/OS)

Deploying the example (outline)

Web server

  1. Copy the content of the example/client folder into the root folder of your webserver.
  2. Change the 'SocketHost', 'SocketPort' and 'SocketPath' variables in the script/3las.js to match the server from the streaming server
  3. (optional) Add STUN/TURN servers to the 'RtcConfig' variable in index.html (see https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer/urls)

Streaming server

  1. Copy the content of the example/server folder somewhere onto the streaming server
  2. In a terminal, browse to the folder where the files are
  3. Use npm to install ws and wrtc for Node.js (npm install ws wrtc), you may need to install the node-pre-gyp npm package as well
  4. Check the settings.json configuration file (nano settings.json), copy STUN/TURN settings from web server index.html.
  5. Make the test.sh scripts executable with chmod (chmod ug+x test.sh)
  6. Run the scripts to start the server (./test.sh)

Notes

The main transmission method was changed from WebSockets and WebAudio to WebRTC. WebSockets and WebAudio are still used as a fallback for clients that don't support WebRTC. The old version that doesn't use WebRTC is still available in the socket_only branch. In fallback mode only mp3 and wav are offered. Other formats will no longer be developed or supported. The fallback streams are automatically generated via ffmpeg as child processes. Within a LAN environment STUN/TURN server should not be necessary, for an Internet service STUN/TURN servers are practically required. Input into the server script must be PCM audio. Check the test.sh script to see the command line parameters that provide the required metadata for ffmpeg.

Fell free to contact me if you have problems or questions. Pull requests are also welcome.

3las's People

Contributors

jojobond avatar j-schmidt-eu 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.