How to use the stream-mmmagic.config function in stream-mmmagic

To help you get started, we’ve selected a few stream-mmmagic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nknapp / html5-media-converter / src / Html5MediaConverter.js View on Github external
var _ = require("underscore");
var path = require("path");
var VideoConverter = require("./VideoConverter.js");
var Stream = require('stream');
var magic = require('stream-mmmagic');
magic.config.magicFile = "(null),"+path.join(__dirname,"../misc/magic");
var presets = require("./presets.js");


/**
 *
 *
 * @param options configuration options
 * @param options.ffmpeg {String} path to ffmpeg
 * @param options.im {String} path to imagemagick
 * @constructor
 */
function MediaConverter(options) {
    options = _.defaults(options || {}, {
        programs: {
            // Path to the ffmpeg program
            ffmpeg: 'ffmpeg',

stream-mmmagic

sniff the start of a stream (non-destructively) to detect the file type and encoding

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular stream-mmmagic functions