exiftool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files.
This npm package is a simple wrapper for exiftool, you can extract metadata / meta information from media files easily. Like; video duration, image resolution etc.
You can see complete list of supported media files from here including but not limited to jpg, png, gif, mp4, mov, 3gp, pdf
.
- simple-exiftool requires Node v4+
Quick Installation
- OS X:
brew update
brew install exiftool
npm install simple-exiftool --save
- Ubuntu:
sudo apt-get update
sudo apt-get install libimage-exiftool-perl
npm install simple-exiftool --save
- Other: Installing ExifTool.
Usage
const Exif = ;; // Default settings are// {// binary: "exiftool",// args: ["-json", "-n"]// }// // -json argument can not be overriden, since this module parse outputs of exiftool with JSON.parse
1. Passing single media file path
const Exif = ; ;
2. Passing array of media files path
const Exif = ; ;
3. Passing binary data
const Exif = ;const Fs = ; Fs;
4. Exiftool binary path and extra arguments
const Exif = ; ;