What is MIME type "video/ogg"?

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

video/ogg signals video content stored in the open Ogg container format. It delivers streaming and local video with open codecs like Theora for video and supports audio tracks encoded with codecs such as Vorbis, OPUS, or Speex.

This MIME type is favored in projects that require a patent-free solution and better browser support without proprietary restrictions. It is common in open-source media players and web applications that stream video directly in the browser.


Files using this MIME type come with various extensions such as OGG, OGV, OPUS, SPX, OGA, OGX, and OGM.

For more detailed specifications, see the IANA video/ogg page or check the Ogg Wikipedia entry.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: video/ogg    
  

HTML

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


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

Associated file extensions

FAQs

Which web browsers support video/ogg?

video/ogg is natively supported by Mozilla Firefox, Google Chrome, and Opera. However, Safari (on macOS and iOS) and Internet Explorer do not natively support the Ogg Theora format, so developers should always provide an MP4 fallback source in the HTML5 video tag.

How do I use video/ogg in an HTML5 video player?

You should use the <source> element within the <video> tag to specify the file and its MIME type. For example: <source src="video.ogv" type="video/ogg">. To ensure maximum compatibility, include a second source line pointing to an MP4 file.

What is the difference between video/ogg and audio/ogg?

video/ogg indicates that the Ogg container holds a video stream (usually encoded with Theora) and potentially an audio stream. In contrast, audio/ogg is strictly for audio-only files (typically Vorbis or Opus). While the extension .ogg is sometimes used for both, the Xiph.org Foundation recommends using .ogv for video and .oga or .ogg for audio to prevent confusion.

How do I configure Apache to serve Ogg video files correctly?

You need to add the correct MIME type directive to your .htaccess file or main configuration. Add the line: AddType video/ogg .ogv .ogg. This ensures the server sends the correct Content-Type header, which is required for browsers to render the video properly.

How do I set up Nginx to serve video/ogg?

In your nginx.conf or the mime.types file included by it, ensure the following mapping exists: video/ogg ogv ogg;. If the server sends the generic application/octet-stream instead, browsers may download the file rather than playing it.

Should I use the .ogg or .ogv extension for video?

It is best practice to use the .ogv extension for files served as video/ogg. This clearly distinguishes them from audio-only Ogg files. However, legacy files often use the .ogg extension, and most media players will inspect the file header to determine the content regardless of the extension.

Why won't my Ogg video play even with the correct MIME type?

If the MIME type is correct but playback fails, the issue is often the codec. The video/ogg type generally implies the Theora video codec; if the video inside the Ogg container is encoded with a newer or unsupported codec, the browser may not be able to decode it.

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.