[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/e54e499ff553dab51e6d9d1aebc090b50fec29ba/src/utils/FormatUtils.ts#L138)