streamlab

package
v1.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package streamlab is StreamLab, a video service that delivers HLS: a catalogue, playback sessions with signed tokens, multivariant and media playlists, MPEG-TS segments in four renditions for 30 on-demand videos, two live channels whose playlists slide forward every two seconds, and playback heartbeats. It is the reference app for the streaming pack.

Planted bottlenecks (see README.md), each switched off by a fix flag:

  • package: every segment request packages the segment again (muxing MPEG-TS packets), so a live event's viewers, who all want the same newest segment, repeat the same work thousands of times (fix "package" keeps packaged segments in a bounded cache).
  • playlist: every live playlist request lists every segment since the event started to find the newest six, so playlists slow down as the event goes on (fix "playlist" renders each playlist once per segment and serves that).
  • startup: starting playback checks entitlement, fetches a DRM license and picks a CDN one after another (fix "startup" does the three at once).

Index

Constants

View Source
const (
	// Videos is how many on-demand videos StreamLab has (v001 ... v030).
	Videos = 30
	// Segments is how many segments each video has.
	Segments = 300
)

Variables

This section is empty.

Functions

func New

func New(cfg labkit.Config) http.Handler

New returns StreamLab's handler.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL