[extractor/twitch] Support AV1/HEVC extraction
diff --git a/yt_dlp/extractor/twitch.py b/yt_dlp/extractor/twitch.py
index c55786a0dce..80cba09155d 100644
--- a/yt_dlp/extractor/twitch.py
+++ b/yt_dlp/extractor/twitch.py
@@ -191,17 +191,25 @@ def _get_thumbnails(self, thumbnail):
         }] if thumbnail else None
 
     def _extract_twitch_m3u8_formats(self, path, video_id, token, signature):
-        return self._extract_m3u8_formats(
+        formats = self._extract_m3u8_formats(
             f'{self._USHER_BASE}/{path}/{video_id}.m3u8', video_id, 'mp4', query={
                 'allow_source': 'true',
                 'allow_audio_only': 'true',
                 'allow_spectre': 'true',
                 'p': random.randint(1000000, 10000000),
+                'platform': 'web',
                 'player': 'twitchweb',
+                'supported_codecs': 'av1,h265,h264',
                 'playlist_include_framerate': 'true',
                 'sig': signature,
                 'token': token,
             })
+        for fmt in formats:
+            if fmt.get('vcodec') and fmt['vcodec'].startswith('av01'):
+                # mpegts does not yet have proper support for av1
+                fmt['downloader_options'] = {'ffmpeg_args_out': ['-f', 'mp4']}
+
+        return formats
 
 
 class TwitchVodIE(TwitchBaseIE):

Signals support for AV1 and HEVC codecs.

Tested on this stream: https://www.twitch.tv/r0dn3y

Before:
```
ID         EXT RESOLUTION FPS │   TBR PROTO │ VCODEC      ACODEC     ABR
────────────────────────────────────────────────────────────────────────
audio_only mp4 audio only     │  160k m3u8  │ audio only  mp4a.40.2 160k
480p30     mp4 854x480     30 │ 1385k m3u8  │ avc1.64001F mp4a.40.2

```

After:
```
ID               EXT RESOLUTION FPS HDR │    TBR PROTO │ VCODEC        ACODEC     ABR
─────────────────────────────────────────────────────────────────────────────────────
audio_only       mp4 audio only         │   160k m3u8  │ audio only    mp4a.40.2 160k
480p30           mp4 854x480     30     │  1385k m3u8  │ avc1.64001F   mp4a.40.2
720p60           mp4 1280x720    60 10  │  4041k m3u8  │ av01.0.08M.10 mp4a.40.2
1080p60          mp4 1920x1080   60 10  │  6690k m3u8  │ av01.0.09M.10 mp4a.40.2
1440p60__source_ mp4 2560x1440   60     │ 12946k m3u8  │ hvc1.2.4.L150 mp4a.40.2
```


<details open><summary>Template</summary> <!-- OPEN is intentional -->

<!--

# PLEASE FOLLOW THE GUIDE BELOW

- You will be asked some questions, please read them **carefully** and answer honestly
- Put an `x` into all the boxes `[ ]` relevant to your *pull request* (like [x])
- Use *Preview* tab to see how your *pull request* will actually look like

-->

### Before submitting a *pull request* make sure you have:
- [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [yt-dlp coding conventions](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#yt-dlp-coding-conventions)
- [x] [Searched](https://github.com/yt-dlp/yt-dlp/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests
- [x] Checked the code with [flake8](https://pypi.python.org/pypi/flake8) and [ran relevant tests](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions)

### In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check all of the following options that apply:
- [x] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/)
- [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence)

### What is the purpose of your *pull request*?
- [x] Fix or improvement to an extractor (Make sure to add/update tests)
- [ ] New extractor ([Piracy websites will not be accepted](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-the-website-primarily-used-for-piracy))
- [ ] Core bug fix/improvement
- [ ] New feature (It is strongly [recommended to open an issue first](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#adding-new-feature-or-making-overarching-changes))

</details>
