Skip to content

Instantly share code, notes, and snippets.

@mhsharifi96
Last active April 2, 2020 11:32
Show Gist options
  • Save mhsharifi96/8f0d40f01899dd6015ba8f40ee797e32 to your computer and use it in GitHub Desktop.
Save mhsharifi96/8f0d40f01899dd6015ba8f40ee797e32 to your computer and use it in GitHub Desktop.
change metadata mp3 by node js
//https://www.npmjs.com/package/ffmetadata#metadata
//sometimes you need change metadata in mp3 automatically
var ffmetadata = require("ffmetadata");
function ChangeMetaMp3(filename){
data = {
album: "RovzeNews.ir",
copyright: "RovzeNews.ir - tel/insta : @rovzenews_ir"
}
var options = {
attachments: ['img/rovzenews.png'],
};
ffmetadata.write(`downloads/${filename}`,data, options, function(err) {
if (err) console.error(err);
else console.log("Cover art added");
});
}
//created by mh.sharifi -April 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment