Last active
April 2, 2020 11:32
-
-
Save mhsharifi96/8f0d40f01899dd6015ba8f40ee797e32 to your computer and use it in GitHub Desktop.
change metadata mp3 by node js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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