How to compress audio for filename extensions .flac(FLAC), .alac(ALAC), .wv(Wavpack) with varying bitrates ?
Mostra commenti meno recenti
Hello, all,
I want to ask about audio compression with bitrate,
How to compress audio for filename extensions .flac(FLAC), .alac(ALAC), .wv(Wavpack) with varying bitrates ?
I have tried with the code below, but there is an error
[y,Fs]=audioread('water.flac');
audiowrite('waterkompres.flac',y,Fs,'BitRate',128);
So is there any other simple coding?
or what should we do to remove the error in the coding?
thank you very much
Risposte (1)
Walter Roberson
il 18 Lug 2021
0 voti
Bitrate: "Only available for MPEG-4 (.m4a, .mp4) files."
so you will not be able to do it using audiowrite() and will need to find third party libraries or tools.
7 Commenti
sisi chalisva
il 18 Lug 2021
Walter Roberson
il 18 Lug 2021
I suspect you are using Linux; .m4a is supported on Mac and Windows.
sisi chalisva
il 18 Lug 2021
Walter Roberson
il 18 Lug 2021
MATLAB Online uses Linux.
Perhaps you could archive some of your files onto a USB memory stick, and then load MATLAB onto your laptop.
sisi chalisva
il 18 Lug 2021
Walter Roberson
il 18 Lug 2021
It does not matter what kind of file you read from; it matters what kind of file you write to, and that you get the right rate.
[y,Fs]=audioread('water.m4a');
yr = resample(y, 44100, Fs);
audiowrite('waterkompresflac.m4a',yr,4r100,'BitRate',256);
sisi chalisva
il 18 Lug 2021
Categorie
Scopri di più su Audio I/O and Waveform Generation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!