Screenshot Extraction and Image Rendering
Nomad Media automatically extracts a screenshot for all videos that are uploaded into Nomad Media. The following configuration section (found in the {projectPrefix}.config file controls the generation:
"application/screenshotSettings": {
"screenshotIntervalFrequency": 3,
"screenShotAtZeroTime": 3
}For a video, Nomad Media will automatically take a screenshot X seconds into the video - where X is represented by the screenshotAtZeroTime value in the configuration.
The max dimensions are used to size the thumbnail and the preview image. Nomad Media will reduce the image (or screenshot) until both the height and width are under the max values specified. The ratio of the image or screenshot is not altered - thus the aspect ratio is kept the same. The output format of the thumbnail and preview is a JPEG image.
Rendering Profiles
In the same config.json file locate the application/imageRendering section. Here you can add and edit the different profiles that are used to generate thumbnails, previews and other image renderings. Each profile entry in this section represents one rendered image that will be generated from the original source image or screenshot.
If the section is missing, then 2 default entries exist for rendering the thumbnail and preview for each image:
"application/imageRendering": {
"previewProfileName": "preview",
"thumbnailProfileName": "thumbnail",
"profiles": [
{
"name": "preview",
"title": "Preview",
"isEnabled": true,
"maxHeight": 800,
"maxWidth": 800,
"metadataType": "PreviewImage"
},
{
"name": "thumbnail",
"title": "Thumbnail",
"isEnabled": true,
"maxHeight": 180,
"maxWidth": 180,
"metadataType": "ThumbnailImage"
}
]
},Additional profiles can be added for rendering other custom variations of the images. An example is the auto-cropping feature using the ImageKit "fo-auto" option:
// Add this profile to the others and it generates a new rendered image with the AI cropping feature
{
"name": "cropped",
"title": "Cropped",
"isEnabled": true,
"maxHeight": 800,
"maxWidth": 300,
"transformation": "fo-auto",
"metadataType": "RenderedImage"
}If the transformation property has a value, then the ImageKit integration is used for the rendering. See ImageKit Integration for more details about setting up that integration. Otherwise, the additional profile images are only scaled using the built-in Nomad Media resizing feature.
Profile Properties
| Property | Type | Description |
|---|---|---|
| name | string | The unique name of the profile |
| title | string | The title or description of the profile |
| isEnabled | bool | Indicates if the renderer should use this profile or not |
| maxHeight | number | The maximum number of pixels for the rendered image height |
| maxWidth | number | The maximum number of pixels for the rendered image width |
| metadataType | enum | Normally, this should be RenderedImage, but there will be one ThumbnailImage and PreviewImage |
| transformation | string | One of the ImageKit transformation strategies |
