Difference between revisions of "Distributed Multimedia Database System Phase 2"

From Giss
Line 39: Line 39:
 
If you have installed a version 1.0, you will need to do the following to the database, not  
 
If you have installed a version 1.0, you will need to do the following to the database, not  
 
to recreate it from scratch :
 
to recreate it from scratch :
 +
 +
Create data for the view counter :
  
 
  mysql> alter table media add column viewed int(10) not null default 0;
 
  mysql> alter table media add column viewed int(10) not null default 0;
Line 44: Line 46:
 
  mysql> insert into blocks values (NULL,'most_viewed','video',2,8,397,100,1,<user id>,NULL);
 
  mysql> insert into blocks values (NULL,'most_viewed','video',2,8,397,100,1,<user id>,NULL);
 
  for users you have created before
 
  for users you have created before
 +
 +
Create data for the favorites :
  
 
  mysql> CREATE TABLE `favorites` (
 
  mysql> CREATE TABLE `favorites` (
Line 55: Line 59:
  
 
  mysql> insert into blocks values (NULL,'favorites','video',2,9,397,100,1,<user id>,NULL);
 
  mysql> insert into blocks values (NULL,'favorites','video',2,9,397,100,1,<user id>,NULL);
 +
for users you have created before
 +
 +
Create data for the playlists :
 +
 +
mysql> CREATE TABLE `playlist` (
 +
    ->  `ID` int(4) unsigned NOT NULL auto_increment,
 +
    ->  `name` text collate utf8_bin NOT NULL,
 +
    ->  `base_url` varchar(256) collate utf8_bin NOT NULL,
 +
    ->  `media_id` int(4) NOT NULL,
 +
    ->  UNIQUE KEY `ID` (`ID`)
 +
    -> ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
 +
 +
mysql> insert into blocks values (NULL,'playlists','video',2,10,397,100,1,<user id>,NULL);
 
  for users you have created before
 
  for users you have created before

Revision as of 06:31, 15 March 2009

Context And Goals

Due to the interest of G.I.S.S. users in the mediabase component version 1.0 released previously, as a real alternative to public systems like YouTube or Vimeo, improvements should be made to the actual mediabase version 1.0, to include more features like playlists, favorites, ...

Setting up the next developments

To achieve a number of new features like playlist or annotations, we first had to modify the cortado with additional functionalities :

  • Access to the timestamp of the video played from javascript :
Cortado = document.getElementById("cortado");
timecode = Cortado.getPlayPosition(); 
  • Call to an external javascript function when the end of the video is reached :
<applet code="com.fluendo.player.Cortado.class" archive="cortado-ovt-debug-giss.jar" height="240" width="320" MAYSCRIPT>
<param name="endCallback" value="nextTrack();"> 
  • We also found that to play videos more easily, the cortado applet should be modified to play several video at the same time.

The code has been modified so that Cortado can create more than one pipe-line.

For using these features, you will need to download the [Giss Cortado], which is based on Cortado 0.2.2.

CVS version of cortado G.I.S.S.

The G.I.S.S. cortado can be obtained through CVS :

export CVSROOT=:pserver:anonymous@giss.tv:/home/cvs
cvs co cortado-giss

Adding of new blocks and funcionalities

  • Added a block of most viewed videos on the channel, updating the counter through ajax when a video is requested
  • Added a voting system and a block of favorite videos

Migration from version 1.0

If you have installed a version 1.0, you will need to do the following to the database, not to recreate it from scratch :

Create data for the view counter :

mysql> alter table media add column viewed int(10) not null default 0;
mysql> insert into blocks values (NULL,'most_viewed','video',2,8,397,100,1,<user id>,NULL);
for users you have created before

Create data for the favorites :

mysql> CREATE TABLE `favorites` (
   ->   `ID` int(4) unsigned NOT NULL auto_increment,
   ->   `channel` varchar(256) collate utf8_bin NOT NULL,
   ->   `base_url` varchar(256) collate utf8_bin NOT NULL,
   ->   `media_id` int(4) NOT NULL,
   ->   `votes` int(4) NOT NULL DEFAULT 0,
   ->   UNIQUE KEY `ID` (`ID`)
   -> ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
mysql> insert into blocks values (NULL,'favorites','video',2,9,397,100,1,<user id>,NULL);
for users you have created before

Create data for the playlists :

mysql> CREATE TABLE `playlist` (
   ->   `ID` int(4) unsigned NOT NULL auto_increment,
   ->   `name` text collate utf8_bin NOT NULL,
   ->   `base_url` varchar(256) collate utf8_bin NOT NULL,
   ->   `media_id` int(4) NOT NULL,
   ->   UNIQUE KEY `ID` (`ID`)
   -> ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
mysql> insert into blocks values (NULL,'playlists','video',2,10,397,100,1,<user id>,NULL);
for users you have created before