You can specify format options using a structured object or a string.
videoonlyDownloads video stream only.
'2160p', '1440p', '1080p', '720p', '480p', '360p', 'highest', 'lowest''mp4', 'webm'audioonlyDownloads audio stream only.
0 (best) to 10 (worst)'mp3', 'aac', 'flac', 'm4a', 'opus', 'wav'audioandvideoDownloads a single file containing both audio and video (no merging required).
'highest', 'lowest''mp4', 'webm'mergevideoDownloads best video and best audio separately and merges them using FFmpeg.
videoonly'mkv', 'mp4', 'webm'