Video MIME types

So, we’re all gee’ed up with HTML5 video and it’s all working smoothly, so clients are going to want to start updating their videos themselves.

Grand. But trying to explain to users how to convert their videos into 3 different formats with the correct encoding settings is not a task to be taken lightly. I’ve dealt with people who work with digital video every day, and they still don’t grasp it. And for many, they simply don’t want to – they’ve got other things to do.

As a result I’m working on integrating video transcoding services into my CMS. This has all been fairly painless to get working, but now I come to think about ensuring that malicious files are not uploaded to the server. Now, as long as these files can be ensured to never be executed on your server, only sent to the encoding server for conversion, you can let them worrry about all of that – but if you can’t ensure that, or are just particularly paranoid, you might want to do some heavy checking when receiving the files.

Zencoder, which I am using currently, reckon they can convert pretty much anything, and users being users, they are bound to decide to try and send you some rare file format.

With this in mind I’ve compiled a list of video extensions (which are NOT to be relied on as an indicator of a valid file type), and video MIME types.
Checking MIME types can be tricky – not all server setups support MIME checking – and many video formats don’t have an associated MIME type, instead reporting as ‘application/octet-stream’. But you can certainly exclude the upload of any files with a MIME type not on your list.

So I have compiled three lists, none of them should be considered completely exhaustive, but it took some effort to compile these from a variety of sources, so it may be a useful resource. There are some MIMEs I don’t have extensions listed for, and vice versa (partcularly where an extension doesn’t have a type), as well as types which may be missing valid extensions but there is a limit to how much effort it was worth putting into it.

Errata and addendum are most welcome!

Video MIME types and associated extensions

"video/fli","fli,flc""video/flc","flc,vfw""video/flv","flv""video/gl","gl""video/mp4","mp4,mpg4""video/mpeg","m1v,m2v,mp2,mp3,mpa,mpe,mpeg,mpegv,mpg,mpv,vbs,rmvb""video/mpeg-system","mpg,mpeg,mpe,vob""video/msvideo","avi,vfw""video/ogg","ogg""video/quicktime","mov,moov,qt,mp4,qtm,qts""video/sd-video","sdv""video/ty","tivo""video/vc1","vc1""video/vdo","vdo""video/vivo","viv,vivo""video/vnd.divx","divx""video/vnd.rn-realvideo","rv""video/vnd.vivo","viv""video/vosaic","vos""video/vp3","vp3""video/wavelet","wv""video/webm","webm,vp8""video/wtv","wtv""video/x-amt-demorun","xdr""video/x-amt-showrun","xsr""video/x-atomic3d-feature","fmf""video/x-divx","divx""video/x-dl","dl""video/x-dv","dif,dv""video/x-fli","fli,flc""video/x-flv","flv""video/x-gl","gl""video/x-isvideo","isu""video/x-m4v","m4v""video/x-matroska","mkv""video/x-motion-jpeg","mjpg""video/x-mpb","mpb""video/x-mpeg","m2ts,mp2,mp3,mpe,mpeg,mpegv,mpg,mpv,mts""video/x-mpeg-system","mpg,mpeg,mpe,vob""video/x-mpeg2","mp2,mpv2,mp2v,mp2ve""video/x-mpeq2a","mp2""video/x-ms-asf","asf,asx""video/x-ms-asf-plugin","asf,asx,wmv""video/x-msvideo","avi,asf,vfw,wmv""video/x-ms-wm","wm,wmv""video/x-ms-wmp","wmv,wmp""video/x-ms-wm","wm""video/x-ms-wmv","wmv""video/x-ms-wmx","wmx""video/x-ms-wvx","wvx,wmv""video/x-mve","mve""video/x-ogg","ogm,ogv""video/x-pva","pva""video/x-qtc","qtc""video/x-quicktime","mov,moov,qt,mp4,qtm,qts""video/x-raw-yuv","yuv""video/x-scm","scm""video/x-sgi-movie","movie,mv""video/x-videogram","vgm,vgx,xdr""video/x-videogram-plugin","vgp""video/x-vp3","vp3""video/x-vp6","vp6""video/x-vp7","vp7""video/x-wmv","wmv""video/x-xvid","xvid"

