> **Experimental**
>
> `@aws-cdk/aws-medialive-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (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.

Obtainable from: Segment.milliseconds, Segment.seconds

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

## Example

TypeScript:

```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);
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive_alpha as medialive_alpha

segment = medialive_alpha.Segment.milliseconds(123)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.medialive.alpha.*;

Segment segment = Segment.milliseconds(123);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaLive.Alpha;

var segment = Segment.Milliseconds(123);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import medialive_alpha "github.com/aws/aws-cdk-go/awsmedialivealpha"

segment := medialive_alpha.Segment_Milliseconds(jsii.Number(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).
