arut/nginx-rtmp-module — pull request #431 by stephenbasile (2014-07-05 15:54:13+00:00)
Title: HTTP Dynamic Streaming Support

Adds support for HTTP Dynamic Streaming (HDS).

This feature was developed specifically to work with OSMF's HDS support. Other implementations may work but have not been tested. To get a quick test going I recommend Strobe Media Playback.

### Codecs
H.264 video is supported.
AAC, MP3 and Nellymoser audio are supported.

Adds the following directives:

## HDS

#### hds
Syntax: `hds on|off`
Context: rtmp, server, application

Toggles HDS on the application.

hds on;
hds_path /tmp/hds;
hds_fragment 15s;

In `http{}` section set up the following location for clients to play HDS.

http {
...
server {
...
location /hds {
types {
text/xml f4m;
}
root /tmp;
add_header Cache-Control no-cache;
}
}
}

#### hds_path
Syntax: `hds_path path`
Context: rtmp, server, application

Sets HDS playlist and fragment directory.

#### hds_fragment
Syntax: `hds_fragment time`
Context: rtmp, server, application

Sets HDS fragment length. Defaults to 5 seconds.

#### hds_playlist_length
Syntax: `hds_playlist_length time`
Context: rtmp, server, application

Sets HDS playlist length. Defaults to 30 seconds.

hds_playlist_length 10m;

#### hds_continuous
Syntax: `hds_continuous on|off`
Context: rtmp, server, application

Toggles HDS continuous mode. In this mode HDS fragment number
and timestamps are started from where they stopped after the last publish. Default is on.

hds_continuous off;

#### hds_cleanup
Syntax: `hds_cleanup on|off`
Context: rtmp, server, application

Toggles HDS cleanup. By default the feature is on.
In this mode nginx cache manager process removes old
HDS fragments, bootstrap files and manifests from HDS directory.

hds_cleanup off;