Reseller API

get
post

Use this route to provision a new user using their email

post

Create a login JWT to authorize requests with the Magine Client API.

put

Use this route to entitle a user to an offer (a group of items that you can watch in the service).

delete

Use this route to remove entitlement for an offer from a user.

Partner API

get
get

Get paginated list of viewables

post

Create a new asset in the metadata system

get

Get a viewable

get

Get a viewable

put

Update viewable metadata, metadata is fully replaced so include all fields in an update.

patch

Update partial viewable metadata, the metadata sent in is completely replaced, values omitted are ignored. Images cant be updated with PATCH, instead use endpoint: /partner/viewables/{viewableId}/images/{imageType}

put

Add or replace image for a viewable

delete

Remove image from viewable

get

get partner configured rating systems

get

get rating system by Id

post

Lookup existing User by email.

post

Create a User from request body

post

Create a login JWT to authorize requests with the Magine Client API.

post

Invalidate user's all JWTs.

put

Set a password for a user.

get

Get existing User by UserId.

patch

Patch user properties

delete

Delete a user by ID, any active entitlements will be cancelled..

get

List offers to which the user is entitled.

post

create entitlement according to input

delete

Delete user entitlement for the provided offer id.

put

Add a tag to a user

delete

Remove a tag from a user

get

Get a list of segment ids to which the user belongs

put

Add user to the specified segment

delete

Remove user from the specified segment

get

Fetches the latest play-sessions for a specific user

patch
post

Upload subtitles for vod

get

Get all subtitle requests for Vod

get

Get a specific subtitle request for a Vod

delete

Delete subtitle on language and type

post

Transcodes and prepares a source asset for streaming

Transcoding Glossary

  • Media Audio or video.

  • Subtitles Also called "captions". Text appearing at bottom of screen for the purpose of translating dialogue or credits. Subtitles are submitted as separate files in SubRip (.srt) format.

  • Asset A collection of containers and subtitles that form one movie, episode, sports event or other kind of program.

  • Source A file belonging to an asset.

  • Container A source conformant with a defined format containing any combination of audio and video. See the supported container formats in the table below.

  • Subtitle A source containing subtitles.

  • Input Named reference to a file and its location.

  • Track Named reference to media or subtitles in source. Associated with an input name.

  • Output Defines a collection of one or more tracks and performs some operation during transcoding.

  • Stereo 2-channel audio with channel order ["l", "r"].

  • Surround 6-channel audio with channel order["fl", "fr", "fc", "lfe", "bl", "br"].

Supported Media Containers and Codecs

* External reference MOV or MXF files are not supported.

ContainerVideo CodecsAudio Codecs
Matroska (.mkv)AVC (H.264), MPEG-2, MPEG-4 Part 2AAC, Dolby Digital (AC3)
MPEG-TS (.m2ts, .ts)AVC (H.264), HEVC (H.265), MPEG-2AAC
MPEG-4 (.mp4)AVC (H.264), HEVC (H.265), MPEG-2, MPEG-4 Part 2AAC, Dolby Digital (AC3), PCM
MXF (.mxf)Apple ProRes, AVC (H.264), MPEG-2AAC, PCM
QuickTime (.mov)Apple ProRes, AVC (H.264), HEVC (H.265), MPEG-2, MPEG-4 Part 2AAC, MP3, PCM
WebM (.webm)VP8, VP9Opus, Vorbis

Audio Channel Remapping

Channel Positions

  • l stereo left
  • r stereo right
  • fl front left
  • fr front right
  • fc front center
  • lfe low-frequency effects
  • bl back/surround left
  • br back/surround right

An audio track can be mono (1 channel), stereo (2 channels) or surround (6 channels).

The correct channel orders are ["l", "r"] and ["fl", "fr", "fc", "lfe", "bl", "br"] for stereo and surround audio respectively. These are the channel orders of our streams to the clients.

To collect mono tracks into a multichannel stream, or correct the order of channels in multichannel tracks, audio outputs are defined.

If no audio outputs are given, they will be automatically generated. Once one audio output is defined, all other audio outputs need to be given as well, even if no further transformations are necessary.

The tracks list in an audio output specifies the audio tracks associated with that output. This is an ordered list. When listing more than one track, the tracks will be mapped to channel positions.

Listing 2 or 6 mono tracks in the correct order as given above will produce correct stereo or surround output.

The channelOrder parameter in an audio output can be used to correct the ordering of audio channels in multichannel tracks, for example flipped stereo tracks, or surround tracks with nonstandard channel order.

To correct the ordering, simply specify the channel order of the source track. The audio will be remapped to the correct orders as defined above.

Note that for certain common multichannel track formats such as AAC, the channel order is different from the above but channel ordering is applied automatically right away. It's not necessary to further specify channel order. Any further channel remapping will happen after order is corrected. This can be confusing and small tests are recommended before transcoding production assets to ensure desired result.

For an asset with only well defined multichannel tracks, it's typically not necessary to specify any outputs at all.

Example Use Cases

  • More than one audio channel in a single track Given a single six channel audio track ordered ["bl", "br", "fc", "lfe", "fl", "fr"] i.e. rear and front channels are in wrong position. Specifying this channelOrder in the associated output will remap the front and rear channels to correct 5.1 surround ["fl", "fr", "fc", "lfe", "bl", "br"].

Given a single two channel audio track ordered ["r", "l"] i.e. left and right are flipped. Specifying this channelOrder in the associated output flip .

  • One audio channel per track Given a list of mono tracks ["2nd", "1st", "3rd", "4th", "5th", "6th"], 1st will be moved to the fr channel and 2nd will be moved to the fl channel.

Note that it is possible to give a list of mono tracks and then change its ordering using channelOrder. For most use cases this doesn't make sense, please consider carefully what is needed.

Known Limitations

Currently the tracks in an audio output must all be in the same container file. It's not possible to specify, say, two mono tracks where each mono track is in a separate file. We are working to remove this limitation in a future release.

ContainerIndex for audio tracks is a relative index. Please see ContainerIndex description.

Example Requests

A Typical Example Request

A sample request body can be found at the bottom. In that request an asset with one input is specified. The first index in the input container is for the video track. The second and third index are for the stereo track and 5.1 surround track respectively.

More Complex Example

This is a more complicated request that shows an asset with two containers, several audio tracks and two subtitles.

Container 1 has one video track, one stereo audio track and one 5.1 surround audio track. Stereo has right and left channel flipped which is corrected in the output. The 5.1 surround track already has the expected channel layout so no remapping will be done.

Container 2 has six mono tracks which together form a 5.1 surround audio output in a second language. The tracks are mapped to surround channels.

{
"sourceId": "my_source_id_string_0123",
"inputs": [
  {
    "name": "my_container_1",
    "storage": "s3",
    "source": "bucket_1/key_1/file_1.suffix"
  },
  {
    "name": "my_container_2",
    "storage": "s3",
    "source": "bucket_2/key_2/file_2.suffix"
  },
  {
    "name": "my_container_3",
    "storage": "s3",
    "source": "bucket_2/key_2/file_3_eng.srt"
  },
  {
    "name": "my_container_4",
    "storage": "s3",
    "source": "bucket_2/key_2/file_4_ger.srt"
  }
],
"tracks": {
  "video": {
    "name": "my_track_1",
    "input": "my_container_1",
    "resolution": {
      "width": 1920,
      "height": 1080
    },
    "frameRate": {
      "numerator": 25,
      "denominator": 1
    },
    "interlaced": false
  },
  "audio": [
    {
      "name": "my_track_2",
      "input": "my_container_1",
      "containerIndex": 1,
      "channels": 2,
      "language": "eng"
    },
    {
      "name": "my_track_3",
      "input": "my_container_1",
      "containerIndex": 2,
      "channels": 6,
      "language": "eng"
    },
    {
      "name": "my_track_4",
      "input": "my_container_2",
      "containerIndex": 1,
      "channels": 1,
      "language": "ger"
    },
    {
      "name": "my_track_5",
      "input": "my_container_2",
      "containerIndex": 2,
      "channels": 1,
      "language": "ger"
    },
    {
      "name": "my_track_6",
      "input": "my_container_2",
      "containerIndex": 3,
      "channels": 1,
      "language": "ger"
    },
    {
      "name": "my_track_7",
      "input": "my_container_2",
      "containerIndex": 4,
      "channels": 1,
      "language": "ger"
    },
    {
      "name": "my_track_8",
      "input": "my_container_2",
      "containerIndex": 5,
      "channels": 1,
      "language": "ger"
    },
    {
      "name": "my_track_9",
      "input": "my_container_2",
      "containerIndex": 6,
      "channels": 1,
      "language": "ger"
    }
  ],
  "subtitles": [
    {
      "name": "my_track_10",
      "input": "my_container_3",
      "language": "eng"
    },
    {
      "name": "my_track_11",
      "input": "my_container_4",
      "language": "ger"
    }
  ]
},
"outputs": {
  "audio": [
    {
      "tracks": ["my_track_3"],
      "channelOrder": ["r", "l"]
    },
    {
      "tracks": ["my_track_5", "my_track_4"],
    },
    {
      "tracks": [
        "my_track_5",
        "my_track_4",
        "my_track_6",
        "my_track_7",
        "my_track_8",
        "my_track_9"
      ]
    }
  ]
},
"drm": true,
"drmType": "enhanced",
"experimental": { "a_flag": true}
}
get

Get vod

post