0
点赞
收藏
分享

微信扫一扫

Nginx+Jwplayer播放流媒体视频

Nginx+Jwplayer播放流媒体视频

JWPlayer is one of the most popular video players on the Internet. It is used by most modern “tube” websites for video hosting, publishing and advertising. It can be used as standalone in your HTML and Flash code, or integrated into any popular CMS like WordPress, Joomla, and others.


Today I’m going to show you how to setup Nginx Video Streaming with Jwplayer. In order to start you will need root access to your VPS or Dedicated server, if you need a reliable and good Nginx hosting, you can try this two companies:


A Small Orange

A2 Hosting

If you already have your Hosting purchased, then let’s continue:


Install Nginx on CentOS



wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
rpm -i nginx-release-centos-6-0.el6.ngx.noarch.rpm
yum install nginx -y
service nginx start
chkconfig nginx on

Download JWPlayer at Nginx documentroot

Get the latest version from http://www.jwplayer.com/, example:


cd /usr/share/nginx/html
wget https://account.jwplayer.com/static/download/jwplayer-6.8.zip
unzip jwplayer-6.8.zip

Now you have JWPlayer installed in your Nginx web server. So, it’s time to create a HTML to include our beloved JWPlayer to make all the magic:


Download a FLV video file



cd /usr/share/nginx/html
wget http://developer.longtailvideo.com/trac/export/944/trunk/html5/test/files/bunny.flv
Create a HTML file to include JWPlayer and the FLV video



nano -w /usr/share/nginx/html/jwplayer.html

Then place this code inside:


Loading JWPlayer…

Testing Nginx Streaming with JWPlayer


Try to browse http://your.ip.address/jwplayer.html and you should see your Nginx webserver streaming a perfectly FLV video usign JWPlayer. Replace “your.ip.address” with your real IP address (public or private) and you should see something like this:



举报

相关推荐

流媒体播放器

0 条评论