GStreamer HTTP Live Streaming Examples

This repository contains some examples of usage of the GStreamer HLS plugin hlssink3.

Available Examples

Serving a video file to live HLS

The example reads from a local file and generates a HLS manifest and segment files. The files are
updated in realtime for live streaming.


Needs Python 3.9 (as of today 2021-10-10).

Make sure GStreamer is installed and available:

$ pkg-config --print-errors --exists gstreamer-1.0

If GStreamer dependency is not installed, please try the those
installation steps.

MacOS Specific

Make sure pkg-config version being used can find all libs installed using brew:

$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

Building Python Bindings

In order to be able to use the GStreamer bindings in a virtualenv. We need to build from source.
Checkout the code from

$ meson builddir
$ cd builddir
$ ninja -v
$ ninja install -v

The ninja install will attempt to install, but we need to manually copy the overrides, if we want to use under a virtualenv.

$ cp gi/overrides/ ~/.pyenv/versions/gstreamer/lib/python3.9/site-packages/gi/overrides
$ cp ~/development/opensource/gst-python/gi/overrides/ ~/.pyenv/versions/gstreamer/lib/python3.9/site-packages/gi/overrides
$ cp ~/development/opensource/gst-python/gi/overrides/ ~/.pyenv/versions/gstreamer/lib/python3.9/site-packages/gi/overrides

Additional Info

Example of sometimes pad:


View Github