Asset enrichment

The Job is responsible for managing image and video media files that are associated with uploaded or created content. Whenever an asset or media file is uploaded as part of the content, a corresponding event is generated and inserted into Kafka, which then triggers the 'asset-enrichment' job.

For image media files, the Job performs image enrichment by resizing the images to achieve an optimal DPI (dots per inch). Additionally, three different image variants are generated, each with low, medium, and high resolutions. These variants are then stored in the cloud, making them readily available for different use cases and devices.

Regarding video media files, the Job handles video enrichment, which includes fetching video metadata and generating a thumbnail for the video. Furthermore, it triggers the 'video-stream-generator' job, which is responsible for creating a streamable source for the video. This streamable source allows users to efficiently stream and access the video content.

Overall, the Job plays a crucial role in enhancing the content by enriching the associated image and video media files. The image enrichment process ensures optimal resizing and the availability of multiple resolution variants, while the video enrichment process provides valuable features such as video metadata, thumbnails, and streamable sources, contributing to an improved user experience and content accessibility.



During the deployment process, the configuration for all knowledge-platform-jobs is sourced from the sunbird-learning-platform repository. On the other hand, for local setups, the configuration is taken from the respective job folders within the knowledge-platform-jobs repository.

Kafka Topic:

kafka { 
    input.topic = {{ env_name }}.learning.job.request 
    groupId = {{ env_name }}-asset-enrichment-group 

Job configuration variables:

Sample Kafka event:

  "eid": "BE_JOB_REQUEST",
  "ets": 1648720639981,
  "mid": "LP.1648720639981.d6b1d8c8-7a4a-483a-b83a-b752bede648c",
  "actor": {
    "id": "Asset Enrichment Samza Job",
    "type": "System"
  "context": {
    "pdata": {
      "ver": "1.0",
      "id": "org.sunbird.platform"
    "channel": "01269878797503692810",
    "env": "staging"
  "object": {
    "ver": "1648720639904",
    "id": "do_2135063194770636801334"
  "edata": {
    "action": "assetenrichment",
    "iteration": 1,
    "mediaType": "image",
    "status": "Processing",
    "objectType": "Asset"

Dependency: Jobs: 'video-stream-generator' . External Software: imagemagick

Last updated