This is a JavaScript port of the excellent MediaInfoLib and meant to be run directly in a browser. mediainfo.js was created using Emscripten.
Try it out in your browser: https://mediainfo.js.org
Make sure the
Emscripten tools
can be found in $PATH
. Something like this will do:
source ~/programs/emsdk_portable/emsdk_env.sh
First you must build the dependencies:
./build-deps.sh
Then build mediainfo.js
using:
./build.sh
The resulting files are mediainfo.js
and mediainfo.js.mem
.
The API is defined in mediainfojs.cpp
and currently exposes the following methods from MediaInfoLib::MediaInfo:
- open
- open_buffer_init
- open_buffer_continue
- open_buffer_continue_goto_get
- inform
- close
You can check out this example on how mediainfo.js is used in the browser.
See this issue on how to use mediainfo.js with Node.js.
This program is freeware under BSD-2-Clause license conditions: https://mediaarea.net/nn/MediaInfo/License
This product uses MediaInfo library, Copyright (c) 2002-2015 MediaArea.net SARL.