MediaEngine comes with a sample application - transcode (for Windows - transcode.exe). It supports most of the functionality available in MediaEngine itself.
This article covers the functionality of the sample application: how to get information about a source, how to transcode a source into a file, how to set a preset of the processing.
Basic Usage
In a common case, the usage of the transcode sample looks like this:
transcode [options] <config filename> [-o <output filename>] [-i <filename> [raw options]] [options]]
All the options are covered in this article below and other articles in the section.
Simple Transcoding
You should set the following:
- Path to transcoding preset
- Path to the input file
- Path to the output file
For example:
transcode.exe "AVC-Intra_Class_100_1920x1080i50.txt" -i "d:\source.mxf" -o "e:\output.mxf"
And while the transcoding is running, you can find the processing statistics:
You might consider writing the statistics to a local JSON file. For this, you should use the following arguments:
- -json-stats <filename> - to set a file name
- -json-stats-update-time time - to set an update interval, the default interval is 500 ms.
Getting information about a source
To check the media parameters of the source, you should use the "-info" attribute for the transcode application:
transcode -info [text|json] [info options] -i <filename> [raw options] [-i <filename> [raw options]]
There are 2 ways to get the information - as a JSON output, or as plain text. If the output file name is not specified, the information is printed in the console output.
For example:
transcode.exe -info json "d:\info.json" -i "d:\source.mxf"
outputs the information about the file to the "info.json" file. The output depends on the input file, its container, codecs, and the metadata available.
A sample output might look like this:
You might consider using multiple input files to get information about all of them in a single command. For this, just use the "-i <file_name>" block several times in command line arguments.
Other options
MediaEngine is a flexible tool and supports many options to simplify your video transcoding work. The basic options are covered above, and a full list of supported options you can find in the Options article.
Sources
MediaEngine supports various types of inputs:
- Local video files
- Network streams
- NDI signals
- SDI signals
- Hardware devices
- Static images
- Image sequences
More information about the sources and how to configure them you can find in the Sources article.
Outputs
Types of outputs are defined and configured in transcoding presets. The supported outputs are:
- MXF
- MOV
- MP4
- MKV
- AVI
- TS
- HLS
- DASH
Presets
Presets are individual configurations for transcoding operations. Presets contain information about video and audio codecs, about a container, optional processing of the source, and about the output container. More information you can find in the Presets article.