What is MIME type "video/mpeg4-generic"?

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

video/mpeg4-generic is a MIME type that marks media files using the MPEG-4 container standard (Version 2). It organizes video content and can include audio streams.
It enables playback, editing, and streaming across many devices.

This MIME type applies to files like MP4 and M4A, both based on the MPEG-4 File Format, Version 2.
Learn more about MPEG-4 from MPEG-4 on Wikipedia.

Associated file extensions

Usage Examples

HTTP Header

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


    Content-Type: video/mpeg4-generic    
  

HTML

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


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

Associated file extensions

FAQs

How is video/mpeg4-generic different from video/mp4?

video/mp4 is the standard MIME type for serving .mp4 files for HTML5 playback in browsers. video/mpeg4-generic is typically associated with RTP (Real-time Transport Protocol) streams defined in RFC 3640 and may not play natively in standard web video players.

Why won't my browser play a file served as video/mpeg4-generic?

Most browsers (like Chrome or Firefox) expect the video/mp4 Content-Type header to trigger the built-in media player. If a server sends video/mpeg4-generic, the browser may interpret it as an unknown binary file and force a download instead of streaming it.

How do I configure Apache to serve MP4 files with the correct MIME type?

To ensure maximum compatibility, you should usually map the extension to the standard type. Add AddType video/mp4 .mp4 to your .htaccess or server config file. If you specifically require video/mpeg4-generic for a streaming application, use AddType video/mpeg4-generic .mp4.

Can this MIME type be used for audio files like .m4a?

Yes, because the MPEG-4 container can hold generic streams, this type is sometimes applied to .m4a files. However, for audio-only playback on the web, using audio/mp4 or audio/x-m4a is significantly more reliable.

What is the security risk of allowing video/mpeg4-generic uploads?

Like any media container, MPEG-4 files can theoretically contain malicious code exploiting decoder vulnerabilities. Ensure your server validates the file structure and does not rely solely on the MIME type or file extension provided by the user.

How do I change the MIME type for MP4s in Nginx?

Edit your mime.types file (usually located in /etc/nginx/). Look for the .mp4 entry and ensure it is set to video/mp4 mp4; for standard web use. Reload Nginx with sudo service nginx reload to apply changes.

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.