Home > Operation and Maintenance > Nginx > How to add mp4 streaming support to Nginx

How to add mp4 streaming support to Nginx

王林
Release: 2023-05-12 09:07:05
forward
2192 people have browsed it

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

How to add mp4 streaming support to Nginx

#There are quite a lot of configuration changes that need to be made, friends, please look carefully and don’t miss them.

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template