About QuickTime video files
MOV and MP4 share the same box structure, and iPhone videos are usually H.264 or HEVC inside. Chrome and Firefox will often play a .mov served as video/mp4 if the codecs are H.264 and AAC, but not HEVC. For the web, transcode to MP4 (H.264) or WebM.
File signature
MOV files start with "ftypqt " at byte 4 (older files start with a moov or mdat box instead). The extension and the type a browser reports for an upload both
come from the file name, so check these bytes on the server before trusting a file.
Serve .mov with the right Content-Type
Content-Type: video/quicktime
video/quicktime mov qt;
AddType video/quicktime .mov .qt
@mov path *.mov *.qt
header @mov Content-Type "video/quicktime"
curl -sI https://example.com/file.mov | grep -i '^content-type'
# Content-Type: video/quicktime
Set the type in code
res.set('Content-Type', 'video/quicktime');
// Or make the browser download it:
res.attachment('file.mov');
import mimetypes
mimetypes.add_type('video/quicktime', '.mov') # if your system doesn't know it
mimetypes.guess_type('file.mov')[0] # 'video/quicktime'
mime.AddExtensionType(".mov", "video/quicktime")
w.Header().Set("Content-Type", "video/quicktime")
Accept .mov uploads
<input type="file" accept=".mov,.qt,video/quicktime">
The accept attribute only filters the file picker; users can still choose another file. Listing the
extension as well as the type matters, because operating systems don’t always report the type you expect.
Related types
More video
.avi , .mkv , .m3u8 , .ts . Look up any extension or type with the MIME type lookup.
Sources
Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.
Frequently asked questions
What is the MIME type for .mov files?
video/quicktime. The full header is "Content-Type: video/quicktime".
Why does my server send the wrong Content-Type for .mov?
Web servers pick the type from the file extension using a table (mime.types in nginx and Apache). If .mov is missing from that table, they send a default such as application/octet-stream or text/plain. Add the mapping as shown on this page, then check the response with "curl -sI".
How can I check that a file really is MOV?
Look at the first bytes rather than the extension or the type the browser reports, which both come from the file name. MOV files start with "ftypqt " at byte 4 (older files start with a moov or mdat box instead). The MIME type lookup on this site reads them for you when you drop a file on it.