ViMP – Upgrading From Version 2.2.x to 2.5 (Ubuntu Server 10.4 Lucid)

Yesterday I finally upgraded ViMP Community Edition to 2.2.x and so today I am upgrading to 2.5.x.

At the time of writing the latest version of ViMP is vimp.framework-2.5.4-r19900-community.tar.gz – which can be downloaded from here.

For clarification my system variables are as follows (obviously you may need to change them if yours are different):

  • ViMP installation directory – /var/www/showvid/data/
  • MySQL user – root
  • MySQL ViMP database – showvid

The upgrade process was as follows.

First backup the ViMP directory and copy the ViMP tarball to your server.

Copy the tarball to /var/www/showvid/data:

sudo cp vimp.framework-2.5.4-r19900-community.tar.gz 

Change directory to /var/www/showvid/data/:

cd /var/www/showvid/data/

Extract the vimp-framework tarball:

sudo tar xvzf vimp.framework-2.5.4-r19900-community.tar.gz

Delete lib/auth/stAuthProvider.php

cd /lib/auth/
sudo rm stAuthProvider.php

Next we need to run the data/sql/updates.sql file from the ViMP tarball – make sure that you extract the tarball on your computer so that you can import it to your server.

Note: there are other .sql files in the sql folder but they are only used if you have modules installed etc.

Updates.sql can be run from the command line but I found it easier to use phpmyadmin – which can be installed as follows:

sudo apt-get install phpmyadmin

I selected Apache2 as the webserver to reconfigure and then selected No to configure a database for phpmyadmin. Open a browser and open phpmyadmin on your ViMP server: http:\\<server-ip>\phpmyadmin. Log in with root and your mysql password.

Select the showvid database in the left hand panel and then click the import tab. Click the Browse button and select updates.sql in the data/sql folder. Then click the Go button.

Finally change directory to /var/www/showvid/data and rebuild the ViMP installation:

sudo ./symfony rebuild
sudo ./symfony i18:import

I did get an error when I imported updates.sql but ViMP did successfully upgrade.

ViMP – Upgrading From Version 2.1.x to 2.2 (Ubuntu Server 10.4 Lucid)

This post has been in my drafts folder for about a year as I had an unresolved issue trying to upgrade to ViMP version 2.2x. I finally had time to look at it again today and everything went smoothly – and I can’t remember what I did differently when it was not working. Note that I do not have any modules installed in ViMP and so I am not covering how to upgrade them (see here).

For clarification my system variables are as follows (obviously you may need to change them if yours are different):

  • ViMP installation directory – /var/www/showvid/data/
  • MySQL user – root
  • MySQL ViMP database – showvid

The upgrade process was as follows.

First I updated my Ubuntu 10.4 Server:

sudo apt-get update
sudo apt-get upgrade

Next backup the ViMP directory and then download vimp.framework-2.2.1-r19622-community.tar.gz from here.

Copy vimp.2.2.1 to the home directory of your ViMP server and then copy it from the home directory to /var/www/showvid/data:

sudo cp vimp.framework-2.2.1-r19622-community.tar.gz 

Change directory to /var/www/showvid/data/:

cd /var/www/showvid/data/

Delete the lib directory:

sudo rm -Rf lib/

Change directory to config:

cd config/

Delete databases.yml and propel.ini:

sudo rm databases.yml
sudo rm propel.ini

Return to the data directory and delete the contents of the cache directory:

