> **Experimental**
>
> `@aws-cdk/aws-medialive-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# OutputLocking

Output locking synchronises the frames emitted by a channel's two pipelines. Use the static factory methods to select a strategy:.

- `OutputLocking.pipeline()` — synchronise each pipeline's output to the other.
- `OutputLocking.epoch()` — synchronise each pipeline's output to the Unix epoch.
- `OutputLocking.disabled()` — do not synchronise pipelines.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/channel.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-medialive-alpha/lib/channel.ts#L680)

## Example

```ts
declare const stack: Stack;
declare const input: medialive.IInput;
declare const bucket: s3.IBucket;
declare const video: medialive.EncodeConfiguration;
declare const audio: medialive.EncodeConfiguration;

new medialive.Channel(stack, 'Channel', {
  inputs: [{ input }],
  timecodeConfig: {
    source: medialive.TimecodeSource.EMBEDDED,
  },
  globalConfiguration: {
    outputLocking: medialive.OutputLocking.epoch(),
    outputTimingSource: medialive.OutputTimingSource.INPUT_CLOCK,
  },
  outputGroups: [
    medialive.OutputGroupConfiguration.hls({
      name: 'hls',
      destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
      outputs: [{ encodes: [video, audio], outputName: 'hls_out' }],
    }),
  ],
});
```

## Initializer

```ts
new OutputLocking()
```

## Methods

- `disabled(customEpoch?: string): OutputLocking // chainable` (static) — Disable output locking (optionally with a custom epoch).

- `epoch(props?: EpochOutputLockingProps): OutputLocking // chainable` (static) — Lock outputs to an epoch.

- `pipeline(props?: PipelineOutputLockingProps): OutputLocking // chainable` (static) — Lock pipelines to each other.
