What is MIME type "video/msvideo"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

video/msvideo is the official MIME type for the AVI format. It identifies files that are multimedia containers combining audio and video streams. These streams are interleaved to keep the media synchronized.

The MIME type ensures that systems know what to expect, making the file versatile in various digital environments.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: video/msvideo    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="video/msvideo">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'video/msvideo');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the correct MIME type for .avi files?

The official MIME type for .avi files is video/msvideo. While you might see variations like video/avi or video/x-msvideo used in legacy systems, video/msvideo is the standard identifier defined by IANA for Microsoft Audio Video Interleave files.

Does the HTML5 <video> tag support video/msvideo?

Generally, no. Most modern web browsers (like Chrome, Firefox, and Safari) do not natively support the AVI container or its associated codecs within the HTML5 <video> element. To ensure video plays directly in a browser, you should convert the file to a more web-friendly format like MP4 or WebM.

Why does my browser download the AVI file instead of playing it?

This happens because the browser cannot decode the video/msvideo content natively. When a browser encounters a MIME type it cannot render, the default behavior is to treat the file as a binary attachment and force a download, allowing you to play it in a desktop media player like VLC.

How do I configure Apache to serve AVI files correctly?

You can ensure Apache sends the correct headers by adding the MIME type to your configuration or .htaccess file. Add the line AddType video/msvideo .avi to ensure that files with the .avi extension are served with the correct content type.

Is video/x-msvideo different from video/msvideo?

Functionally, they are often used interchangeably, but video/msvideo is the standard. The prefix x- usually denotes an experimental or non-standard type; however, because AVI is an older format, many older servers and applications still default to video/x-msvideo for compatibility.

Is the AVI format good for web streaming?

Not typically. AVI files using video/msvideo are often larger and less compressed than modern formats, and the metadata required to start playback is sometimes located at the end of the file. This makes them poor candidates for streaming compared to formats like H.264 or VP9.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.