
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
simple-exiftool
Advanced tools
Extracting metadata from media files with exiftool, including but not limited to mp4, mov, 3gp, jpg, png, gif, pdf.
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.
brew update
brew install exiftool
npm install simple-exiftool --save
sudo apt-get update
sudo apt-get install libimage-exiftool-perl
npm install simple-exiftool --save
const Exif = require("simple-exiftool");
Exif(source, [settings], callback);
// 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 = require("simple-exiftool");
Exif("/x/y/image.jpg", (error, metadata) => {
if (error) {
// handle error
}
console.log(metadata);
});
###2. Passing array of media files path
const Exif = require("simple-exiftool");
Exif(["/x/yimage.jpg", "/a/bmovie.mp4"], (error, metadataArray) => {
if (error) {
// handle error
}
console.log(metadataArray[0], metadataArray[1]);
});
###3. Passing binary data
const Exif = require("simple-exiftool");
const Fs = require("fs");
Fs.readFile("/x/y/image.jpg", (error, binaryData) => {
if (error) {
// handle error
}
Exif(binaryData, (error, metada) => {
if (error) {
// handle error
}
console.log(metada);
});
});
###4. Exiftool binary path and extra arguments
const Exif = require("simple-exiftool");
Exif("/x/y/image.jpg", {binary: "exiftool2", args:["-json", "-s"]}, (error, metadataArray) => {
if (error) {
// handle error
}
console.log(metadataArray[0], metadataArray[1]);
});
FAQs
Extracting metadata from media files with exiftool, including but not limited to mp4, mov, 3gp, jpg, png, gif, pdf.
The npm package simple-exiftool receives a total of 91 weekly downloads. As such, simple-exiftool popularity was classified as not popular.
We found that simple-exiftool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.