Skip to content

Elemental MediaConvert

Elemental MediaConvert is a file-based video transcoding service with broadcast-grade features. It enables you to easily create high-quality video streams for broadcast and multiscreen delivery.

LocalStack allows you to mock the MediaConvert APIs in your local environment. The supported APIs are available on our API Coverage section, which provides information on the extent of MediaConvert’s integration with LocalStack.

This guide is designed for users new to Elemental MediaConvert and assumes basic knowledge of the AWS CLI and our awslocal wrapper script.

Start your LocalStack container using your preferred method. We will demonstrate how to create a MediaConvert job, list jobs, create a queue, and list all queues using the AWS CLI.

Create a new file named job.json on your local directory:

{
"Role": "arn:aws:iam::000000000000:role/MediaConvert_Default_Role",
"Settings": {
"Inputs": [
{
"VideoSelector": {},
"AudioSelectors": {
"Audio Selector 1": {
"DefaultSelection": "DEFAULT"
}
},
"TimecodeSource": "ZEROBASED",
"FileInput": "s3://testbucket/input.mp4"
}
],
"OutputGroups": [
{
"Name": "File Group",
"OutputGroupSettings": {
"Type": "FILE_GROUP_SETTINGS",
"FileGroupSettings": {
"Destination": "s3://testbucket/output.mp4"
}
},
"Outputs": [
{
"VideoDescription": {
"CodecSettings": {
"Codec": "H_264",
"H264Settings": {
"RateControlMode": "QVBR",
"SceneChangeDetect": "TRANSITION_DETECTION",
"MaxBitrate": 5000000
}
}
},
"AudioDescriptions": [
{
"CodecSettings": {
"Codec": "AAC",
"AacSettings": {
"Bitrate": 96000,
"CodingMode": "CODING_MODE_2_0",
"SampleRate": 48000
}
},
"AudioSourceName": "Audio Selector 1"
}
],
"ContainerSettings": {
"Container": "MP4",
"Mp4Settings": {}
}
}
],
"CustomName": "output"
}
],
"TimecodeConfig": {
"Source": "ZEROBASED"
},
"FollowSource": 1
}
}

You can create a MediaConvert job using the CreateJob API. Execute the following command to create a job using a job.json file:

Terminal window
awslocal mediaconvert create-job --cli-input-json file://job.json
Output
{
"Job": {
"AccelerationSettings": {
"Mode": "DISABLED"
},
"AccelerationStatus": "NOT_APPLICABLE",
"Arn": "arn:aws:mediaconvert:us-east-1:000000000000:jobs/1727963943858-7bdace",
...
"Role": "arn:aws:iam::123456789012:role/MediaConvert_Default_Role",
"Settings": {
"FollowSource": 1,
"Inputs": [
{
"AudioSelectors": {
"Audio Selector 1": {
"DefaultSelection": "DEFAULT"
}
},
...
}
],
"OutputGroups": [
{
"CustomName": "output",
"Name": "File Group",
...
}
],
"TimecodeConfig": {
"Source": "ZEROBASED"
}
},
"Status": "SUBMITTED",
...
}
}

You can list all MediaConvert jobs using the ListJobs API. Execute the following command to list all jobs:

Terminal window
awslocal mediaconvert list-jobs

You can create a MediaConvert queue using the CreateQueue API. Execute the following command to create a queue named MyQueue:

Terminal window
awslocal mediaconvert create-queue
--name MyQueue
--description "High priority queue for video encoding"
Output
{
"Queue": {
"Arn": "arn:aws:mediaconvert:us-east-1:000000000000:queues/MyQueue",
"CreatedAt": "2024-10-03T19:30:04.015501+05:30",
"Description": "High priority queue for video encoding",
"LastUpdated": "2024-10-03T19:30:04.015501+05:30",
"Name": "MyQueue",
"PricingPlan": "ON_DEMAND",
"ProgressingJobsCount": 0,
"Status": "ACTIVE",
"SubmittedJobsCount": 0,
"Type": "CUSTOM"
}
}

You can list all MediaConvert queues using the ListQueues API. Execute the following command to list all queues:

Terminal window
awslocal mediaconvert list-queues

Currently, the service mocks the submission of encoding jobs to either the default queue or a custom-created queue. While actual transcoding is not performed, job completion is emulated.

Job status progresses after a brief wait, and EventBridge events are emitted when the job state changes, allowing users to determine if a job has finished. This delay can be disabled by setting MEDIACONVERT_DISABLE_JOB_DURATION=1, which causes processing jobs to complete almost instantly.

OperationImplementedImage
Page 1 of 0