ClipBucket, ClipBucket v2

Multi Server Setup – Instructions and User Guide

ClipBucket Multiserver let you transfer your video files and encoding process to different servers. Currently we have only 1 model.

C = Conversion Server
U = Uploading Server
S = Streaming Server
A = Application Server

Note : Every Model has same application server so i will not explain how application server works.

Available Models

A → UCS ( In this model, additional server is used for uploading, conversion and also for streaming)

* Files Directly uploaded to UCS
* USC then convert the files, multiple files can be converted at same time and it can be changed.
* UCS , if configured properly, will also produce HQ/HD video and mobile video
* Once conversion is completed, it sends back conversion status back to A server which verifies the details and update video details for streaming.

We are working on more models
A → U → CS (in this model, files will be uploaded to U , it will then transfer files to CS server after verifying its status, then CS will convert and stream videos)
A → US → C → US (In this model , files will be uploaded to US server, which will forward files to C server , after conversion it will send back video files to US server for streaming)
A → U → C S (In this model, files will be uploaded to U server, which will forward it to C server, which forward it to S server, S server can be CDN )


* FFMPEG with libx264 – Read this blog for how to setup proper ffmpeg
* Flvtool2 or Flvtool++ (we recommend flvtool++)
* Mplayer (optional but we recommend it for thumb generation)
* MP4Box (required for Mp4 hq and hd videos)
* PHP 5.2 or greator with CLI and CURL support
* PHPShield (ixed loaders)

Multi Server Setup Guide

* First you need to download multiserver package from your client area and obtain a valid license.
* Extract Zip and you will have to folders “application server” and “conversion server”

important note : You Don’t Have To Install ClipBucket On Additional Servers

Installing Plug-in on Application Server

* Upload files to clipbucket plugins directory
* Goto admin area > Plugins Manager > Install ClipBucket Multiserver plugin

Plugin Upload Directory

* Once installation is done, goto Multi Server > Configuration and Enter your license key
Now your application server is ready
Setting Up UCS server (Model 1)
* in your html directoty, create new directory, server1 or whatever you like, upload all content of ‘conversion server/api’ to this folder, this file should work => this should say “ERROR”

Server Upload Preview

* Now edit config.php and edit following code accordingly

Static Variable Purpose
BASEDIR basedirectory of your additional server api, in my case its ‘/var/www/html/clipbucket/server1’
BASEURL base url of your api , in my case its http://mylocalhost/clipbucket/server1
PHP_PATH path to your php binaries
KEEP_MP4_AS_IS if uploaded file is Mp4, convert it or not.
MP4Box_BINARY path to MP4Box Binaries
FLVTool2_BINARY path to flvtool2 binaries
FLVToolPP_BINARY path to flvtool++ binaires, its very fast and lightweight as compare to flvtool2, if you enter its path, it will automatically override flvtool2 role, read more about it here
MPLAYER_BINARY path to mplayer binaries, on large scale Mplayer is highly efficient in generating thumbs, as compare to ffmpeg , generating 1 hour video thumbs can take upto 2 hours, but mplayer can do this within seconds
USE_MPLAYER Use Mplayer for thumb generation or not
FFMPEG_BINARY path to ffmpeg binaries
ALLOWED_SERVER Ip address of your Application Server, its for securit purpose so any other server cannot link with your server
SECRET_KEY Its for authentication purpose, choose a special secret key, use computer generated key. here is the one.
– I used abcd1234 for demonstration purpose
CALLBACK_URL callback URL of your application, where conversion server will send details to, in my case its http://applicationhost/clipbucket/plugins/cb_multi_server/api/call_back.php

Finally Adding A Server

* Now goto your application server admin area, in my case its http://applicationhost/clipbucket/admin_area
* Multi Servers > Manage Servers > Add New Server

Option Purpose
* are required
Server Name* Name your additional server, it can anything.
Server IP* Ip address of your server
Server Api Path* path to your server api, the same as baseurl we set in config.php , in my case http://mylocalhost/clipbucket/server1
Secret Key* For Authentication Purpose, already told you before, in my case it was abcd1234
Max Usage* How much space you allow to upload videos, in Gigabytes
Status Set your multiserver status, set Active to make it fully functional

ClipBucket multiserver allowed you to mass upload videos on multiservers via FTP, you need to configure it properly

Option Purpose
FTP Host Your ftp host for connection
FTP User Your ftp username
FTP Pass Your password
FTP Port mostly its 21 but depends on your configurations
FTP Dir path to ‘temp’ directory of your server api, my server api is placed in /var/www/html/clipbucket/server1 and when i connect to my ftp, it takes me to /html directoty. i have set my FTP dir value to /clipbucket/server1/files/temp

If your details are correct, your server will be added otherwise it will display error.

Now , i am hopeful that your server will be added, if you need more help you can contact

Editing Template

there is still 1 last step left and its simple.

* open global_header.html of your template , by default /styles/cbv2new/layout/global_header.html


flash_url : "{$js}/swfupload/swfupload.swf",
upload_url: "{$baseurl}/actions/file_uploader.php",

replace with

{assign var="get_api_server" value=$multi_server->get_server_api()}
{if $get_api_server}
    flash_url : "{$get_api_server.server_api_path}/js/swfupload/swfupload.swf",
    upload_url: "{$get_api_server.server_api_path}/actions/file_uploader.php",
    flash_url : "{$js}/swfupload/swfupload.swf",
    upload_url: "{$baseurl}/actions/file_uploader.php",

Now your multiserver is ready, upload some videos and see what you get.


Q: how to limit the concurrent converting process ?
A : you have to do it manually by editing ffmpeg.class on conversion server , file path is ‘/includes/classes/conversion/ffmpeg.class.php’ in this , change PROCESSESS_AT_ONCE from 4 to whatever you like

Q: Multiserver keep using same server for uploading and conversion, whats wrong?
A: There is nothing wrong, clipbucket prioritize based on its space left. one with more space will be used often then the one which has low space.

For Troubleshooting or Assistance , Please contact

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.25 out of 5)