PreviewPlusInstallation

From EPrints Documentation
Jump to: navigation, search

Installation

Begin by downloading PreviewPlus from : http://files.eprints.org/473

Prerequesit software

As prerequisits you will also require FFMPEG, LAME and OpenOffice. On Ubuntu/Debian you can install these from the package manager. On RedHat/Fedora you may have to install them by hand depending what repositories you have available.

FFMPEG:http://ffmpeg.org/index.html

LAME:http://lame.sourceforge.net/

OpenOffice:http://www.openoffice.org/

Plugin Installation

Instructions assume eprints is installed at /opt/eprints3

Extract the tarball into your local archive directory:

cd /opt/eprints3/archives/ARCHIVEID
tar xvzf PreviewPlus.VERSION.tgz

Configure office conversions

Depending what distribution of linux you are using you will find that open office installs in different places. You may need to edit cfg/cfg.d/office_conversions.pl so that $c->{office_path} points to you open office install.

Symlink CGI scripts

ln -s /opt/eprints3/archives/ARCHIVEID/cgi/get_preview_plus /opt/eprints3/cgi/

Adding the preview to eprint render

In eprint render find where you want the preview to appear on the page and add:

if($session->get_repository()->call("previews_exist", $eprint)){
       $page->appendChild($session->get_repository()->call("make_preview_plus", $session, $eprint, "horizontal"));
 }

Cleaning up

You must restart your webserver.

You will probably also want to run /opt/eprints/bin/epadmin redo_thumbnails ARCHIVEID but be warned this is a very expensive process if you have a large archive and should definately be run overnight.

Setting up cron

You will probably want to run the /opt/eprints3/archives/ARCHIVEID/bin/generate_video_previews and /opt/eprints3/archives/ARCHIVEID/bin/generate_audio_previews nightly. The easiest way to do this is to add them to the eprints users contab.

Currently there is no mechanism to stop these scripts snowballing so make sure you leave long enough in the crontab for one job to finish before the next starts.

Resources/Misc

Ubuntu/FFMPEG

How to install extra codecs for ffmpeg on ubuntu: https://wiki.ubuntu.com/ffmpeg (especially support for AAC, 3GP)