Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.
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 image provider which can handle common video and PDF formats.module. The DAM Preview module installs a configurable
The module uses external libraries to decode and manipulate the binaries:
- Swinglab's PDF Renderer for PDFs.
- JCodec for video and audio codecs and formats that use H264 encoding.
- Xuggle for MOV, AVI and other video formats that cannot be handled by JCodec.
<dependency> <groupId>info.magnolia.dam</groupId> <artifactId>magnolia-dam-preview</artifactId> <version>2.4.1</version> </dependency>
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
xugglefor movie formats.
jcodecworks perfectly for most media types that use H264 encoding, but not for the
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
Nodes and properties:
load: There is one load
ImageOperationclass for each provider that loads both the thumbnail and portrait images.
class: The classes all extend FromBinaryNode image operation class.
- ViaPdfRenderer : Draws the first page of the PDF to an image, gets the width and height for the doc at the default zoom, and generates the image.
InputStreamSeekableChannelto grab the first frame or second of the video and generates the image. This implementation is not thread safe. It is a simple buffer for forward reading. Writing or setting the position back is not supported or possible.
XuggleCaptureFramesto extract the first frame or second of the video and generates the image.
- Each of the codecs uses 512K of memory buffer per video to generate frames from video files. Xuggle uses a temp file in addition to this.
xuggle-xuggler-5.xjar is approximately 66MB (about 99% of the size of the bundle).