What is MIME type "video/avi"?

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

video/avi designates files created using the AVI format. It is a container format that holds both video and audio streams in one file.

It organizes multimedia content so that players and editors can access both sound and image data within a single file. The format is supported by many applications, especially on legacy and some modern systems.


The structure allows multiple audio channels and codec data. It was popularized by its simplicity and ease of integration in PC environments.

For additional technical details, see the IANA MIME Type Registry.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: video/avi    
  

HTML

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


    <a href="file.dat" type="video/avi">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/avi');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the correct MIME type for .avi files?

While video/avi is descriptive and used occasionally, the most widely accepted and compatible MIME type is video/x-msvideo. You may also encounter variations like video/msvideo or application/x-troff-msvideo on older systems, but video/x-msvideo is the standard recommendation for serving .avi files.

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

Generally, no. Most modern browsers (such as Chrome, Firefox, and Safari) do not natively support the AVI container or the legacy codecs often contained within it. For web compatibility, it is best to convert your video to video/mp4 (H.264) or video/webm.

How do I configure Apache to serve AVI files correctly?

You can ensure the correct Content-Type header is sent by adding the line AddType video/x-msvideo .avi to your .htaccess file or main configuration. If you prefer using video/avi, use AddType video/avi .avi, but be aware that legacy clients prefer the x-msvideo subtype.

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

This usually occurs because browsers lack the internal decoders to play AVI files, prompting them to download the file for local playback instead. It can also happen if the server is misconfigured to send the file as application/octet-stream rather than a specific video MIME type.

What is the difference between video/avi and video/x-msvideo?

The x- prefix in video/x-msvideo indicates it was originally defined as a non-standard or experimental type by Microsoft, yet it became the de facto standard. video/avi is a more logical name but is less historically entrenched in server configurations and browser recognition lists.

Why do some AVI files fail to play even in desktop players?

AVI is a container format, which means it wraps video and audio streams that may be compressed using different codecs (e.g., DivX, Xvid, Cinepak). If the media player lacks the specific codec used to compress the video stream inside the container, the file will not play correctly.

How do I add AVI support to Nginx?

Open your mime.types file (usually located in /etc/nginx/) and ensure the line video/x-msvideo avi; exists. If you want to support the alternative type as well, you can modify it to video/x-msvideo video/avi avi; and then reload Nginx.

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.