Video Streaming

Setting up a video streaming service.

Streaming Server Setup

Looked at Adobe’s FMS, Red5 and nimble. Both FMS and Red5 required java to be installed. Adobe’s product appeared to require more resources than Red5. Found nimble to be the best. It has native Linux packages.


Nimble provides dynamic HLS streaming of mp4 and mp3 files as well as dynamic DASH streaming of mp4 files. It can also provide streaming of other video files however this is done via progressive download.

See nimble site for full details

It is easily installed use Linux standard package tools. Basically adding their repository and using standard installs (apt, yum).

See installing nimble for details.

You can choose to register your server with WMSPanel in order to configure your server via their interface or you can manually edit the /etc/nimble/rules.conf.

Signing up provides a free trial for 1 month. It has configuration and monitoring features. I only used the configuration feature to generate various versions of the rules.conf file and then manually edited them.

Samples rules:


Nimble listens on port 8081 by default. I’ve setup an apache proxy to forward a virtual host on port 80 to this port.

Now setup a player such as jwplayer, bitcodin with the HLS and/or DASH playlist and a fallback progressive stream to the raw video:

<div id='my-video'></div>
<script type='text/javascript'>
 playlist: [{
 image: "http://YOURSERVER/YOURIMAGE",
 sources: [{ 
 height: 360,
 width: 640,
 startparam: "start",

DASH video is provided with the URL "http://YOURNIMBLESERVER:YOURNIMBLEPORT/vod/YOURVIDEO//manifest.mpd"


There are a number of free players that will handle progressive streaming among them jwplayer, flowplayer etc.

With nimble providing HLS and DASH streaming, we needed a free one that handles these formats. Jwplayer handles it but you have to pay extra.

A free one that handles all these is the player from bitcodin.


Our video site choice was Clipbucket. PHPMotion was another excellent choice but required PHPShield installed. On our owned host we could have done this but to stay flexible we wanted a solution that could be ported to a hosting provider. Another not as robust video script can be found at

Note: Clipbucket is known to have some security holes. Check their forums for updates. One known one is:

This Metasploit module exploits a vulnerability found in ClipBucket version 2.6 and lower. The script "/admin_area/charts/ofc-library/ofc_upload_image.php" can be used to upload arbitrary code without any authentication. Remove this file.

Some fixes to ClipBucket during Install

Call to undefined method ADODB_mysq
Change require 'adodb/';
require $_SERVER['DOCUMENT_ROOT'].'/includes/adodb/';
in cb_install/db_connect.php and.or includes/dbconnect.php

Turn off PHP Warnings


in includes/common.php or set

define(‘DEBUG_LEVEL’, 0);

Some Tips From their Forum

Did you know it is possible to block non authenticated users from going to a specific page of your Clip-Bucket powered website? Well yeah! You can redirect non authenticated users to the sign up page automatically if you set this short code in your pages.

1.  Open the PHP file of any of the pages you would like to prevent guests from entering.

2. After loading the config file, usually something like this:

require 'includes/';

3. Add the following code:


Custom Player

The Clipbucket 2.6 players cannot handle streaming protocols, so we created a custom player using JWPlayer.

Setting up custom players is outlined on the Clipbucket site.

We created player/jwplayer6 directory and downloaded JWPlayer components into it.
README.html jwplayer.flash.swf jwplayer.html5.js jwplayer.js

Using the intructions from Clipbucket we then created jwplayer6.php file.

 Player Name: JW Player v6
 Description: Jw player for clipbucket from
 ClipBucket Version: 2
 Plugin Version: 1.0 - JW 6
 function jwplayer6($data)
$vdata = $data['vdetails'];
$vid_file = get_video_file($vdata,$no_video,false);
$width = $data['width'];
 $height = $data['height'];
 $image = "/files/thumbs/" . $vdata['videokey'];
 $DivId = $data['player_div'] ? $data['player_div'] : config('player_div_id');
//echo "<h4>$vid_file $image $DivId</h4>";
//<script src=""></script>
 echo <<<EOD
 <script src="/player/jwplayer6/jwplayer.js" ></script>
 <div id='$DivId'></div>
 <script type='text/javascript'>
 file: '$vid_file',
 width: '$width',
 height: '$height',
 image: '$image'
 return " ";
 return false;

Leave a Reply