Incompatible streams when downloading YouTube Now Playing videos

When downloading YouTube Now Playing videos, you may encounter the following warning:


A tooltip over Download anyway button shows a message that video and audio stream types do not match, and the video will be downloaded as .MKV file:


A typical video file usually has a container, which stores one or more video and audio streams. It may also have additional items such as subtitles, still images, chapters, tags. The name of a container used in a video file usually matches the file's extension: 3GP, MP4, MOV, etc.

Let's take a look at two popular container formats which are used by YouTube: MP4 and WebM.

MP4 container is officially called MPEG-4 Part 14; it is a modern format which supports streaming and standardized as ISO/IEC 14496-14:2020. It allows embedding the following multimedia data:
• Video streams, such as H.263, H.264, H.265, and older MPEG-1 and MPEG-2
• Audio streams, most commonly AAC, also MP1, MP2, MP3, ALS, SLS, and others
• Subtitles
• Various service information about video resolution, frame rates, orientation, etc.
MP4 is an open format (not open source), but not free. There are open-source implementations of MP4 format.

WebM in contrast is a free and open format, developed by a number of companies (now Google).  It allows embedding the following multimedia data:
• Video streams: VP8, VP9, AV1
• Audio streams: Vorbis, Opus

As you can see, MP4 and WebM containers cannot hold video and audio streams of each other. If you're dealing with MP4 streams, you have to store them into a MP4 container, and vice versa for WebM streams — you put them into .webm file.

YouTube's videos are usually distributed as a series of MP4 and WebM audio and video streams. When you play a video on YouTube, its player requests corresponding video and audio streams based on information about your web browser, operating system, location, connection bandwidth, etc. AVD intercepts these requests and checks for their type. If the streams type match each other (e.g. both streams are MP4 or both are WebM), then no warning is displayed, and you're prompted to download the video, in either MP4 or WEBM format.

When the streams type do not match, then AVD displays a notification that the video will be downloaded as MKV file, because this container can hold MP4 and WebM streams at the same time. But not all video players support MKV files yet, so make sure you have a corresponding video player installed (for example, VLC Player).

Note that Media Player Classic (MPC-HC) version 1.7.13 which is discontinued since 2017, cannot play AV1-encoded video files.