Categorygithub.com/bluenviron/gohlslib
modulepackage
1.4.0
Repository: https://github.com/bluenviron/gohlslib.git
Documentation: pkg.go.dev

# README

gohlslib

Test Lint Go Report Card CodeCov PkgGoDev

HLS client and muxer library for the Go programming language, written for MediaMTX.

Go ≥ 1.20 is required.

Features:

  • Client

    • Read streams in MPEG-TS, fMP4 or Low-latency format
    • Read tracks encoded with AV1, VP9, H265, H264, Opus, MPEG-4 Audio (AAC)
    • Get absolute timestamp of incoming data
  • Muxer

    • Generate streams in MPEG-TS, fMP4 or Low-latency format
    • Write tracks encoded with AV1, VP9, H265, H264, Opus, MPEG-4 audio (AAC)
    • Save generated segments on disk
  • General

    • Parse and produce M3U8 playlists
    • Examples

Table of contents

Examples

API Documentation

Click to open the API Documentation

Specifications

namearea
RFC2616, HTTP 1.1protocol
RFC8216, HLSprotocol
HLS v2protocol
HTTP Live Streaming by Appleprotocol
Codec specificationscodecs
Golang project layoutproject layout

Related projects

# Packages

No description provided by the author
No description provided by the author

# Constants

supported variants.
supported variants.
supported variants.

# Variables

ErrClientEOS is returned by Wait() when the stream has ended.

# Structs

Client is a HLS client.
Muxer is a HLS muxer.
Track is a HLS track.

# Type aliases

ClientOnDataAV1Func is the prototype of the function passed to OnDataAV1().
ClientOnDataH26xFunc is the prototype of the function passed to OnDataH26x().
ClientOnDataMPEG4AudioFunc is the prototype of the function passed to OnDataMPEG4Audio().
ClientOnDataOpusFunc is the prototype of the function passed to OnDataOpus().
ClientOnDataVP9Func is the prototype of the function passed to OnDataVP9().
ClientOnDecodeErrorFunc is the prototype of Client.OnDecodeError.
ClientOnDownloadPartFunc is the prototype of Client.OnDownloadPart.
ClientOnDownloadPrimaryPlaylistFunc is the prototype of Client.OnDownloadPrimaryPlaylist.
ClientOnDownloadSegmentFunc is the prototype of Client.OnDownloadSegment.
ClientOnDownloadStreamPlaylistFunc is the prototype of Client.OnDownloadStreamPlaylist.
ClientOnRequestFunc is the prototype of the function passed to OnRequest().
ClientOnTracksFunc is the prototype of the function passed to OnTracks().
MuxerVariant is a muxer variant.