
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@dropb/ffprobe
Advanced tools
simple ffprobe wrapper
npm install @dropb/ffprobe
// This is a hybrid module that can be loaded with import
import { ffprobe, ffprobeSync } from '@dropb/ffprobe';
// or require()
// const { ffprobe, ffprobeSync } = require('@dropb/ffprobe');
// optional: specify the ffprobe path
import { path as ffprobePath } from 'ffprobe-static';
ffprobe.path = ffprobePath;
// or
// process.env.FFPROBE_PATH = ffprobePath;
// async/await
async function run() {
try {
// file
const data = await ffprobe('./testfile.mp4');
console.log(data.format.duration);
} catch (e) {
console.error(e);
}
try {
// URL
const { streams } = await ffprobe('http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4');
console.log(streams[0].width);
} catch (e) {
console.error(e);
}
try {
// Readable Stream
const { format } = await ffprobe(createReadStream('./testfile.mp4'));
console.log(format.duration);
} catch (e) {
console.error(e);
}
}
run();
// node-style callback
ffprobe('./testfile.mp4', (err, data) => {
if (err) {
console.error(err);
} else {
console.log(data.format.duration);
}
});
// sync
const data = ffprobeSync('./testfile.mp4');
console.log(data.format.duration);
/**
* Run ffprobe on specified input
* @param input FilePath / URL / Readable Stream
*/
function ffprobe(input: string | Stream): Promise<FfprobeData>;
function ffprobe(input: string | Stream, cb: FfprobeCallback): void;
interface FfprobeData
FAQs
ffprobe wrapper
The npm package @dropb/ffprobe receives a total of 37 weekly downloads. As such, @dropb/ffprobe popularity was classified as not popular.
We found that @dropb/ffprobe demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.