[FFmpeg-user] mapping formats to file extensions and MIME types
Ofer Nave
odigity at gmail.com
Sat May 20 02:51:41 EEST 2017
I tried posting this to StackOverflow, but haven't gotten any responses yet:
http://stackoverflow.com/questions/44035411/how-to-map-ffmpeg-formats-to-mime-types-and-file-extensions
I'll copy the question here for convenience:
Anyone know of a reference for mapping ffmpeg format values to MIME types
and recommended file extension? My google attempt failed to turn up
anything.
I did manually put together a small list with guess-work and clues from
Wikipedia, IANA
<https://www.iana.org/assignments/media-types/media-types.xhtml#video>, and
the Mozilla Developer Network
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types>
for
the subset of formats that I encountered in my video input test collection:
ffmpeg Format Extension MIME Type
─────────────────────── ───────── ──────────────────────
asf asf application/vnd.ms-asf
avi avi video/x-msvideo
flv flv video/x-flv
matroska,webm webm video/webm
m4v m4v video/x-m4v
mov,mp4,m4a,3gp,3g2,mj2 mp4 video/mp4
mpeg mpeg video/mpeg
mpegts mpeg video/mpeg
mpegvideo mpeg video/mpeg
ogg ogv video/ogg
matroska mkv video/x-matroska
webm webm video/webm
No idea if I've made the right calls, though.
(The test files already have file extensions, but I'm operating on the
assumption that the extension of a file a user uploads is irrelevant, and
that the file should be renamed based on ffprobe and intelligent mapping...)
-ofer
More information about the ffmpeg-user
mailing list