Magnolia 5.6 reached end of life on June 25, 2020. This branch is no longer supported, see End-of-life policy.
The DAM Preview module creates static preview images of video and PDF assets. You can see the preview image in the thumbnail view and in the action bar in the Assets app. The DAM Preview module is an optional add-on. Without the module Magnolia creates previews of image assets only. All previews are generated by the Magnolia Imaging module. The DAM Preview module installs a configurable image provider which can handle common video and PDF formats.
The module uses external libraries to decode and manipulate the binaries:
<dependency> <groupId>info.magnolia.dam</groupId> <artifactId>magnolia-dam-preview</artifactId> <version>2.3.2</version> </dependency>
The module includes custom image provider and image provider definition classes that are registered in the Assets App at /modules/dam-app/subapps/assets/browser/imageProvider
.
Node name | Value |
---|---|
modules | |
dam-app | |
assets | |
subApp | |
browser | |
imageProvider | |
generators | |
avi | xuggle |
m4v | jcodec |
mov | xuggle |
mp4 | jcodec |
quicktime | xuggle |
class | info.magnolia.dam.preview.imageprovider.MultiGeneratorImageProviderDefinition |
imageProviderClass | info.magnolia.dam.preview.imageprovider.MultiGeneratorImageProvider |
originalImageNodeName | jcr:content |
Nodes and properties:
imageProvider
: See Image provider definition for more.generators
: Each media type is associated with the appropriate image generator configured in the Imaging module. See Image generators below for more. You can add configuration nodes for additional media types and swap between jcodec
and xuggle
for movie formats. jcodec
works perfectly for most media types that use H264 encoding, but not for the mov
or quicktime
formats.class
: MultiGeneratorImageProviderDefinition adds support for multiple generators.imageProviderClass
: MultiGeneratorImageProvider provides portrait or thumbnail images for objects of MIME type image/*
. It relies on the Imaging module to generate and store the previews.originalImageNodeName
: Name of the JCR node where the original source image is stored.The module installs two image generators for each library; one for portrait and one for the thumbnail images.
These are configured in the Imaging module at /modules/imaging/config/generators
.
Node name | Value |
---|---|
modules | |
imaging | |
config | |
generators | |
large | |
portrait | |
thumbnail | |
stk | |
portrait-pdf | |
operations | |
load | |
class | info.magnolia.dam.preview.ViaPdfRenderer |
extends | ../portrait |
thumbnail-pdf | |
portrait-zuggle | |
thumbnail-zuggle | |
operations | |
load | |
class | info.magnolia.dam.preview.ViaXuggle |
extends | ../thumbnail |
portrait-jcodec | |
thumbnail-jcodec |
Nodes and properties:
operations
:load
: There is one load ImageOperation
class for each provider that loads both the thumbnail and portrait images.class
: The classes all extend FromBinaryNode image operation class.InputStreamSeekableChannel
to grab the first frame or second of the video and generates the image. XuggleCaptureFrames
to extract the first frame or second of the video and generates the image.xuggle-xuggler-5.x
jar is approximately 66MB (about 99% of the size of the bundle).