Add MP4 streaming Media support for Nginx _nginx

Source: Internet
Author: User

These two days to do the video things found Nginx no MP4 video streaming module, today I added a bit, because before is compiled good, so I directly added!

Download

Copy Code code as follows:

#下载解压
wget wget http://h264.code-shop.com/download/nginx_mod_h264_streaming-2.2.7.tar.gz
Tar zxf nginx_mod*.tar.gz

Configuration add

Copy Code code as follows:

#查看编译参数
/usr/local/nginx/sbin/nginx-v
#进入nginx (tengine) Source directory
CD tengine*
./configure--add-module=. /nginx_mod_h264_streaming-2.2.7 \
--user=www--group=www \
--prefix=/usr/local/nginx \
--with-pcre
#只需make不需要make Install
Make

Configuration

Copy Code code as follows:

Mv/usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.old
CP Objs/nginx/usr/local/nginx/sbin/nginx
#配置配置文件
Vim/usr/local/nginx/conf/nginx.conf
Location ~ \.mp4$ {
mp4;
}
#测试
/usr/local/nginx/sbin/nginx-t
#平滑重启
/usr/local/nginx/sbin/nginx-s Reload

Need to modify the configuration of the place is quite a lot of small partners to look at carefully, do not miss out.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.