New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

metalyzer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalyzer

A library to retrieve dimensions of media files

latest
Source
npmnpm
Version
1.0.13
Version published
Maintainers
1
Created
Source

metalyzer

metalyzer is a lightweight JavaScript library for extracting metadata from video/Image files. It provides a simple API to retrieve information such as type, size, dimensions, base64, blob, URL,thumbail,video-duration, and more.

Installation

npm install metalyzer

Usage for Video

const metaData = await extractVideoMetadata(video);
const videoUrl = await extractVideoUrl(video);
const videoBlob = await convertVideoInBlob(video);
console.log(metaData);
console.log(videoUrl);
console.log(videoUrl);

Usage for Image

const metaData = await extractImageMetadata(video);
const imageUrl = await extractImageUrl(video);
const imageBase64 = await extractImagebase64(video);
const [thumbnail1, thumbnail2] = await extractThumbnailFromVideo(video);
console.log(metaData);
console.log(imageUrl);
console.log(imageBase64);
<img src={thumbnail1} />
<img src={thumbnail2} />

Features

  • Extracts various video metadata, including file name,url,base64, blobm, dimensions, duration, etc.
  • Provides a simple and easy-to-use API for metadata extraction.

APIs

    extractVideoMetadata(videoFile: File): Promise<VideoMetadata>
    extractImageBase64(imageFile: File): Promise<string>;
    extractImageMetadata(imageFile: File): Promise<ImageMetadata>;
    extractImageUrl(imageFile: File): Promise<string>;
    convertVideoInBlob(videoFile: File): Promise<Blob>;
    extractVideoMetadata(videoFile: File): Promise<VideoMetadata>;
    extractVideoUrl(videoFile: File): Promise<string>;
    getFileExtension(fileName: string): string;
    extractThumbnailFromVideo(videoFile: File): Promise<File>

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests to us.

Issues

If you discover any issues, please open an issue.

Changelog

See the CHANGELOG.md file for details on changes and releases.

Keywords

video thumbnail

FAQs

Package last updated on 11 Jan 2024

Did you know?

Socket

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.

Install

Related posts