nginx-http-flv-module is a free, open source digital asset management (dam) project written in C and released under BSD-2-Clause. It has 2,933 GitHub stars, 594 forks and 26 open issues, and was last pushed 29 days ago. On this registry it ranks #10 of 25 tracked projects in Digital Asset Management (DAM), with 5 head-to-head comparisons available.

What is nginx-http-flv-module?

What it is

nginx-http-flv-module is a media streaming server built on nginx-rtmp-module and lives in the NGINX ecosystem. It extends the base RTMP module with HTTP-FLV playback, GOP cache, virtual hosts, and JSON style statistics, while retaining the features provided by nginx-rtmp-module.

It solves the problem of serving live media streams from a self-hosted NGINX-based server to clients that need HTTP delivery, browser playback, or operational visibility. The README lists VLC, OBS, JW Player, and flv.js as players, and FFmpeg or OBS as publishing tools.

Key capabilities

  • HTTP-FLV playback over HTTP/1.x is supported, and the README notes HTTPS-FLV and chunked response support.
  • GOP cache is provided as a feature that nginx-rtmp-module does not provide.
  • Virtual host support allows one IP address to serve multiple domain names, according to the GitHub description.
  • JSON style statistics are supported, and the README lists statistics for recordings.
  • Audio-only support is available for RTMP and HTTP-FLV, but it will not work if wait_video or wait_key is on.
  • Single-track support for HLS is provided, along with reuseport support and a timer for access log.
  • The module can omit the listen directive, while the README notes that nginx-rtmp-module requires at least one listen directive.

Who uses it and how

  • Operators use it as a self-hosted streaming endpoint for RTMP publishing and HTTP-FLV playback, with FFmpeg or OBS sending media streams.
  • Browser players can consume HTTP-FLV through flv.js, which requires Media Source Extensions support.
  • VLC and OBS can play RTMP and HTTP-FLV streams, while JW Player is listed for RTMP playback.
  • Monitoring workflows can read JSON style statistics and recording statistics from the server.

Getting started

The README describes building from source by downloading NGINX and nginx-http-flv-module, then adding the module during the NGINX configure step with --add-module=/path/to/nginx-http-flv-module. It lists GNU make, GCC or MSVC, GDB, FFmpeg or OBS, VLC or flv.js, PCRE, OpenSSL, and zlib as prerequisites depending on platform and features needed.

When to use it — and when not to

Use it when you need an NGINX-based streaming server that adds HTTP-FLV, GOP cache, virtual hosts, or JSON statistics to nginx-rtmp-module, and you can compile and configure NGINX yourself. The README recommends Linux, limits Windows support, states compatibility below NGINX 1.2.6 is unknown, and warns not to compile the module together with nginx-rtmp-module. It is less suitable for hosted or turnkey deployments, because the provided facts describe source builds and self-managed prerequisites.

project readme (upstream, from github) — read inline

nginx-http-flv-module

nginx-http-flv-module workflow

A media streaming server based on nginx-rtmp-module.

中文说明.

Donate if you like this module. Many thanks to you!

PayPal

Credits

Features

Features nginx-http-flv-module nginx-rtmp-module Remarks
HTTP-FLV (HTTP/1.x for play) x HTTPS-FLV and chunked response supported
GOP cache x
Virtual Host x
Omit listen directive See remarks There MUST be at least one listen directive
Audio-only support for RTMP/HTTP-FLV See remarks Won't work if wait_video or wait_key is on
Single-track support for HLS x
reuseport support x
Timer for access log x
JSON style statistics x
Statistics for recordings x
Independent of endianness See remarks Partially supported in branch big-endian

Compatibility

The NGINX version SHOULD be equal to or greater than 1.2.6, the compatibility with other versions is unknown.

Systems supported

  • Linux (recommended) / FreeBSD / MacOS / Windows (limited).

Players supported

Note

