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

The length of a media segment for an output group.

Express the length in whole seconds with {@link Segment.seconds} or in milliseconds
with {@link Segment.milliseconds}. Some output groups (e.g. HLS) only support
whole-second segments and will reject sub-second millisecond values.

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

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as medialive_alpha from '@aws-cdk/aws-medialive-alpha';
const segment = medialive_alpha.Segment.milliseconds(123);
```

## Methods

- `milliseconds(value: number): Segment // chainable` (static) — A segment length in milliseconds.

  **Parameters**

  - `value` — Number of milliseconds (non-negative integer).

- `seconds(value: number): Segment // chainable` (static) — A segment length in whole seconds.

  **Parameters**

  - `value` — Number of seconds (non-negative integer).
