# OutputOptions

Artifact: [androidx.camera:camera-video](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/video/OutputOptions.java+class:androidx.camera.video.OutputOptions) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

*** ** * ** ***

<br />

```
public abstract class OutputOptions
```

<br />

Known direct subclasses [FileDescriptorOutputOptions](https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions), [FileOutputOptions](https://developer.android.com/reference/androidx/camera/video/FileOutputOptions), [MediaStoreOutputOptions](https://developer.android.com/reference/androidx/camera/video/MediaStoreOutputOptions)

|---|---|
| `https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions` | A class providing options for storing the result to a given file descriptor. |
| `https://developer.android.com/reference/androidx/camera/video/FileOutputOptions` | A class providing options for storing the result to a given file. |
| `https://developer.android.com/reference/androidx/camera/video/MediaStoreOutputOptions` | A class providing options for storing output to MediaStore. |

*** ** * ** ***

Options for configuring output destination for generating a recording.

A `https://developer.android.com/reference/androidx/camera/video/PendingRecording` can be generated with `https://developer.android.com/reference/androidx/camera/video/Recorder#prepareRecording(android.content.Context,androidx.camera.video.FileOutputOptions)` for different types of output destination, such as `https://developer.android.com/reference/androidx/camera/video/FileOutputOptions`, `https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions` and `https://developer.android.com/reference/androidx/camera/video/MediaStoreOutputOptions`.

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/camera/video/FileOutputOptions` |   |
| `https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions` |   |
| `https://developer.android.com/reference/androidx/camera/video/MediaStoreOutputOptions` |   |

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#DURATION_UNLIMITED() = 0` Represents an unlimited duration. |
| `static final int` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#FILE_SIZE_UNLIMITED() = 0` Represents an unbound file size. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) long` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#getDurationLimitMillis()()` Gets the limit for the video duration in milliseconds. |
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) long` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#getFileSizeLimit()()` Gets the limit for the file size in bytes. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/location/Location.html` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#getLocation()()` Returns a `https://developer.android.com/reference/android/location/Location.html` object representing the geographic location where the video was recorded. |

## Constants

### DURATION_UNLIMITED

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/camera#1.3.0)

```
public static final int DURATION_UNLIMITED = 0
```

Represents an unlimited duration.

### FILE_SIZE_UNLIMITED

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

```
public static final int FILE_SIZE_UNLIMITED = 0
```

Represents an unbound file size.

## Public methods

### getDurationLimitMillis

Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/camera#1.3.0)

```
public @IntRange(from = 0) long getDurationLimitMillis()
```

Gets the limit for the video duration in milliseconds.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) long` | the video duration limit in milliseconds or `https://developer.android.com/reference/androidx/camera/video/OutputOptions#DURATION_UNLIMITED()` if it's unlimited. |

### getFileSizeLimit

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

```
public @IntRange(from = 0) long getFileSizeLimit()
```

Gets the limit for the file size in bytes.

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) long` | the file size limit in bytes or `https://developer.android.com/reference/androidx/camera/video/OutputOptions#FILE_SIZE_UNLIMITED()` if it's unlimited. |

### getLocation

Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/camera#1.2.0)

```
public @Nullable Location getLocation()
```

Returns a `https://developer.android.com/reference/android/location/Location.html` object representing the geographic location where the video was recorded.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/location/Location.html` | the location object or `null` if no location was set. |