[FFmpeg-user] mapping formats to file extensions and MIME types
Carl Eugen Hoyos
ceffmpeg at gmail.com
Sun May 21 15:48:42 EEST 2017
2017-05-21 14:30 GMT+02:00 Ofer Nave <odigity at gmail.com>:
> 2) Compare it against some kind of whitelist of formats/codecs/etc
> that I've decided to allow.
> (Necessary because ffmpeg will, for example,
> "recognize" a text file, and even report a video stream in it.)
You can disable the text demuxer at build time or you can
use the global -format_whitelist option to only allow formats
that you want (without needing any processing).
> 3) If whitelisted, do further processing.
>
> Additionally, I was going to attempt to determine what file extension
> and MIME type would be most appropriate to associate with the
> original file and store those in the DB for reference purposes, as
> well as to set the contentType on the original file, since it is
> technically serveable via our private web server. But I can do
> without either if it proves to be too difficult.
You can just store the FFmpeg demuxer type in you DB, ignoring
the mime-type.
> I would also appreciate any advice on assembling such a whitelist.
Why would you disable any formats?
Carl Eugen
More information about the ffmpeg-user
mailing list