Video on demand in NGINX RTMP

Today I’ve finished implementing Video-on-Demand feature. It already in master branch and tagged ‘v0.2.0’. From now it’s possible to stream FLV files through nginx-rtmp. Syntax is obvious

application {
play /var/flvs;

Where /var/flvs contains actual files to play. Subdirectories are supported as well.

One thing to mention is indexing FLVs. Indexed FLVs can be played with random seek and pause support. They contain list of all keyframes and offsets. Seeking is fast in this case. Unindexed FLVs have no such list. In theory it’s still possible to seek such files. However it can be extremely slow because the whole file might be scanned to find the required position to play. This is not supported in nginx-rtmp which is intended to be a high-load solution.

FLVs recorded with the module are NOT indexed. You can use FLV metadata indexer (like Yamdi: to index it.

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: