All Projects → AxisCommunications → Media Stream Library Js

AxisCommunications / Media Stream Library Js

Licence: mit
JavaScript library to handle media streams on the command line (Node.js) and in the browser.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Media Stream Library Js

Jmuxer
jMuxer - a simple javascript mp4 muxer that works in both browser and node environment.
Stars: ✭ 222 (+15.63%)
Mutual labels:  mp4, rtsp, video-streaming, aac, h264
Rtsp Simple Server
ready-to-use RTSP / RTMP server and proxy that allows to read, publish and proxy video and audio streams
Stars: ✭ 882 (+359.38%)
Mutual labels:  rtsp, aac, h264, rtp
Trinity
android video record editor muxer sdk
Stars: ✭ 609 (+217.19%)
Mutual labels:  camera, mp4, aac, h264
ZLMediaKit
WebRTC/RTSP/RTMP/HTTP/HLS/HTTP-FLV/WebSocket-FLV/HTTP-TS/HTTP-fMP4/WebSocket-TS/WebSocket-fMP4/GB28181/SRT server and client framework based on C++11
Stars: ✭ 7,790 (+3957.29%)
Mutual labels:  rtsp, mp4, rtp
mini
OpenSource Mini IP camera streamer
Stars: ✭ 64 (-66.67%)
Mutual labels:  h264, rtsp, mp4
demuxer
A tool for demux ts/mp4/flv by typescript. Support HEVC/AVC/AAC codec
Stars: ✭ 108 (-43.75%)
Mutual labels:  h264, mp4, aac
laav
Asynchronous Audio / Video Library for H264 / MJPEG / OPUS / AAC / MP2 encoding, transcoding, recording and streaming from live sources
Stars: ✭ 50 (-73.96%)
Mutual labels:  h264, aac, video-streaming
Libstreaming
A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Stars: ✭ 3,167 (+1549.48%)
Mutual labels:  aac, h264, rtp
Nager.VideoStream
Get images from a network camera stream or webcam
Stars: ✭ 27 (-85.94%)
Mutual labels:  h264, camera, rtsp
Audiovideocodec
一款视频录像机,支持AudioRecord录音、MediaCodec输出AAC、MediaMuxer合成音频视频并输出mp4,支持自动对焦、屏幕亮度调节、录制视频时长监听、手势缩放调整焦距等
Stars: ✭ 113 (-41.15%)
Mutual labels:  camera, mp4, aac
Lal
🔥 Golang live stream lib/client/server. support RTMP/RTSP/HLS/HTTP[S]-FLV/HTTP-TS, H264/H265/AAC, relay, cluster, record, HTTP API/Notify, GOP cache. 官方文档见 https://pengrl.com/lal
Stars: ✭ 480 (+150%)
Mutual labels:  rtsp, aac, rtp
Media Server
RTSP/RTP/RTMP/FLV/HLS/MPEG-TS/MPEG-PS/MPEG-DASH/MP4/fMP4/MKV/WebM
Stars: ✭ 1,363 (+609.9%)
Mutual labels:  mp4, rtsp, rtp
Haishinkit.swift
Camera and Microphone streaming library via RTMP, HLS for iOS, macOS, tvOS.
Stars: ✭ 2,237 (+1065.1%)
Mutual labels:  camera, aac, h264
rrtsp client
Rust high level RTSP client
Stars: ✭ 12 (-93.75%)
Mutual labels:  h264, rtsp, mp4
Androidffmpeg
android 读取摄像头和麦克风,使用rtmp推流
Stars: ✭ 298 (+55.21%)
Mutual labels:  camera, aac, h264
Jpegrtspcamera
Sample RTSP server streaming MJPEG video from PC camera
Stars: ✭ 25 (-86.98%)
Mutual labels:  jpeg, rtsp, video-streaming
Ksylive ios
金山云直播SDK [ iOS推流+播放 ]融合版 支持美颜滤镜(Beauty Filter)、美声(Beauty Voice)、软硬编(Software/Hardware Encoder) 、网络自适应(Network Auto Adapt)、混音(Audio Mixer)、混响(Reverb)、画中画(PIP)
Stars: ✭ 861 (+348.44%)
Mutual labels:  video-streaming, aac, h264
Node Tcp Streaming Server
Experimental TCP video streaming server written in node.js. Streaming over TCP and redistributing using WebSockets.
Stars: ✭ 100 (-47.92%)
Mutual labels:  video-streaming, h264
Nginx Vod Module
NGINX-based MP4 Repackager
Stars: ✭ 1,378 (+617.71%)
Mutual labels:  mp4, video-streaming
Faac
Freeware Advanced Audio Coder faac mirror
Stars: ✭ 102 (-46.87%)
Mutual labels:  mp4, aac

