Convert wav to mp3 with or without removing wav file

What is the feature or ability you would like to have?
It would be interesting to have a functionality to convert wav to mp3 or any other format keeping all the information related to the track already imported as for example in wav

Does a workaround currently exist?
convert mp3 track and relocate to lxc

Sorry my English

That idea is on the list and will happen in the future

1 Like

Thanks

I also decided to leave here a help code for converting wav to mp3

const fs = require('fs');
const lamejs = require('lamejs');


const wavData = fs.readFileSync('file.wav');

const mp3Encoder = new lamejs.Mp3Encoder(2, 44100, 128);

const samples = new Int16Array(wavData);
const mp3Data = mp3Encoder.encodeBuffer(samples);
mp3Data.push.apply(mp3Data, mp3Encoder.flush());

fs.writeFileSync('file.mp3', new Buffer(mp3Data));

Cool! Iā€™m using FFMPEG internally so it will use that. Actually got thinking how I should add something like that in Lexicon and it will probably happen sooner than I thought, my next fun mini project :slight_smile:

1 Like

Nice, if you want help send PM