MP3 Encoder - Page 1
Forum section: electronics / projects

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: July 27, 2016, 11:16:31 am
content: Hi everyone,Am working on a project that involve streaming audio between two units, and client requirement is that it should be MP3 compression. So i tried some algorithm (shine , 8Hz and BladeEnc) first just compiling code and testing compression on my PC and the only one working fine with immediate result is BladeEnc. However the main objective is to be able to load that into an STM32 uC (429 for now , we my use an F7 later). am trying to optimize the code in order to do that and still working on it. My question is, have anyone here had experience with that, and can possibly share and is there any encoder tested by someone here on the blog that can point out.Shine is supposed to be ARM compatible and designed to be light and quick, however i couldn't get a proper sounds with it, anyone did some testing with it ?Thanks.

author: ebclr
author_rank: Super Contributor
timestamp: July 27, 2016, 11:51:30 am
content: https://www.cirrus.com/en/pubs/proDatasheet/WM8731_v4.9.pdf

author: MosherIV
author_rank: Super Contributor
timestamp: July 27, 2016, 11:55:57 am
content: ST themselves provide an example (probably optimized).http://www.st.com/content/st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries-expansions/stm32-mp3nl-cod.html

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: July 27, 2016, 12:17:38 pm
content: Quote from: ebclr on July 27, 2016, 11:51:30 amAm only concerned about the firmware part of this project , an other enginnering company made the choice for the hardware and for them external codec chip are not an option. External will my choice if am going to develop this, but not my call this time.

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: July 27, 2016, 12:21:13 pm
content: Quote from: MosherIV on July 27, 2016, 11:55:57 amYap, not downloadable. i already asked for those library from ST representatives and support, still waiting for an answer. NDA need to be signed or some fees may need to be payed.

author: MosherIV
author_rank: Super Contributor
timestamp: July 27, 2016, 01:29:11 pm
content: QuoteSorry, did not realise you had already tried.Yes, will probably need NDA simce anything from the MPEG library is tightly controlled by the MPEG body.I believe there are free ports of the algorithm though. Have you searched 'stm32 mp3' - loads of projects come up.

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: July 27, 2016, 01:58:47 pm
content: Quote from: MosherIV on July 27, 2016, 01:29:11 pmyap i did, most of those project are decoder, while i still need that. i need the encoder as well.The only useful codes i found are in this pagehttp://www.mp3-tech.org/programmer/encoding.html

author: ebclr
author_rank: Super Contributor
timestamp: July 28, 2016, 06:33:20 am
content: Did you try thishttps://github.com/search?utf8=%E2%9C%93&q=mp3

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: July 29, 2016, 09:49:30 am
content: No, i didn't. i saw so many people using LAME encoder, it's a bit complicated for me and i may need to implante a uLinux on the chip and that's even more complicated for me to do.so am going to keep working with BladeEnc, and waiting for someone to share his experience here. or i may share my code here is it works

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: August 01, 2016, 01:11:35 pm
content: Update : so after a lot of testing with BladeEnc, it worked yap , but it took 15 second to encode and transmit over serial link a 1s of raw audio. so a bit useless. i don't think it's worth the trouble to adapt it anymore to the STM32, i may drop the idea of MP3 encoding and use an open source codec with less complexity. Codec2 seems promising will try to work with it. other then that any idea ?

author: Fungus
author_rank: Super Contributor
timestamp: August 01, 2016, 01:51:55 pm
content: Quote from: hamdi.tn on August 01, 2016, 01:11:35 pm"Speech" codecs often work badly for non-speech.What exactly is the "audio" you're transmitting? How many bits? What sample rate? What sort of sound? How much compression do you need?

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: August 01, 2016, 02:05:05 pm
content: Quote from: Fungus on August 01, 2016, 01:51:55 pmit's speech, for audio quality am just trying to test various stuff and optimise it later.

author: mikerj
author_rank: Super Contributor
timestamp: August 01, 2016, 05:07:03 pm
content: You might want to have a look at a linear predictive coding scheme such as CELP for speech. CELP gives good quality speech at low bit rates and lower cpu overhead than MP3, especially for decoding.There is an open source library called Speex that implements CELP, and anSTM32 app note.

author: Maddaid
author_rank: Newbie
timestamp: September 08, 2017, 09:13:41 am
content: Quote from: MosherIV on July 27, 2016, 01:29:11 pmSorry to bother sir, it seems that you know pretty well about audio format right? I also have a related question and would you mind my asking now. Recently I downloaded an audio file of .au from the internet but it could not be played by my Windows Media Player and VLC. I think it could not be recognized. Then, I thought about conversion to other formats and then I downloaded this audio converter (http://www.videoconverterfactory.com/tips/au-to-mp3.html)to convert AU to MP3 file. But as a noob, it is really difficult for me to understand some of the terminologies about audio formats. In the format and codec list, I do not literally know what to choose among bit rate, sample rate and channels. Is it correct that the higher bit rate I set, the better the output will be?How about the sample rate, what is the difference between the bit rate and sample rate?Modify message