damianociarla / node-ffmpeg

ffmpeg module for nodejs
MIT License
600 stars 140 forks source link

Add metadata to output file #71

Open ldevalbray opened 4 years ago

ldevalbray commented 4 years ago

Hello, I'm trying to convert mp4 video file to mp3 while adding metadata doing so :

 var process = new ffmpeg(videoPath);

          process.then(function (extractedVideo) {

           // I have also tried this way : extractedVideo.addCommand('-metadata', `title="TestTitle"`)
            extractedVideo.addCommand('-metadata:s:v', `title="TestTitle"`)

            const songPath = path.join(this.state.store.get('songPath'), songTitle + '.mp3');

            extractedVideo.fnExtractSoundToMP3("\"" + songPath + "\"", function (error, file) {

})

But looking at the output mp3 file, it does not add the metadata ... I was also wondering the way to add multiple metadata ?

Any help would be much appreciated, Thank you for your time !

ldevalbray commented 4 years ago

@damianociarla sorry to disturb but, is this project still under development / maintenance ?