Prerequisites

  • GNU make for activating compiler on Unix-like systems to compile software.

  • GCC for compilation on Unix-like systems or MSVC for compilation on Windows.

  • GDB for debug on Unix-like systems.

  • FFmpeg or OBS for publishing media streams.

  • VLC (recommended) or flv.js (recommended) for playing media streams.

  • PCRE for NGINX if regular expressions needed.

  • OpenSSL for NGINX if encrypted access needed.

  • zlib for NGINX if compression needed.

Build

Note

nginx-http-flv-module has all features that nginx-rtmp-module provides, so DON'T compile nginx-http-flv-module along with nginx-rtmp-module.

On Windows

For details about build steps, please refer to Building nginx on the Win32 platform with Visual C, and don't forget to add --add-module=/path/to/nginx-http-flv-module in Run configure script step.

Note

If some compilers which do not support x64 perfectly, VS2010 for example, are used to compile the module, please make sure that the default settings are used (target machine type x86).

On Unix-like systems

Download NGINX and nginx-http-flv-module.

Uncompress them.

cd to NGINX source directory & run this:

Compile the module into NGINX
./configure --add-module=/path/to/nginx-http-flv-module
make
make install

or

Compile the module as a dynamic module
./configure --add-dynamic-module=/path/to/nginx-http-flv-module
make
make install
Note

If the module is compiled as a dynamic module, the NGINX version MUST be equal to or greater than 1.9.11.

Usage

For details of usages of nginx-rtmp-module, please refer to README.md.

Publish

For simplicity, transcoding is not used (so -c copy is used):

ffmpeg -re -i MEDIA_FILE_NAME -c copy -f flv rtmp://example.com[:port]/appname/streamname
Note

Some legacy versions of FFmpeg don't support the option -c copy, the options -vcodec copy -acodec copy can be used instead.

The appname is used to match an application block in rtmp block (see below for details).

The streamname can be specified at will but can NOT be omitted.

The default port for RTMP is 1935, if some other ports were used, :port must be specified.

Play

via HTTP-FLV
http://example.com[:port]/dir?[port=xxx&]app=appname&stream=streamname
Note
  • If ffplay is used in command line to play the stream, the url above MUST be enclosed by quotation marks, or arguments in url will be discarded (some shells not so smart will interpret "&" as "run in background").

  • If flv.js is used to play the stream, make sure that the published stream is encoded properly, for flv.js supports ONLY H.264 encoded video and AAC/MP3 encoded audio.

The dir is used to match location blocks in http block (see below for details).

The default port for HTTP is 80, if some other ports were used, :port must be specified.

The default port for RTMP is 1935, if some other ports were used, port=xxx must be specified.

The value of app (appname) is used to match an application block, but if the requested app appears in several server blocks and those blocks have the same address and port configuration, host name matches server_name directive will be additionally used to identify the requested application block, otherwise the first one is matched.

The value of stream (streamname) is used to match the name of published stream.

Example

Assume that listen directive specified in http block is:

http {
    ...
    server {
        listen 8080; #not default port 80
        ...

        location /live {
            flv_live on;
        }
    }
}

And listen directive specified in rtmp block is:

rtmp {
    ...
    server {
        listen 1985; #not default port 1935
        ...

        application myapp {
            live on;
        }
    }
}

And the name of published stream is mystream, then the url of playback based on HTTP is:

http://example.com:8080/live?port=1985&app=myapp&stream=mystream
Note

Since some players don't support HTTP chunked transmission, it's better to specify chunked_transfer_encoding off; in location where flv_live on; is specified in this case, or play will fail.

via RTMP
rtmp://example.com[:port]/appname/streamname
via HLS
http://example.com[:port]/dir/streamname.m3u8
via DASH
http://exam

readme truncated — read the full docs on github

Frequently asked questions

Is nginx-http-flv-module free to use?

nginx-http-flv-module is open source under the BSD-2-Clause licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does nginx-http-flv-module do?

A media streaming server based on nginx-rtmp-module. In addtion to the features nginx-rtmp-module provides, HTTP-FLV, GOP cache, VHosts (one IP for multi domain

What is nginx-http-flv-module written in?

nginx-http-flv-module is primarily written in C. Its source is publicly available at https://github.com/winshining/nginx-http-flv-module, and it has 2,933 GitHub stars.