Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: 32bit PCM audio to mp3 has clicks and pops? (Read 3790 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

32bit PCM audio to mp3 has clicks and pops?

Hi,

I have a Raspberry Pi Zero with an I2S MEMS Mic that records raw 32bit PCM audio.

I'm using Sox to record raw audio and encode it into mp3:

rec --buffer 2000000 -c 1 -r 44100 -b 32 test.mp3

However, this gives the warning:

/usr/bin/rec WARN formats: mp3 can't encode to 32-bit

And my resulting test.mp3 file has little clicking and popping static noises throughout. I've attached the mp3 file.

I know nothing is wrong with my mic, as I've recorded AAC encoded audio with FFMPEG successfully before. Am I doing something wrong here?

Re: 32bit PCM audio to mp3 has clicks and pops?

Reply #1
I only hear popping when it initializes the microphone at the start. I see noise, but the only noise I can actually hear is typical line level noise present in a noisy environment.

Re: 32bit PCM audio to mp3 has clicks and pops?

Reply #2
/usr/bin/rec WARN formats: mp3 can't encode to 32-bit
MP3 doesn't use a bit depth, it simply tries to pack everything as efficient as possible.

Is the popping in the audio (in the file) or is it a artifact of the playback chain?
TheWellTemperedComputer.com

 

Re: 32bit PCM audio to mp3 has clicks and pops?

Reply #3
Quote
I only hear popping when it initializes the microphone at the start.
I assume that happens with WAV too?   ...Unrelated to MP3 encoding?

A pop/click at the beginning (and end) is usually DC offset caused by a hardware problem.

There are filters/algorithms to fix offset, or you can apply a high-pass filter (DC is zero-Hz) and a short fade-in (several milliseconds).