Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including mediainfoq with all npm packages installed. Try it out:

var mediainfoq = require("mediainfoq")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

mediainfoq v0.0.3

Wrapper around the `mediainfo' program for obtaining metadata information about media files with the Q promise library


Wrapper around the mediainfo command for obtaining metadata information about media files with the Q promise library


This module provides an interface to the mediainfo command. It returns the (parsed) output of the command with all the keys lower-cased. For windows user you don't have to install extra packages.


The module exposes just a single interface:

mediainfo("/path/to/file", "/path/to/file2", [...]).then(...)

It's really easier to just see the output, so here:

[{ tracks: 
   [ { type: 'Image',
       format: 'PNG',
       format_info: 'Portable Network Graphic',
       width: '599 pixels',
       height: '599 pixels',
       bit_depth: '32 bits',
       compression_mode: 'Lossless',
       stream_size: '88.1 KiB (100%)' } ],
  complete_name: 'TEST.png',
  format: 'PNG',
  format_info: 'Portable Network Graphic',
  file_size: '88.1 KiB' }]


var mediainfo = require("mediainfoq");

mediainfo("/path/to/file", "/path/to/other/file")
    .then(function (res) {
    }).catch(function (err) {


The mediainfo command has to be available somewhere in the PATH of the user node is running as.

  • sudo apt-get install mediainfo - should install the latest on Linux.


MIT License


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free