

# Step 1: Design the workflow
<a name="opl-step-get-ready"></a>

When you implement output locking, there are special considerations in your design of the inputs, output groups, outputs, and output encodes (video streams) in the events.

**Topics**
+ [

# Design the inputs
](opl-step-design-inputs.md)
+ [

# Design the outputs
](opl-step-get-ready-outputs.md)
+ [

# Example of a workflow
](opl-example.md)

# Design the inputs
<a name="opl-step-design-inputs"></a>

When you design a workflow that implements Elemental Live output locking, you must obtain information about the sources. 

**Topics**
+ [

## Determine the resources
](#opl-step-get-ready-resources)
+ [

## Decide how to produce the sources
](#opl-step-get-ready-produce-source)
+ [

## Obtain information about the sources
](#opl-step-get-ready-source-info)

## Determine the resources
<a name="opl-step-get-ready-resources"></a>

Identify the number of sources, output encodes, and events that you need.

**For output redundancy workflows**

For output redundancy, you need two sources, two output encodes, and two events. Each event uses one input and produces one output encode.

**For distributed encoding workflows**

For distributed encoding, calculate the numbers as follows:
+ The number of output encodes: You need one output encode for each video rendition in the ABR stack.
+ The number of events: Decide how many output encodes each Elemental Live appliance can handle, based on the density capabilities of the appliance. An appliance might be able to produce only one output encode if that encode is a 4K rendition. However, an appliance might be able to produce several lower-resolution output encodes (renditions).

  When you know the number of appliances, you know the number of events—one event per appliance.
+ The number of sources: You need one source for each event.

## Decide how to produce the sources
<a name="opl-step-get-ready-produce-source"></a>

Decide how you will produce the sources:
+ You might produce the streams for each event using a different contribution encoder for each event. 
+ Instead, you might produce the sources once, then use a video router upstream of Elemental Live to product identical streams.

Make sure that the [sources are identical](output-locking-requirements.md#output-locking-input-requirements). 

## Obtain information about the sources
<a name="opl-step-get-ready-source-info"></a>

Obtain the following information:
+ The characteristics of the video.
+ The type of timecode that each source includes.

# Design the outputs
<a name="opl-step-get-ready-outputs"></a>

When you design a workflow that implements Elemental Live output locking, you must decide which output group types you will produce, design the outputs in the output groups, and decide on the video encoding characteristics of the output type or types. 

This section covers considerations that affect your design.

**Topics**
+ [

## Number of outputs in an output group
](#opl-design-outputs-opg)
+ [

## Number of encodes: video encode sharing
](#opl-design-outputs-number-encodes)
+ [

## Encodes across the locked events
](#opl-design-outputs-number-encodes-event)
+ [

## Features in an output
](#opl-design-output-features)
+ [

## Motion graphic overlay
](#opl-design-output-features-motion-gx)

## Number of outputs in an output group
<a name="opl-design-outputs-opg"></a>

For distributed encoding, there will be many cases where one appliance can produce only one output encode. To set up these encodes, create an output group (for example, create an HLS output group), and create one output in that output group. 

There might also be cases where you have determined that one appliance can produce several one lower-resolution output encodes. To set up these encodes, create an output group (for example, create an HLS output group), and create two outputs. Each output contains one of the encodes. 

## Number of encodes: video encode sharing
<a name="opl-design-outputs-number-encodes"></a>

If you have multiple output group types in one event, several different output groups might be able to use the same video encode. 

For example, if you're producing an HLS package and a UDP/TS package, and both packages are encoded with H.264, you might be able to create one video encode that the two output groups share. This sharing reduces the compute demands on the appliance. To share the encodes, create an output in one output group and an output in the other output group. Create one video stream. Set up both outputs to use the same encode.

![\[Diagram showing two output groups sharing a high resolution video stream.\]](http://docs.aws.amazon.com/elemental-live/latest/ug/images/opl-shared-encode.png)


## Encodes across the locked events
<a name="opl-design-outputs-number-encodes-event"></a>

You must set up the video encodes in the locked events as follows:
+ For an output redundancy implementation, the pair of encodes in the same type of output group must be identical. For example, the encode in the output must be identical to the encode in the redundant output.
+ For a distributed encoding implementation, each pair of encodes must be identical, so that the main ABR stack and the redundant ABR stack are identical. For example, you might have one ABR stack consisting of encodes A1, B1, C1, D1, and another ABR stack consisting of encodes A2, B2, C2, D2. Encode A1 must be identical to encode A2, B1 identical to B2, and so on.

 For an explanation of *pairs of encodes*, see [Output locking pairs](opl-redundant-pairs.md).

## Features in an output
<a name="opl-design-output-features"></a>

Some features, such as static graphic overlay, can apply within an individual portion of an event. 

Make sure that you apply the features in the same way in every locked event. For example, if you implement the static overlay in all outputs in one event, then make sure that you set it up on all outputs in the other event. For more information, including diagrams, see [Insertion options and the effect on outputs](insertion-options-and-the-effect-on-outputs.md).

## Motion graphic overlay
<a name="opl-design-output-features-motion-gx"></a>

We strongly recommend against combining motion graphic overlays and output locking. Frame accuracy can't apply to motion graphic overlays that are applied to the video content.

# Example of a workflow
<a name="opl-example"></a>

This section provides an example of the design of an output lock workflow that implements distributed encoding. 

**Note**  
This example refers to *pools*. For an explanation of pools, see [Output locking pools](opl-pools.md).

The following example workflow has two output packages: HLS and MS Smooth. Notice how the ABR stacks are divided into several events within each package. This division is driven by the processing demands on the encodes. Notice that when two outputs are on the same appliance, they can share the same output group. 

Pay attention to the pools that are implied by this design:
+ There are two event pools for five events. One pool contains events A, B, and C. One event contains events D and E. 
+ There are two output group pools. One pool contains the three HLS output groups, shown in yellow. The other contains the two MS Smooth output groups, shown in striped yellow.
+ There are two output pools. One pool contains four HLS outputs, shown in blue. The other contains three MS Smooth outputs, shown in striped blue.
+ There are two encode pools. One pool contains four HLS encodes, shown in red. The other contains three MS Smooth outputs, shown in striped red.

![\[Diagram showing 5 appliances with different HLS and MSS events, outputs, and video stream resolutions.\]](http://docs.aws.amazon.com/elemental-live/latest/ug/images/opl-design-hls-mss-4appliances.png)
