Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@eyevinn/go-live

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eyevinn/go-live

API layer on top of AWS Media Services to stream live

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
3
Weekly downloads
 
Created
Source

Eyevinn Go Live

The @eyevinn/go-live NPM library provides the functionality to build an API layer on top of AWS Media Services to automate and simplify setting up a media pipeline for live using RTMP as the video signal contribution protocol.

RTMP -> MediaLive -> MediaPackage -> HLS

When creating a channel an AWS MediaLive channel is created with one RTMP input, one MediaPackage output group and an AWS MediaPackage channel with an HLS origin endpoint. The API returns the RTMP urls to stream to and the HLS origin endpoint to playback from (or have a CDN read from).

Example on how to use it

Install dependency

npm install --save @eyevinn/go-live

Example implementation

/**
 * Reference implementation of @eyevinn/go-live API
 */

const { GoLiveApiServer } = require("@eyevinn/go-live");

const server = new GoLiveApiServer({
  aws_access_key_id: <AWS_ACCESS_KEY_ID>,
  aws_secret_access_key: <AWS_SECRET_ACCESS_KEY>,
  role_arn:  "arn:aws:iam::590877988961:role/AllowMediaLiveAccessRole"
});

try {
  server.listen(process.env.PORT || 3000);
} catch (err) {
  console.error(err);
  process.exit(1);
}

Run it

node server.js

API

API docs (Swagger) is then available at /api/docs/.

MethodUrlDescription
POST/api/v1/channelsCreate and setup a channel
GET/api/v1/channelsList channels
GET/api/v1/channels/{channelId}Describe a channel
DELETE/api/v1/channels/{channelId}Remove a channel
PUT/api/v1/channels/{channelId}Start or stop a channel

Examples

Create a channel

curl -X 'POST' \
  'http://localhost:3000/api/v1/channels' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "channel_id": "example1",
  "whitelist": "0.0.0.0/0"
}'

{
  "channel_id": "example1",
  "rtmp_urls": [
    "rtmp://13.51.185.200:1935/example1A",
    "rtmp://13.51.225.136:1935/example1B"
  ],
  "hls_urls": [
    "https://e85dc9675199b759.mediapackage.eu-north-1.amazonaws.com/out/v1/84f7f98eb236463aa24a283282355e0d/index.m3u8"
  ]
}

Remove a channel

curl -X 'DELETE' \
  'http://localhost:3000/api/v1/channels/example1' \
  -H 'accept: application/json'

About Eyevinn Technology

Eyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in a way that we are not commercially tied to any platform or technology vendor.

At Eyevinn, every software developer consultant has a dedicated budget reserved for open source development and contribution to the open source community. This give us room for innovation, team building and personal competence development. And also gives us as a company a way to contribute back to the open source community.

Want to know more about Eyevinn and how it is to work here. Contact us at work@eyevinn.se!

Keywords

FAQs

Package last updated on 07 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc