# Overview

Simple Live Encoding Jobs are quick and easy way to transcode your RTMP or SRT Input into a best practise bitrate ladder for efficient and high-quality using DASH/HLS delivery to your audience. All you need is a single API call that provides the input type you want to use, and output destination details where to store the encoded live content.

# Requirements

  1. **Encoder Version:** `STABLE`

  2. **SDK Version:** v 1.106.0 or higher

  3. **Input:** `SRT` or `RTMP` (push only)

# Supported Features

  • **Input Sources:** RTMP, SRT

  • **Encoding Profile:** INCREASED\_QUALITY or LOWER\_LATENCY

  • **Output Destinations:** AWS S3, Google Cloud Storage (GCS), Azure Blob Storage (ABS), Akamai NetStorage

    • **Output Characteristics:** \_At least one Output Destination \_Video: H264, segmented fMP4, fixed rendition ladder (240p, 360p, 480p, 720p, 1080p) \_Audio: AAC, segmented fMP4, one audio rendition only \_Highest Resolution selectable (`SD` = up to 480p, `HD` up to 720p, `FULL_HD` up to 1080p) \* Manifests: DASH/HLS

  • **Auto-shutdown:** When the ingest is disconnected for more the 10 minutes the live encoding will be shut down. The Simple Live Encoding will not be shut down if no stream was ever connected.




# Introduction

A Simple Live Encoding Job is defined by an

  • An input source

  • An output destination

  • An encoding profile

  • A cloud region.

that’s it! :)

Once a Simple Encoding Job is started, the template is converted into an actual Encoding, adapted to the input and output definition.

## Job lifecycle

After starting the Simple Live Encoding Job, it goes through the following stages:

  • `CREATED`: Job has been created is waiting to be started.

  • `EXECUTING`: Job is currently being executed and creating an Live Encoding

  • `FAILURE`: Job could not create an Live Encoding, `errors` [property](🔗) for more information

  • `RUNNING`: Job created an Live Encoding. At this time, an encoding-ID is available and the Live Encoding itself is either in state `QUEUED` or `RUNNING` and provides the details needed to configure an input source (e.g. OBS Studio, hardware encoders, etc) to push their signal to the Live Encoding.

  • `FINISHED`: The Encoding created by this job finished successfully

  • `ERROR`: The Encoding created by this job failed, `errors` [property](🔗) for more information

  • `CANCELED`: The Encoding has been started but has been canceled manually by the user.

You can retrieve status information with the Job details endpoint

Note that the Encoding created and managed by the Job has its own statuses, documented [in this FAQ](🔗), and queried [through the Encoding Status endpoint](🔗).




# Create a Simple Live Encoding Job

## REST API Call

The simplest way to create a simple encoding is a plain HTTP POST request sent to the Bitmovin API or try it with this [Postman Collection](🔗).



## Bitmovin OpenAPI SDK

Beyond a plain HTTP POST, you can use any of the Bitmovin SDKs to start your job. The following code sample is the equivalent of the REST API call above, but using the Bitmovin OpenAPI Java SDK.





# Cloud Region

A list of all available `cloudRegion` values can be found in our [API-Reference](🔗).




# Inputs

## RTMP

  • Encoder URL: `rtmp://<EXTERNAL_IP>/live/<STREAM_KEY>`

This URL you will have to enter into the configuration of your RTMP Encoder, so it can push your livestream input stream to your Bitmovin Simple Live Encoding. The `<EXTERNAL_IP>` and `<STREAM_KEY>` become available as soon as the Live Encoding is in status `RUNNING`. They can be obtained either

  • ... by viewing the details of the Live Encoding in the Bitmovin dashboard, or

  • ... by querying the details of the Simple Live Encoding Job from the [API](🔗), and extracting its `externalIp` and `streamKey` property.

**Code Sample (Bitmovin OpenAPI Java SDK):**



## SRT

  • Encoder URL: `srt://<EXTERNAL_IP>:2088`

This URL you will have to enter into the configuration of your SRT Encoder, so it can push your livestream input stream to your Bitmovin Simple Live Encoding. The `<External_IP>` for the Live Encoding Ingest Endpoint becomes available as soon as the Live Encoding is in status `RUNNING`. It can be obtained either

  • ... by viewing the details of an Live Encoding in the Bitmovin dashboard, or

  • ... by querying the details of the Simple Live Encoding Job from the [API](🔗)

**Code Sample (Bitmovin OpenAPI Java SDK):**





# Outputs

In order to ensure that the output path is unique for all your Live Encodings, and avoid files being overridden, we recommend that you add a `{uuid}` placeholder in the path, which will be replaced with a unique identifier at run-time.

## Folder Structure

Simple Encoding Jobs will create the following folder structure at the given destination. The output files can be found in the following locations on every configured output:

`<scheme>://<bucket>/path/to/your/live-folder/{uuid}/`

  • `video/{width}x{height}_{bitrate}/` (multiple subfolders containing different output renditions)

  • `audio/` (folder containing audio output files)

  • `index.m3u8` (HLS manifest file)

  • `stream.mpd` (DASH manifest file)

## AWS S3

  • `s3://<my-bucket>/path/to/live/{uuid}/`

Credentials for S3 URLs are mandatory and can be provided via AWS access/secret keys or role-based authentication. Generic S3 is currently not supported.

**AWS Access/Secret Keys**



**Role-based**



`useExternalId` (default: false) is an optional property and controls if the customer’s `orgId` should be used as `externalId` when assuming the AWS role, or not. Its an additional security measure to prevent unauthorized users assume a role by obtaining the role ARN somehow. For more details, please see [S3 Role-Based Input](🔗) for details about the `externalId`, and be aware that the simple encoding API only supports the `externalIdMode` `GLOBAL`.

## Google Cloud Storage (GCS)

  • `gcs://<my-bucket>/path/to/live/{uuid}/`

Credentials for GCS URLs are mandatory and can be provided as HMAC keys or a service account.

**HMAC Keys**



**Service-Account**

_Note that the service credentials provided in the following snippet are just for example. You need to obtain your service credentials from your GCP account._



## Azure Blob Storage

  • `https://<account>.blob.core.windows.net/<container>/path/to/live/{uuid}/`

Credentials for Azure Blob Storage URLs are mandatory and can be provided via the [storage account accesss key credentials.](🔗)



## Akamai NetStorage

  • `https://<host>-nsu.akamaihd.net/<CP-code>/path/to/live/{uuid}/`

Credentials for Akamai NetStorage URLs are mandatory and can be provided via `username` and `password`





# Known Limitations

  • DRM Protection is not available.

  • **Audio**

    • Only the first audio track is extracted from an input file

    • The Output Channel Layout is going to be STEREO (2.0), regardless of what is provided by the input stream.

  • **Webhooks**: Once a Simple Live Encoding Job is successfully started, standard generic Live Encoding webhooks can be used to track the progress of the live encoding.