Open Source Newsletter #004

Open Source FAST Channel Engine based on VOD2Live technology

Eyevinn Channel Engine is a core component library for creating FAST channels based on VOD2Live technology and it is open source. Combine this VOD2live technology component with your business and scheduling logic to build your very own and unique FAST channel engine. To help you get started we have now made available a documentation site including the usage guide, tutorials and more. The documentation is available here: https://vod2live.docs.eyevinn.technology

Tools and Libraries for WebRTC based streaming

In our project to validate and prototyping WebRTC based distribution with standardized ingress (WHIP) and egress (proposed WHPP) protocol we have developed a couple of tools and libraries that we made available as open source.

WHIP mpegts

A command line tool based on gstreamer that can consume an MPEG-TS stream, re-transcode and push to a WHIP compatible WebRTC media server endpoint.
GitHub: https://github.com/Eyevinn/whip-mpegts

brew tap eyevinn/tools
brew install whip-mpegts
export GST_PLUGIN_PATH=/opt/homebrew/lib/gstreamer-1.0
whip-mpegts -a 0.0.0.0 \
-p 1234 \
-u https://whip.dev.eyevinn.technology/api/v1/whip/broadcaster

WHIP web client

To build a web-based application for ingestion using the WHIP protocol we have made an NPM package available under open source.
NPM: https://www.npmjs.com/package/@eyevinn/whip-web-client

npm install --save @eyevinn/whip-web-client
import { WHIPClient } from "@eyevinn/whip-web-client"

const client = new WHIPClient({
endpoint: "http://<host>/whip/broadcaster"
});
const videoIngest = document.querySelector<HTMLVideoElement>("video#ingest");
const mediaStream = await navigator.mediaDevices.getUserMedia({
video: true,
audio: true,
});
videoIngest.srcObject = mediaStream;
await client.ingest(mediaStream);

WHPP play

A command line tool also based on gstreamer for playback of a WebRTC stream that is made available by a media server endpoint that is WHPP compatible.
GitHub: https://github.com/Eyevinn/whpp-play

brew tap eyevinn/tools
brew install whpp-play
export GST_PLUGIN_PATH=/opt/homebrew/lib/gstreamer-1.0
whpp-play https://broadcaster.lab.sto.eyevinn.technology:8443/broadcaster/channel/sthlm

WHPP Web Client

For playback in a web browser we have an NPM package that currently includes adapter for SDP handshaking based on the WHPP protocol but can be easily extended to support other HTTP based protocols such as WHEP.
NPM: https://www.npmjs.com/package/@eyevinn/webrtc-player

npm install @eyevinn/webrtc-player
import { WebRTCPlayer } from "@eyevinn/webrtc-player";

const video = document.querySelector("video");
const player = new WebRTCPlayer({ video: video, type: "se.eyevinn.whpp" });
await player.load(new URL(channelUrl));

WHIP and WHPP distribution components

To build a WHIP server endpoint we have made available an NPM package that you can start from. Being plugin based you can extend it to support various “sinks” where one sink could be a WebRTC Selective Forwarding Unit (SFU). Included in the library is the integration with an open source WebRTC media server called Symphony Media Bridge.
NPM: https://www.npmjs.com/package/@eyevinn/whip-endpoint

npm install --save @eyevinn/whip-endpoint
import { WhipEndpoint } from "@eyevinn/whip-endpoint";

const endpoint = new WhipEndpoint({
port: 8000,
hostname: "<whiphost>",
https: false,
iceServers: [{ urls: "stun:stun.l.google.com:19302" }],
enabledWrtcPlugins: [ "sfu-broadcaster" ],
});

endpoint.setOriginSfuUrl("http://<sfu-origin>/conferences/");
endpoint.registerBroadcasterClient({
client: new BroadcasterClient("http://<wrtc-egress-endpoint>/api"),
sfuUrl: "http://<sfu-edge>/conferences/"
});
endpoint.setSfuApiKey(string | undefined);
endpoint.listen();
npm install --save @eyevinn/wrtc-egress
import { WHPPEndpoint, SfuType } from "@eyevinn/wrtc-egress";

const endpoint = new WHPPEndpoint({
port: 8001,
hostname: "wrtc-edge.eyevinn.technology",
prefix: "/whpp",
sfuAdapter: SfuType.smb,
sfuOptions: { smbUrl: "http://localhost:8080/conferences/", apiKey: "secret" },
iceServers: [{ urls: "stun:stun.l.google.com:19302" }],
});
endpoint.listen();
version: "3.7"services:
sfu-origin:
image: eyevinntechnology/wrtc-sfu:v0.3.0
environment:
- HTTP_PORT=8280
- UDP_PORT=13000
- IPV4_ADDR=127.0.0.1
- API_KEY=example
ports:
- "8280:8280/tcp"
- "13000:13000/udp"
sfu-edge:
image: eyevinntechnology/wrtc-sfu:v0.3.0
environment:
- HTTP_PORT=8381
- UDP_PORT=13000
- IPV4_ADDR=127.0.0.1
- API_KEY=dev
ports:
- "8081:8081/tcp"
- "13000:13000/udp"
ingest:
image: eyevinntechnology/wrtc-origin:v0.3.0
depends_on:
- sfu-origin
- sfu-edge
environment:
- PORT=8200
- EXT_PORT=8200
- ORIGIN_SFU_URL=http://sfu:8280/conferences/
- SFU_API_KEY=example
- EDGE_LIST_CONFIG=/etc/edge-list-config.json
ports:
- "8200:8200/tcp"
volumes:
- ./example-edge-list-config.json:/etc/edge-list-config.json
egress:
image: eyevinntechnology/wrtc-whpp:v0.2.0
environment:
- PORT=8300
- EXT_PORT=8300
- HOSTNAME=localhost
- SMB_URL=http://sfu-edge:8380/conferences/
- SMB_API_KEY=example
ports:
- "8300:8300/tcp"
[
{
"sfuApiUrl": "http://sfu-edge:8380/conferences/",
"egressApiUrl": "http://egress:8300/api"
}
]

HLS Monitoring Service

Service to monitor one or more HLS streams for manifest errors and inconsistencies. Possible inconsistencies and errors are:

  • Media sequence counter issues.
  • Discontinuity sequence counter issues.
  • Detect stale manifests. The default is at least 6000ms but can be configured via the env HLS_MONITOR_INTERVAL or set when creating a new HLSMonitor.
  • Playlist is updating correctly.

Video Quality Monitor

A small package to monitor buffering and dropped frames on the video element, reporting it back as state updates into a sent in callback.
NPM: https://www.npmjs.com/package/@eyevinn/video-quality-monitor

import { VideoQualityMonitor } from "@eyevinn/video-quality-monitor";
const videoElement = document.querySelector("video");
function handler = (state) => {
console.log(`state changed –>`, state);
};

new VideoQualityMonitor(videoElement, handler);
  • Further development of any of these components
  • Customization and integration of any of these components into your platform
  • Support and maintenance agreement

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Eyevinn Technology

Eyevinn Technology

925 Followers

We are consultants sharing the passion for the technology for a media consumer of the future.