2

I need to add the following module to my app. ngx_http_mp4_module This is in order to pseudo-stream flash videos with mediaelement.

I am not sure how to proceed with this. Any guidance would be great.

ShivamD
  • 931
  • 10
  • 21

1 Answers1

4

I was struggling over the same thing, it turns out it was very easy to fix with a single apt-get command.

Easy way: (On ubuntu); Before:

$ nginx -t 
nginx: [emerg] unknown directive "mp4" in /etc/nginx/sites-enabled/www.domain.eu:38 
nginx: configuration file /etc/nginx/nginx.conf test failed

Apt-get the nginx-extras

$ sudo apt-get install nginx-extras

After

$ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

(then, 'nginx -s reload' to activate as normal)

Other way: Nginx Modules need to be included at compile time From: http://nginx.org/en/docs/http/ngx_http_mp4_module.html

This module is not built by default, it should be enabled with the --with-http_mp4_module configuration parameter.

This answer goes a long way to explain how to do it: https://serverfault.com/questions/342358/nginx-add-enable-mp4-module and also gave me the apt-get nginx-extras solution I was looking for.

Community
  • 1
  • 1
Steve Root
  • 368
  • 3
  • 13