Convoy integrating

Integration with Convoy

Currently Convoy, a product that managed the streamers and origins, is using the tool named ew-recorder for recording and uploading VoD. That tool was written in python and not so good in performance and resource usage. ew-vodingest tends to resolve these problems.

This document’s purpose is to make to integrating process between ew-vodingest and Convoy becomes clear.

How to install ew-vodingest in Convoy?

From Convoy version 2.30, it has already been installed along when installing Convoy.

Installing or upgrading ew-vodingest on Convoy by:

yum install -y <path to ew-vodingest RPM>

Integrating for recording

For using ew-vodingest for recording on Convoy, ingest script for recorder must be changed to ew-vodingest

...
ccmi.webtv_recorders {
  liveingest1 {
    host = 1.2.3.4
    port = 8090
    live_buffer = 600
    storage = storage1
    ingest_script = /usr/bin/ew-vodingest
    channel_groups = { swlive }
  }
}
...

Then, recording will be handled by ew-vodingest.

DASH thumbnails for recordings

To generate DASH thumbnails, an option must be added when executing ew-vodingest. Unfortunately, this option cannot be added directly into ingest_script configuration above, so we should use this script:

#!/bin/bash
set -e
export PATH="$PATH:/usr/bin"
/usr/bin/ew-vodingest --thumbnails "$@"

The change in PATH variable above means to allow ew-vodingest to search for ffmpeg command. /usr/bin can be changed to wherever ffmpeg is placed.

Put this script into any bash script file, for example /usr/bin/ew-custom-recorder, and the configuration will look like this

...
ccmi.webtv_recorders {
  liveingest1 {
    host = 1.2.3.4
    port = 8090
    live_buffer = 600
    storage = storage1
    ingest_script = /usr/bin/ew-custom-recorder
    channel_groups = { swlive }
  }
}
...

Notes:: The above script is just a simple example and can be modified for more purposes.

Integrating for uploading

From Convoy 2.30, you can change the configuration of Convoy to change the uploading script:

upload.repackager_bin = /usr/bin/ew-vodingest

For older Convoy, you should change the symlink /usr/bin/recorder, and make it point to ew-vodingest.

ln -sf /usr/bin/ew-vodingest /usr/bin/recorder

DASH thumbnails for uploadings

Because ew-check-variant-aligment, a legacy tool of ew-recorder, are still being used for checking the asset before uploading it, a similar solution with recording above cannot be used since thumbnails tracks are not accepted by that tool.

Thus, thumbnails generating has to be executed after the checking step, and that can be achieved by using this script:

#!/bin/bash
set -e
/usr/lib64/ew-repackaging-recorder/bin/ew-check-variant-alignment "$@"
/usr/bin/ew-thumbnails-generator -i "$2"

Put above script into a file, for example /usr/bin/ew-custom-checker, and change the symlink:

ln -sf /usr/bin/ew-custom-checker /usr/bin/ew-check-variant-alignment

Notes::

  • The above script is just a simple example and can be modified for more purposes.

  • ew-check-variant-aligment are going to be replaced in the future.