Tools

Tools bundled with ew-vodingest

The ew-vodingest rpm also contains number of tools that can be used to investigate and manipulate ESF format (CMAF + metadata) made by the VoD Ingest.

All utilities will print a usage help message if you specify the -h flag.

ew-check-variant-alignment

The tools lists the start and stop times of every variants of the output recording or managed VOD. In the strict check mode, it fails with non-zero exit code if there is unalignment found.

usage: ew-check-variant-alignment [-h] [-v] [-s] content_path

Check ESF variant alignment

positional arguments:
  content_path

optional arguments:
  -h    Show help message
  -s    Run in 'strict check mode'
  -v    Enable verbose output

ew-vod-modify-subtitles

This tool can modify subtitle and caption tracks of ingested assets.

It only works on ESF assets that are available as a mounted file directory. If the asset was ingested with ew-vodingest and has a DASH MPD file, it will also be updated. Other features from ew-vodingest like storing original subtitle files with a BaseURL link in content_info.json are also implemented.

The tool has commands like add, delete, modify, etc to allow changes to the asset. Each command has its own flags. To get help for a command, use the –help flag with the command, like $ ew-vod-modify-subtitles add --help or simply type ew-vod-modify-subtitles add.

Usage:
  ew-vod-modify-subtitles [command]

Available Commands:
  add         Add a new subtitle track to an asset
  completion  Generate the autocompletion script for the specified shell
  delete      Delete an existing subtitle track
  help        Help about any command
  list        Lists available subtitle tracks
  modify      Modify attributes of an existing subtitle track
  rename      Rename an existing subtitle track
  replace     Replace an existing subtitle track

Flags:
  -h, --help                help for ew-vod-modify-subtitles
      --log-file string     log to specified file instead of standard output
      --log-format string   format and type of log: [consolejson consolepretty discard] (default "consolepretty")
      --log-level string    log level (trace|debug|info|warn|error|fatal|panic) (default "info")
  -v, --version             version for ew-vod-modify-subtitles

ew-thumbnails-generator

This tools is only available from version 1.12.0 and used to generate DASH thumbnails tracks for existing ESF asset:

Basic usage of ew-thumbnails-generator:
  ew-thumbnails-generator -i /path/to/esf --sizes "width[xheight[,width[xheight]]]"


Generate thumbnails for video in the source directory. Requires command 'ffmpeg' to be available"

Run ew-thumbnails-generator with options:

  -i, --input string       source directory
  -l, --logfile string     log file [default stdout]
      --logformat string   format and type of log: [consolejson consolepretty discard] (default "consolepretty")
      --loglevel string    Initial logging level: debug, info, warn, error, fatal, panic (default "info")
  -r, --remove             remove existing thumbnails instead of generating (base on the sizes)
  -s, --sizes string       comma separated list of thumbnail sizes 'width[xheight],...'If only widths are provided, the heights will be calculated to keep aspect ratio. In case nothing provided, auto generate a thumbnails with 240 as width (default "240")
  -t, --tmpdir string      temporary working directory (default "/tmp")

How does it work?

The tool will execute ffmpeg for generating images by extracting first IDR frame of segments. The maximum number of thumbnails will be 500, that means, if there are more than 500 segment in the video, this tool will just only generate 500 thumbnails. This is for better performance and the fact that 500 images is a reasonable ammount of images to display on scrub bar. The tool will automatically pick the reasonable segments from which IDR frames will be extracted.

The thumbnails will be resized base on the --sizes argument. You can enter only width for size, or widthxheight or mixed, the sizes must be seperated by comma. Below are acceptable inputs:

--size "240,320"
--size "240x120,320x150"
--size "240x120,320"

In case only width known, the height will be calculated base on video resolution.

height = videoHeight * (width / videoWidth)

The number of generated thumbnails track will equal with the number of sizes.

The thumbnails will be combined into a single image and will be served as a tile in a SegmentNumber AdaptationSet by repackager to reduce the number of requests toward repackager.

Notes:

  • Because this tool base on ffmpeg, ffmpeg and its license should be installed and managed by user, the rpm package will not install it by default. And please make sure all necessary codec libraries are installed. For example, if the system is only using H264, only H264 codec libraries must be installed, H265 codec libraries can be skipped. Refer to Supported codecs for more information about current supported codecs of ew-vodingest.
  • Only jpeg is supported by now.
  • This tool only compatible with the output of ew-vodingest and ew-recorder. The output of old convoy-live-ingest is not supported.