FAQ

Page Discussion History

HttpMp4Module

Revision as of 13:43, 3 November 2011 by Ensiferous (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Contents

Synopsis

This module enables mp4 streaming with seeking ability. This module is not compiled by default and must be specified using

--with-http_mp4_module

as an argument to configure when compiling Nginx. Note that this module is only supported in nginx version 1.1.3 and higher in development branch and 1.0.7 in stable branch.

Example usage:

location /video/ {
    mp4;
    mp4_buffer_size     1m;
    mp4_max_buffer_size 5m;
}


Directives

mp4

syntax: mp4 [on|off]

default: off

context: location

Enables the mp4 streaming feature.

location /video {
    mp4 on; 
}

mp4_buffer_size

syntax: mp4_buffer_size size

default: 512K

context: http, server, location

Sets the buffer size used for processing mp4 file.

mp4_max_buffer_size

syntax: mp4_max_buffer_size size

default: 10M

context: http, server, location

Sets the maxium buffer size used for processing mp4 file. If the meta data exceeds this size Nginx will return a 500 status code and log an error resembling the following:

"/video/file.mp4" mp4 moov atom is too large:
12583268, you may want to increase mp4_max_buffer_size

References

Please see the following page for more details: http://nginx.org/en/docs/http/ngx_http_mp4_module.html