Download
Copy code The code is as follows:
#Download and decompress
wget wget
tar zxf nginx_mod*.tar.gz
Configuration addition
Copy code The code is as follows:
#View compilation parameters
/usr/local/nginx/sbin/nginx -v
#Enter the nginx (tengine) source code directory
cd tengine*
./configure --add-module=../nginx_mod_h264_streaming-2.2.7 \
. Group = www \
-prefix =/usr/local/nginx \
--With-pcre
# just need make instant
#Configuration
Copy code The code is as follows:mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.old
cp objs/nginx /usr/local/nginx/sbin/nginx
#Configuration configuration file
vim /usr/local/nginx/conf/nginx.conf
location ~ \.mp4$ {
mp4;
}
#Test
/usr/local/nginx/sbin/nginx -t
#Smooth restart
/usr/local/nginx/sbin/nginx -s reload
The above is the detailed content of How to add mp4 streaming support to Nginx. For more information, please follow other related articles on the PHP Chinese website!