cd ..
sudo rm -Rf cache/*

Extract the vimp-framework tarball:

sudo tar xvzf vimp.framework-2.2.1-r19622-community.tar.gz

Configure the showvid database and rebuild the ViMP installation:

sudo ./symfony configure:database mysql://DBUSER:DBPASSWORD@localhost
sudo ./symfony rebuild
sudo ./symfony i18:import

Here my DBUSER is root and DBNAME is showvid.

Now that I have finally upgraded to 2.2.1 I can start work on upgrading to 2.5.x!

Ubuntu Server – Upgrading VIMP (Community Edition) From 2.0.6 to 2.1.1

ViMP (a video & social media Content Management System) recently released version 2.1.1 (which includes support for mobile devices).

I had previously installed version 2.0.6 (as a virtual machine in VMware vSphere) and thought I would take a look at keeping my ViMP installation up-to-date.

The first step is of course to make a backup in-case the upgrade fails – I simply took a snapshot of my virtual machine as this was the quickest and simplest solution.

First download ViMP version 2.1.1 from here.

Upload ViMP 2.1.1 to your server using WinSCP (Windows) or SSH (Linux).

Now use Putty (Windows) or SSH (Linux) to access the command line interface on your ViMP server.

Copy vimp.framework-2.1.1-r19091-community.tar.gz to your installation folder, in my case this was /var/www/showvid/data:

sudo cp vimp.framework-2.1.1-r19091-community.tar.gz

Change directory and extract ViMP 2.1.1 with the following commands:

cd /var/www/showvid/data
sudo tar xzf vimp.framework-2.1.1-r19091-community.tar.gz

Issue the following commands to upgrade*:

sudo ./symfony rebuild
sudo ./symfony cc

* Note that If you use languages other than English and update from a version < 2.0.7 to a version >= 2.0.7, the following symfony task must also be executed (in between the two commands above):

./symfony i18n:import --clear

You should now be able to log in as admin and see that your ViMP installation is running the new version (under the configuration link).

After the upgrade I found that then when I try to upload video I see an Error in the Admin portal:

+ Problem executing command FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1.1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enabl

I logged in as admin and clicked on Administration then Configuration and then Player and set Enable HTML5-player to False.

Then under the Media tab I clicked Restart Transcoding on the affected uploads and they converted successfully. After this I clicked on Transcode new formats and this appeared to work.

I checked /var/www/showvid/data/logs/framework.convert.log and did not see any errors.

So for now I have just left the HTML5 player disabled and my uploads are working without issue (even if they are not being transcoded to the new formats).

Additional support is available from the ViMP Forum if required.

Souces: ViMP Forum, ViMP Documentation, ViMP Forum

Ubuntu Server 10.4 Lucid – Installing VIMP (Community Edition)

Some time ago I was looking for an open source YouTube clone when I came across something called osTube. When I recently vistited the osTube site again I found that osTube development had been discontinued. Its successor is ViMP which bills itself as the solution for Social Media, Web TV and Video Communities. It has a host of features and the good news (for me) is that it handles H.264/MP4.

Just to be clear though the ViMP Community edition is not open source – the code is encrypted by a PHP encoder called Source Guardian (which must be installed to use ViMP). Hopefully you are OK with that?

You will need to register at the ViMP site to download it (the current version is 2.0.6). Extract the ViMP tar-ball and you will find an Installation Guide for Debian in the doc folder. Most of this guide is good for an Ubuntu installation but we will make some changes for our Ubuntu install.

My starting point is a virtual machine with a minimal Ubuntu Server installation with the SSH role. So, let’s install ViMP:

Fisrt update repositories:

sudo apt-get update

Install nano (terminal based text editor) and wget (file downloader):

sudo apt-get install nano wget

Install Apache2 web server:

sudo apt-get install apache2

Enable mod_rewrite and then restart Apache2:

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

Install PHP5:

sudo apt-get install libapache2-mod-php5

Install additional PHP packages:

sudo apt-get install php5-cli php5-mysql php5-gd php5-xsl php5-curl

Install the MySQL database server:

sudo apt-get install mysql-server

You will be prompted to provide a root password for MySQL. Make a note of this password for later!

Add the Medibuntu repository to your server:

sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list$(lsb_release -cs).list
&& sudo apt-get --quiet update && sudo apt-get --yes --quiet
--allow-unauthenticated install medibuntu-keyring && sudo apt-get
--quiet update

Install the transcoding software:

sudo apt-get install mplayer mencoder ffmpeg flvtool2

Install video codecs for popular proprietary formats:

For 32 bit,

sudo apt-get install w32codecs

or for 64 bit,

sudo apt-get install w64codecs

Create directories for ViMP installation:

sudo mkdir -p /var/www/showvid/data
sudo mkdir -p /var/www/showvid/logs
sudo chown -R www-data:www-data /var/www/showvid

Create a configuration file for the Apache virtual host:

cd /etc/apache2/sites-available
sudo nano showvid

Copy and paste the following into the /etc/apache2/sites-available/showvid file you just created:

<VirtualHost *:80>
DocumentRoot "/var/www/showvid/data/web"ServerName
<Directory "/var/www/showvid/data/web">
AllowOverride All
RewriteEngine On
Options -Indexes FollowSymLinks
ErrorLog /var/www/showvid/logs/error.log
CustomLog /var/www/showvid/logs/access.log combined
LogLevel error

Save the file  and exit nano.

Enable the showvid virtual host and restart Apache:

sudo a2ensite showvid
sudo /etc/init.d/apache2 reload

Disable the default virtual host and restart Apache:

sudo a2dissite default
sudo /etc/init.d/apache2 reload

Next we need to configure some PHP values. Edit both of the files listed below and change the upload_max_filesize, post_max_size and memory_limit values as per the bullet points:

sudo nano /etc/php5/apache2/php.ini
sudo nano /etc/php5/cli/php.ini

• upload_max_filesize = 1024M
• post_max_size = 1024M
• memory_limit = 512M

Restart Apache:

sudo /etc/init.d/apache2 restart

Create a MySQL database called showvid:

sudo mysqladmin -p create showvid

Enter your MySQL password.

Enter the MySQL console as the root user:

mysql -u root -p

Enter your MySQL password again. You should now be at the MySQL prompt:


Create a user called showvid. Change <password> in the first command below to a strong password for the showvid user. Make a note of this password.

CREATE USER showvid@localhost IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON showvid.* TO showvid;

Change directories to your user directory:

cd /home/<username>/

Upload ViMP to your server – I used WinSCP to do this.

Copy the ViMP tar-ball to /var/www/showvid/data/ and then extract it:

sudo cp vimp.framework-<version>.tar.gz  /var/www/showvid/data/
cd /var/www/showvid/data/
sudo tar xvzf vimp.framework-<version>.tar.gz
sudo rm vimp.framework-<version>.tar.gz

Make the symfony file in /var/www/showvid/data/ executable:

sudo chmod +x symfony

At this point we would normally be able to execute the symfony file but because we are using the Community edition of ViMP we must install SourceGuardian. To do this we will need to know the version of PHP that we have installed:

php -v

Now that we know what version of PHP we are using we can copy and extract the Source Guardian loaders that are supplied with ViMP.

First create a temporary directory to work in:

cd /home/<username>/
mkdir temp
cd temp/

Now extract the file /var/www/showvid/data/data/loader.tar.gz to the current directory:

tar xfz /var/www/showvid/data/data/loader.tar.gz

For the next step you will need to look in either the Linux_x86-32 folder (if your installation is 32 bit) or the Linux_x86-64 folder (for 64 bit). Assuming that you are running PHP 5.3.2 like me you will want the Source Guardian ixed.5.3.lin loader file .

Now that we have matched a loader to our version of PHP we need to make a folder in /usr/lib/php5/ that we can copy the Source Guardian loader to.  The format of the folder is year, month, date +lfs. I don’t think that it really matters what date we choose, so I used the one provided in the Debian installation guide:

sudo mkdir /usr/lib/php5/20060613+lfs

Copy the loader file ixed.5.3.lin to the /usr/lib/php5/20060613+lfs/ folder:

sudo cp Linux_x86-32/ixed.5.3.lin /usr/lib/php5/20060613+lfs/

Create a Source Guardian configuration file:

sudo nano /etc/php5/conf.d/sourceguardian.ini

Add the following two lines to sourceguardian.ini:

Restart Apache:

sudo /etc/init.d/apache2 restart

Source Guardian installation is now complete.

Change directory back to /www/showvid/data and run symfony – just make sure that you change <password> to the password you defined for the showvid user earlier on:

cd /var/www/showvid/data
sudo ./symfony framework:init mysql://showvid:<password>@localhost

Finally we need to set up a cronjob that runs every minute to convert uploaded videos to the right format. Edit the crontab:

sudo crontab -e

Copy and paste the following line at the bottom:

*/1 * * * * /var/www/showvid/data/scripts/ > 
/dev/null 2>&1

You can now access ViMP with a web browser. The password for the admin account is ‘admin’ – so you might want to change that after you log in.

That’s it, now sit back and enjoy your own video community!

solution for Social Media, Web TV and Video Communities