[youtubei.js](../../../../README.md) / [FormatUtils](../README.md) / chooseFormat

# Function: chooseFormat()

> **chooseFormat**(`options`, `streaming_data?`): [`Format`](../../Misc/classes/Format.md)

Defined in: [src/utils/FormatUtils.ts:138](https://github.com/LuanRT/YouTube.js/blob/0733f60b57877f6b8b87dfd5cc6195b5085f5c09/src/utils/FormatUtils.ts#L138)

Selects the format that best matches the given options.

## Parameters

### options

[`FormatOptions`](../../Types/interfaces/FormatOptions.md)

Options

### streaming\_data?

[`IStreamingData`](../../../../interfaces/IStreamingData.md)

Streaming data

## Returns

[`Format`](../../Misc/classes/Format.md)
