ScaleScaleScaleScale

Tips / Nginx


Nginx Video Streaming with Jwplayer

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:

Nginx streaming JWPlayer

Popular search terms:

  • jwplayer nginx
  • download jwplayer
  • download jwplayer stream
  • jw player download
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking