async-ffmetadata
v0.1.9
Published
async-ffmetadata is a module that gives you the possability to edit metadata for music and video files using the ffmpeg cli with nodejs
Downloads
5
Maintainers
Readme
async-ffmetadata
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
- Contact me on [email protected]
- If appropriate, open an issue on GitHub
Motivation
I searched for a easy to use way to write and read metadata with nodejs for a diffrent project. So i made this.