Difference between revisions of "Distributed Multimedia Database System Phase 2"
(→CVS version of cortado G.I.S.S.) |
(→Adding of new blocks and funcionalities) |
||
(23 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Context And Goals = | = 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, ... | + | 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, subtitles, ... |
= Setting up the next developments = | = Setting up the next developments = | ||
− | To achieve a number of new features like | + | To achieve a number of new features like playlists or annotations, we first had to modify the cortado with additional functionalities : |
* Access to the timestamp of the video played from javascript : | * Access to the timestamp of the video played from javascript : | ||
Line 17: | Line 17: | ||
<param name="endCallback" value="nextTrack();"> | <param name="endCallback" value="nextTrack();"> | ||
− | For using these features, you will need to download the [[http://giss.tv/dmmdb/cortado/cortado-ovt- | + | * 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 instance. | ||
+ | |||
+ | * Another thing missing in Cortado was the support for 16/9 format, | ||
+ | That was requested by some dmmdb 1.0 users, | ||
+ | it has been implemented in dmmbd 2.0. | ||
+ | |||
+ | '''Warning''' : if you want your videos to be uploaded in 16x9 format, you have to set upload dimensions in dmmdb to a 16/9 format, | ||
+ | like it is done in [[http://giss.tv/dmmdb16 Giss 16/9]] | ||
+ | |||
+ | There the settings are ( in config.php ) : | ||
+ | |||
+ | $config['videowidth'] = "480"; | ||
+ | $config['videoheight'] = "272"; | ||
+ | |||
+ | So, if you want to upload 16/9 videos to GISS server, you have to use http://giss.tv/dmmdb16. | ||
+ | |||
+ | * A few additional facilities have been added like a volume control and the displaying of video duration. | ||
+ | |||
+ | For using these features, you will need to download the [[http://giss.tv/dmmdb/cortado/cortado-ovt-stripped-giss.jar Giss Cortado]], | ||
which is based on Cortado 0.2.2. | which is based on Cortado 0.2.2. | ||
Line 26: | Line 45: | ||
cvs co cortado-giss | cvs co cortado-giss | ||
− | = Adding of new blocks and | + | = Adding of new blocks and functionalities = |
+ | |||
+ | * Added a block of most viewed videos on the channel, updating the counter through ajax when a video is requested : | ||
+ | |||
+ | [[Image:Dmmdb-viewed.png]] | ||
+ | |||
+ | * Added a voting system and a block of favorite videos : | ||
+ | |||
+ | [[Image:Dmmdb-favorites.png]] | ||
+ | |||
+ | = Support for playlists = | ||
+ | |||
+ | In version 2.0, each canal can administrate his own playlists containing local and remote media files, see : | ||
+ | |||
+ | [[Image:Dmmdb-playlist.png]] | ||
+ | |||
+ | = Support for annotations/subtitles = | ||
− | + | This functionality can be used to import/export subtitles files in .srt format as well as a tool for on-line annotations of media. | |
− | + | In each channel, a choice called 'ANNOTATE MEDIA' has been added to the admin menu to be able to edit the annotations/subtitles. | |
+ | |||
+ | This choice is in the admin menu and is reserved to the publisher of the media, the current annotations/subtitles can be downloaded from the main page and is accessible to everyone naturally. | ||
+ | |||
+ | [[Image:Dmmdb-subtitles.png]] | ||
+ | |||
+ | = Release of an official Release Candidate : dmmdb 2.0 RC1 = | ||
+ | |||
+ | The version of dmmdb 2.0 is available here ( version 2.0 RC1 ) : | ||
+ | |||
+ | [http://giss.tv/dmmdbp/dmmdb-2.0-rc1.tar.gz dmmdb-2.0-rc1] | ||
+ | |||
+ | You can also obtain the current version of dmmdb through CVS : | ||
+ | export CVSROOT=:pserver:anonymous@giss.tv:/home/cvs | ||
+ | cvs co dmmdb | ||
+ | |||
+ | '''Warning''' : it is not fully compatible with version 1.0, | ||
+ | so if you have a version 1.0 installed, | ||
+ | you should upgrade the code and following the procedure below to adapt your database ( see next section ). | ||
= Migration from version 1.0 = | = Migration from version 1.0 = | ||
Line 37: | Line 90: | ||
to recreate it from scratch : | to recreate it from scratch : | ||
− | + | Create data for the view counter : | |
− | + | ALTER TABLE media ADD COLUMN viewed int(10) NOT NULL DEFAULT 0; | |
+ | |||
+ | 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 : | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | 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; | ||
+ | |||
+ | INSERT INTO blocks VALUES (NULL,'favorites','video',2,9,397,100,1,<user id>,NULL); | ||
for users you have created before | for users you have created before | ||
+ | |||
+ | Create data for the playlists : | ||
+ | |||
+ | CREATE TABLE `playlist` ( | ||
+ | `ID` int(4) unsigned NOT NULL auto_increment, | ||
+ | `channel` varchar(256) collate utf8_bin NOT NULL, | ||
+ | `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; | ||
+ | |||
+ | INSERT INTO blocks VALUES (NULL,'playlists','video',2,10,397,100,1,<user id>,NULL); | ||
+ | for users you have created before | ||
+ | |||
+ | Create data for the annotations/subtitles : | ||
+ | |||
+ | CREATE TABLE `subtitles` ( | ||
+ | `ID` int(32) unsigned NOT NULL auto_increment, | ||
+ | `name` text collate utf8_bin NOT NULL, | ||
+ | `media_id` int(32) NOT NULL default 0, | ||
+ | `starttime` float NOT NULL default -1.0, | ||
+ | `endtime` float NOT NULL default -1.0, | ||
+ | `text` text collate utf8_bin NOT NULL, | ||
+ | UNIQUE KEY `ID` (`ID`) | ||
+ | ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
Latest revision as of 12:49, 23 January 2022
Contents
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, subtitles, ...
Setting up the next developments
To achieve a number of new features like playlists 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 instance.
- Another thing missing in Cortado was the support for 16/9 format,
That was requested by some dmmdb 1.0 users, it has been implemented in dmmbd 2.0.
Warning : if you want your videos to be uploaded in 16x9 format, you have to set upload dimensions in dmmdb to a 16/9 format, like it is done in [Giss 16/9]
There the settings are ( in config.php ) :
$config['videowidth'] = "480"; $config['videoheight'] = "272";
So, if you want to upload 16/9 videos to GISS server, you have to use http://giss.tv/dmmdb16.
- A few additional facilities have been added like a volume control and the displaying of video duration.
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 functionalities
- 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 :
Support for playlists
In version 2.0, each canal can administrate his own playlists containing local and remote media files, see :
Support for annotations/subtitles
This functionality can be used to import/export subtitles files in .srt format as well as a tool for on-line annotations of media.
In each channel, a choice called 'ANNOTATE MEDIA' has been added to the admin menu to be able to edit the annotations/subtitles.
This choice is in the admin menu and is reserved to the publisher of the media, the current annotations/subtitles can be downloaded from the main page and is accessible to everyone naturally.
Release of an official Release Candidate : dmmdb 2.0 RC1
The version of dmmdb 2.0 is available here ( version 2.0 RC1 ) :
You can also obtain the current version of dmmdb through CVS :
export CVSROOT=:pserver:anonymous@giss.tv:/home/cvs cvs co dmmdb
Warning : it is not fully compatible with version 1.0, so if you have a version 1.0 installed, you should upgrade the code and following the procedure below to adapt your database ( see next section ).
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 :
ALTER TABLE media ADD COLUMN viewed int(10) NOT NULL DEFAULT 0;
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 :
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;
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 :
CREATE TABLE `playlist` ( `ID` int(4) unsigned NOT NULL auto_increment, `channel` varchar(256) collate utf8_bin NOT NULL, `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;
INSERT INTO blocks VALUES (NULL,'playlists','video',2,10,397,100,1,<user id>,NULL); for users you have created before
Create data for the annotations/subtitles :
CREATE TABLE `subtitles` ( `ID` int(32) unsigned NOT NULL auto_increment, `name` text collate utf8_bin NOT NULL, `media_id` int(32) NOT NULL default 0, `starttime` float NOT NULL default -1.0, `endtime` float NOT NULL default -1.0, `text` text collate utf8_bin NOT NULL, UNIQUE KEY `ID` (`ID`) ) ENGINE=MyISAM AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;