This error shows up in browsers when a video on a web page can’t be played, and the reason is almost always one of a small set of causes. Here’s the breakdown.
What the error actually means
The HTML5 video element requires that the browser support both the video container format and the codec used to encode the video. A MIME type is essentially the label that tells the browser what kind of file it’s receiving. If the browser doesn’t support the format, or if the server is sending the wrong MIME type, the video element throws this error.
Common video format combinations:
- MP4 with H.264 – supported by virtually all modern browsers
- WebM with VP8 or VP9 – open format, supported by Chrome, Firefox, Edge
- Ogg with Theora – supported by Firefox, limited elsewhere
- MP4 with H.265 (HEVC) – limited browser support, often requires hardware decoding
Cause 1: Wrong MIME type from the server
The server serving the video file may not be configured to send the correct Content-Type header. If the server sends a video/mpeg file with a header of application/octet-stream, the browser doesn’t know it’s a video.
This is typically a server configuration issue. For Apache, you’d add MIME type mappings in .htaccess. For Nginx, in the mime.types file. If you’re debugging a page you control, check the response headers in browser dev tools (Network tab > select the video file > Headers).
Cause 2: Format not supported by the browser
If the video is encoded with a codec the browser doesn’t support natively:
- Try a different browser. Chrome, Firefox, and Edge have different codec support profiles.
- Firefox requires a separate codec package on some Linux distributions for H.264
- Safari on macOS supports H.264/H.265 natively but has spotty WebM support
Cause 3: Browser extensions blocking content
Ad blockers and privacy extensions can block video resources if the URL matches a filter list. Try disabling your ad blocker temporarily for the page.
Cause 4: CORS restriction
If the video file is hosted on a different domain than the page, the server must include correct CORS headers (Access-Control-Allow-Origin). Without these, the browser blocks the resource load.
For developers building video into web pages:
The correct approach is to provide multiple source elements inside the video tag – one in MP4/H.264 for broad compatibility and one in WebM as a fallback. The browser picks the first format it supports.