VPS侦探论坛
标题:
lnmpa如何支持mp4视频播放?
[打印本页]
作者:
wanchuan666
时间:
2015-7-12 16:05
标题:
lnmpa如何支持mp4视频播放?
如题, 网站需要支持 mp4播放,可是配置了 nginx后mp4也是无法播放 是不是还需要配置apache? 或者应该咋配置 ,请大神帮助,万分感谢!
作者:
licess
时间:
2015-7-13 10:50
编译上mp4模块了吗,nginx配置文件里加上mp4模块的配置了没
作者:
wanchuan666
时间:
2015-7-13 13:43
[root@VM_45_67_centos ~]# nginx -V
nginx version: nginx/1.6.0
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
TLS SNI support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-http_mp4_module --with-http_flv_module
我已经加上了 mp4模块
server
{
listen 80 default;
#listen [::]:80 default ipv6only=on;
server_name www.lnmp.org;
index index.html index.htm index.php;
root /mnt/wwwroot;
location / {
try_files $uri @apache;
location ~ \.flv$
{
flv;
}
location ~ \.mp4$
{
mp4;
mp4_buffer_size 1m;
mp4_max_buffer_size 5m;
}
}
这里也加上了,但代码<object declare id="pa_st_5000.3gp" data="http:自己制定网页的mp4" type="video/3gpp">
</object>
这种形式的就不行。
作者:
licess
时间:
2015-7-13 21:40
不清楚你这种调用方式是否正确,再就是你调用代码里面的文件后缀不在你设置的配置里
mp4的location应该放到第一个上
欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/)
Powered by Discuz! X3.4