Page History
...
ImageMagick Media Filters
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Info |
---|
As of DSpace 7.6, the ImageMagick media filter also supports creating thumbnails of video (MP4) files, provided that "ffmpeg" is installed locally. See instructions below. |
Overview
The ImageMagick Media Filters provide consistent, high quality thumbnails for image bitstreams and PDF , PDF bitstreams and video (MP4) bitstreams.
These filters require a separate software installation of the conversion utilities (ImageMagick and Ghostscript: ImageMagick, Ghostscript (to support PDF thumbnails) and/or ffmpeg (to support MP4 thumbnails).
The media filters use the library im4java to invoke the conversion utilities. This library constructs a conversion command launches a sub-process to perform the generation of media files.
...
Install ImageMagick on your server. The installation process differs based on your operating system. For example, on Debian/Ubuntu, it's similar to this:
Code Block apt-get install imagemagick
If you wish to generate PDF thumbnails, install Ghostscript on your server. The installation process differs based on your operating system. For example, on Debian/Ubuntu, it's similar to this:
Code Block apt-get install ghostscript
(New in 7.6) If you wish to generate MP4 (video) thumbnails, install FFmpeg on your server. The installation process differs based on your operating system. For example, on Debian/Ubuntu, it's similar to this:
Code Block apt-get install ffmpeg
- The ImageMagick, Ghostscript, and Ghostscript FFmpeg executables should be accessible from the same directory (e.g.
/usr/bin
)- This directory MUST be defined in the
org.dspace.app.mediafilter.ImageMagickThumbnailFilter.ProcessStarter
configuration as describe below.
- This directory MUST be defined in the
...
In the filter.plugins section of your dspace.cfg file, uncomment (or local.cfg) file, specify the ImageMagick media filter definitionfilters you wish to use.
Code Block |
---|
# NOTE: When "ImageMagick Image Thumbnail" is enabled, the default "JPEG Thumbnail" should NOT be enabled filter.plugins = ImageMagick Image Thumbnail # NOTE: When "ImageMagick PDF Thumbnail" is enabled, the default "PDFBox JPEG Thumbnail" should NOT be enabled # Requires Ghostscript to also be installed filter.plugins = ImageMagick PDF Thumbnail, \ # New in 7.6, this will generate thumbnails from video files. # Requires ffmpeg to also be installed filter.plugins = ImageMagick Video Thumbnail |
This will activate the following settings which are already present in dspace.cfg :(these do NOT need to be added, as they already exist)
Code Block |
---|
plugin.named.org.dspace.app.mediafilter.FormatFilter = org.dspace.app.mediafilter.ImageMagickImageThumbnailFilter = ImageMagick Image Thumbnail, \ plugin.named.org.dspace.app.mediafilter.FormatFilter = org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter = ImageMagick PDF Thumbnail plugin.named.org.dspace.app.mediafilter.FormatFilter = org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilterImageMagickVideoThumbnailFilter = ImageMagick PDFVideo Thumbnail |
These media filters contain the several properties which can be configured.
...
The following property provides a path to the ImageMagick (convert) and , GhostScript (ghostscript), and ffmpeg utilities.
Code Block |
---|
org.dspace.app.mediafilter.ImageMagickThumbnailFilter.ProcessStarter = /usr/bin |
Supported file formats
Each of these ImageMagick filters has its own list of configurable file formats. The defaults are usually best, but may be updated if you have custom bitstream formats. These settings already exist in your dspace.cfg.
Code Block |
---|
filter.org.dspace.app.mediafilter.ImageMagickImageThumbnailFilter.inputFormats = BMP, GIF, PNG, JPG, TIFF, JPEG, JPEG 2000
filter.org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.inputFormats = Adobe PDF
filter.org.dspace.app.mediafilter.ImageMagickVideoThumbnailFilter.inputFormats = Video MP4 |
Overwriting Existing Thumbnails
...