MP4 Streaming Lite


mod_mp4_streaming_lite - seeks a certain time within H.264/MP4 files when provided when a “start” parameter is provided in the URL.

This module is written by Jiang Hong. You can contact him for a full (but commercial) version which supports a wider variety of MP4 files.

The most recent package can be downloaded here:


This module is not distributed with the NGINX source. See the installation instructions.

Revision History

  • 12/28/2008
    • more return value checks (reported by Jan Ślusarczyk).
  • 12/05/2008
    • An ‘off-by-one’ bug fixed.
  • 11/20/2008
    • Another Content-Length bug fixed.
  • 11/13/2008
    • directio-related bug fixed.
    • The access denials and pread() errors, which caused by an uninitialized variable, are fixed.
  • 11/01/2008
    • start=0 (or 0.0) was allowed in order to send the re-indexed whole file.
    • a directio-related neglect was fixed.
    • mp4_directio directive was removed and the module now follows the server-wide directio setting.
    • Content-Length calculation bug was fixed. Thanks go to Nick Melnikov.




Enable MP4 streaming at a particular location.


Download the tarball as described above and tar jx it.

After extracting, add the following option to your NGINX ./configure command:


By default, NGINX uses -O to compile the source code. You should use:


with ./configure to retrieve maximum performance.


More widely MP4 files supported can be found here:

And you may ask arjen for help if you have some questions