Video MIME types

application/mp21application/mp4application/mpeg4-iodapplication/mpeg4-muxcodetableapplication/mxfapplication/oggapplication/octet-streamapplication/vnd.ms-asfapplication/vnd.rn-realmediaapplication/vnd.rn-realmedia-vbrapplication/vnd.rn-realplayerapplication/x-nsv-vp3-mp3application/x-mplayer2application/x-ms-wmsapplication/x-ms-wmpapplication/x-nsv-vp3-mp3application/x-oggapplication/x-troff-msvideoapplication/x-winampapplication/x-shockwave-flashaudio/x-m4aaudio/x-pn-realaudioaudio/x-pn-realaudio-pluginaudio/x-pn-realvideoaudio/x-realaudiovideo/3gppvideo/3gpp2video/animaflexvideo/annodexvideo/avivideo/avs-videovideo/divxvideo/dlvideo/flivideo/flcvideo/glvideo/gvivideo/h264video/m75video/mj2video/mp4video/mp4v-esvideo/mpegvideo/mpeg4video/mpeg4-genericvideo/msvideovideo/nvvideo/oggvideo/quicktimevideo/sd-videovideo/tyvideo/vc1video/vdovideo/vivovideo/vnd.avivideo/vnd.divxvideo/vnd.rn-realvideovideo/vnd.vivovideo/vosaicvideo/vp3video/waveletvideo/webmvideo/wtvvideo/x-3ivxvideo/x-ajpvideo/x-amt-demorunvideo/x-amt-showrunvideo/x-amvvideo/x-atomic3d-featurevideo/x-divxvideo/x-dlvideo/x-dvvideo/x-ffvvideo/x-flivideo/x-flvvideo/x-glvideo/x-h263video/x-h264video/x-huffyuvvideo/x-indeovideo/x-intel-h263video/x-isvideovideo/x-ivfvideo/x-jpegvideo/x-la-asfvideo/x-m4vvideo/x-matroskavideo/x-motion-jpegvideo/x-mpegvideo/x-mpeg2video/x-mpeq2avideo/x-ms-asfvideo/x-ms-asf-pluginvideo/x-ms-wmvideo/x-ms-wmxvideo/x-ms-wmvvideo/x-ms-wvxvideo/x-msmpegvideo/x-msvideovideo/x-msvideocodecvideo/x-oggvideo/x-pn-multirate-realvideovideo/x-pn-realvideo video/x-pvavideo/x-qtcvideo/x-quicktimevideo/x-raw-rgbvideo/x-raw-yuvvideo/x-rlevideo/x-scmvideo/x-sgi-movievideo/x-svqvideo/x-tarkinvideo/x-theoravideo/x-videogramvideo/x-videogram-pluginvideo/x-vp3video/x-vp6video/x-vp7video/x-wmvvideo/x-xvid

Video file extensions

3gp3g23gp23gpp3gpp23p2aflajpamvasfasxaviavsaxvbdmbdmvdifdivxdldvdv-avidvxf4vfliflcflvfmfglgvihdmovhdvisuivfivrls4k3gm15m1sm1vm21m2tm2tsm2pm2sm2vm4em4vm75mgvmj2mjpmjpgmkvmnvmodmoovmovmoviemp2mp21mp2vmp3mp4mpampempegmpgmpg4mpvmpv2mpv2emqvmtsmtvmvmxfnsvoggogvpmfpvapvrpxvqtqtcqtmr3drecrmrmdrmvbrprtsrvscmtivotodtp0tpdvbsvc1vdovgmvgpvgxvfwvidvivvivovobvosvp3vrowebmwmwmpwmvwtvwvwmxwvxxdrxsryu

Leave a Reply

Your e-mail address will not be published. Required fields are marked *