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

# Function: chooseFormat()

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

Selects the format that best matches the given options.

## Parameters

• **options**: [`FormatOptions`](../../Types/interfaces/FormatOptions.md)

Options

• **streaming\_data?**: [`IStreamingData`](../../APIResponseTypes/interfaces/IStreamingData.md)

Streaming data

## Returns

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

## Defined in

[src/utils/FormatUtils.ts:138](https://github.com/LuanRT/YouTube.js/blob/4729016fb98e7045ee4043857be7eef780c01e35/src/utils/FormatUtils.ts#L138)
