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

get-video-metadata

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-video-metadata

Extract metadata from any video on your hard drive

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
6
20%
Maintainers
1
Weekly downloads
 
Created
Source

get-video-metadata

npm package stats

♥ Sponsor or ★ Star

This library uses ffprobe-CLI-Tool to extract data (fps, aspect-ratio, size, duration, …) from any video on your hard drive.

Installation

  • Install ffmpeg (we only need ffprobe, ffprobe is included in ffmpeg). The library will use the CMD-Library by default, unless the FFPROBE_EXEC environment variable is specified.
  • Install get-video-metadata from NPM: npm i --save get-video-metadata
  • Enjoy 🎉

Usage

import getVideoMetadata from "get-video-metadata";

getVideoMetadata('./test.mp4').then(console.log)
/* Output: 
{
  codec: {
    name: 'h264',
    longName: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
    type: 'video'
  },
  aspectRatio: '16:9',
  width: '1280',
  height: '720',
  frameRate: 30,
  bitRate: '2477866',
  duration: '10.933333'
}
*/

Note: This also work with image files, but this library was designed for videos. Please also note that code.type will always be "video", as this is the way we are telling ffprobe to parse the video.

Issues & Contributing

Feel free to create issues / raise PRs in the repository.

License

This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.

Keywords

video

FAQs

Package last updated on 18 Jul 2023

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