Media Stream Library JS

CI NPM

Media Stream Library JS is an open-source JavaScript library to handle media stream transforms for Node & the Web. The primary purpose is to deal with RTP streams in a browser without the need to use plugins or Flash, but relying on the Media Source Extensions standard, which is supported in all modern browsers.

Although RTP streams is the main focus, the library is not limited to handling RTP streams, or to the browser. It is suited to handle streams of messages of any kind, and makes it easier to stitch together transformations from one message type to another. Contributions of new components/pipelines are always welcome.

Note for IE11 users: if you want to build the library yourself for IE11 instead of using the provided bundle, you need import from dist/es5 with the following fix in webpack:

alias: {
  debug: 'debug/dist/debug.js',
},

You can look at the webpack.config.js to see how it's used for building the bundle. Since IE11 is not supported or tested at all, you might run into different issues as well.

Installation

Make sure you have Node installed on your machine.

Then, to install the library:

npm install media-stream-library

or if you are using yarn:

yarn add media-stream-library

Usage

This library is not a full media player: the framework provides no video controls, progress bar, or other features typically associated with a media player. For a simple React-based player we refer to the Media Stream Player library, which is built around this library.

However, getting video to play in the browser is quite easy (check the browser example). There are currently no codecs included either, we rely on browser support for that.

Although RTP streams is the main focus, the library is not limited to handling RTP streams, or to the browser. Its main focus is to handle streams of messages, and make it easier to stitch together transformations from one message type to another. Contributions of new components/pipelines are always welcome.

Importing

You can directly include the media-stream-library.min.js file in your browser (check the browser example):

<script src="media-stream-library.min.js"></script>

in which case a global variable mediaStreamLibrary will exist that contains all the necessary functions.

Alternatively, you can import it into your javascript code if you bundle it yourself:

import {components, pipelines} from 'media-stream-library';

Note that we expose our own bundle as the default entry point. This is to avoid issues where you would have to write fallback imports for browserify packages if using webpack 5.

If you want the smallest possible bundle, you can import directly from media-stream-library/dist/esm/index.browser.js and then make sure to properly resolve everything in your own webpack config (you can check our own webpack.config.js as en example how to write fallbacks for the browserify packages).

Components and pipelines

The library contains a collection of components that can be connected together to form media pipelines. The components are a low-level abstraction on top of Node streams to allow two-way communication, while media pipelines are sets of connected components with methods that allow you to control the pipeline, and easily add/remove components.

Components can be categorized as:

  • sources (socket, file, ...)
  • transforms (parsers, depay, muxers, ...)
  • sinks (HTML5 element, file, ...)

To build a pipeline, you can connect the required components. A number common pipelines are exported directly for convenience.

Check the examples section to see how these can be used in your own code. To run the examples yourself, you'll need to clone this repository loccally and follow the developer instructions.

Debugging

In the browser, you can set localStorage.debug = 'msl:*' to log everything related to just this library (make sure to reload the page after setting the value).

Contributing

Please read our contributing guidelines before making pull requests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].