async-ffmetadata
TypeScript icon, indicating that this package has built-in type declarations

0.1.9 • Public • Published

async-ffmetadata

Github License Github Issues

async-ffmetadata is a module that gives you the possability to edit metadata for music and video files using the ffmpeg cli with nodejs

Table of content

Getting Started

Prerequisit

To run this nodemodule you need to install ffmpeg on you machine. It can be downloaded from here: ffmpeg Download

Install

npm i async-ffmetadata
// or
yarn add async-ffmetadata

Usage

import { getMetaDataFromFile, setMetaDataToFile } from 'async-ffmetadata'

const inFilePath = "/path/to/File"

// Gives back the metadata of the file as object
getMetaDataFromFile(inFilePath)
  .then((metaData) => {
    console.log(metaData)
  })

const outFilePath = "/path/to/NewFile"
const metaData = {
  title: "New Cool title"
}

// Saves the File as Copy with the added Metadata
setMetaDataToFile(metaData, inFilePath, outFilePath)
  .then((success) => {
    if (success === true) console.log("File written")
    else if (success === false) console.log("File not written")
  })

Contributing

Issues

In the case of a bug report, bugfix or a suggestions, please feel very free to open an issue.

Pull request

Pull requests are always welcome, and I'll do my best to do reviews as fast as I can.

License

This project is licensed under the MIT License

Get Help

Motivation

I searched for a easy to use way to write and read metadata with nodejs for a diffrent project. So i made this.

Alternative

Package Sidebar

Install

npm i async-ffmetadata

Weekly Downloads

10

Version

0.1.9

License

ISC

Unpacked Size

42.8 kB

Total Files

16

Last publish

Collaborators

  • honje