This plugin was renamed to hlssink3 and is being merged upstream to GStreamer official Rust plugins https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/514
Find a file
2021-05-17 22:54:45 +02:00
src Support signals 2021-05-17 21:35:11 +02:00
tests Support signals 2021-05-17 21:35:11 +02:00
.gitignore Use gio::OutputStream to enable flexibility 2021-05-13 19:54:23 +02:00
build.rs Initial commit 2021-05-12 11:19:02 +02:00
Cargo.toml Add license Apache or MIT 2021-05-17 22:54:45 +02:00
LICENSE-APACHE Add license Apache or MIT 2021-05-17 22:54:45 +02:00
LICENSE-MIT Add license Apache or MIT 2021-05-17 22:54:45 +02:00
README.md Support signals 2021-05-17 21:35:11 +02:00
simple_http.py Support signals 2021-05-17 21:35:11 +02:00

GStreamer HTTP Live Streaming Plugin

A highly configurable GStreamer HLS sink plugin. Based on the hlssink2 element. The flexhlssink is written in Rust and has various options to configure the HLS output playlist generation.

Development status

The plugin is in active development. The first release objective is to have full feature parity with the hlssink2 plugin.

Progress:

  • Support all properties exposed by the hlssink2 plugin;
  • Write TS content to fragment stream (defaults to filesystem);
  • Write HLS playlist m3u8 file;
  • Delete old fragments;
  • Signal to acquire fragment stream;
  • Signal to acquire HLS playlist stream;
  • Signal to delete a fragment file;

Example Usage

After installing GStreamer , it is possible to compile and run the flexhlsplugin.

cargo build --release

On MacOS it might be necessary to set the PKG_CONFIG_PATH environment variable:

export PKG_CONFIG_PATH="/Library/Frameworks/GStreamer.framework/Versions/Current/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"

An example pipeline:

export PROJECT_DIR=`pwd`
gst-launch-1.0 videotestsrc is-live=true ! \
    x264enc ! h264parse ! flexhlssink target-duration=4 \
    --gst-plugin-load=${PROJECT_DIR}/target/release/libflexhlssink.dylib

In another terminal run a simple HTTP server:

cd $PROJECT_DIR
python simple_http.py

Open the example player site https://hls-js.netlify.app/demo/ and play the http://localhost:8000/playlist.m3u8 playback URL.