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: Is there any value is lowering Wav bit depth to 16bit prior to Opus conversion? (Read 512 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is there any value is lowering Wav bit depth to 16bit prior to Opus conversion?

I am working for a client on a project that involves creating Wav file sound fx (beeps/chimes etc). These sounds ultimately get crunched to 32 kHz Opus files that play back on a small hardware product. The client has a pipeline that involves taking the 48khz 32bit Wav files and downsampling them to 16bit 16khz Wav files, and in a second step converting the 16-bit Wav files to 32khz opus files (using ffmpeg).

I don’t understand the technical decision to downsample the Wav files to 16-16 prior to opus conversion using ffmpeg  ( but I don’t have much experience on hardware projects). My instinct would be to convert the 48khz 32bit Wav files directly to 32khz opus files. 

Is there anyone who is familiar with opus that could shed some light on why someone might want to downsample to 16-bit 16khz Wav files prior to doing the opus conversion?  Does the lower bit-depth of the source Wav files have an impact on the filesize or quality of the final opus files. I know the Opus files are run through a 500hz high-pass filter during playback.

I’m considering suggesting they discontinue the 2-step process, but I have very little experience with opus and hardware applications, so I wanted to ask around and get some advice.

Re: Is there any value is lowering Wav bit depth to 16bit prior to Opus conversion?

Reply #1
Hi Gigasaurus, you are talking about 32 kHz opus files and downsampling the wav file to 16 kHz. Did you mean 32 kbit/s opus files?

A sampling frequency of only 16 kHz results in a frequency range of less than 8 kHz, is that really what your customer wants? Downsampling to 32 kHz preserves more harmonics, e.g. for chimes.

Re: Is there any value is lowering Wav bit depth to 16bit prior to Opus conversion?

Reply #2
Opus is 48kHz internally so there's not much point downsampling to anything lower.
It's also hard to talk about bit depth of lossy formats like Opus as they are floating point internally, so it doesn't make sense to change bit depth either.

Re: Is there any value is lowering Wav bit depth to 16bit prior to Opus conversion?

Reply #3
Yes, sorry - the final Opus files are 32 kb/sec. The Wav files start at 48khz, 32bit. They get rendered down to 16khz 16bit Wav files. Then they get converted to opus files using ffmpeg 32 kb/s.   The sounds are chimes, marimba, harp, beeps and chirps for a keypad home entry device.

Re: Is there any value is lowering Wav bit depth to 16bit prior to Opus conversion?

Reply #4
Why not PCM or ADPCM? Much cheaper solution.
gold plated toslink fan

Re: Is there any value is lowering Wav bit depth to 16bit prior to Opus conversion?

Reply #5
Yes, the client's workflow makes no sense. Opus is 48 kHz only, so there is no reason to reduce the WAV files to 16 kHz or to change the bit depth before encoding to Opus. Lossy audio doesn't have a bit depth the way LPCM does, so just feed Opus the original 48 kHz pcm_f32le files. Downsampling to 16 kHz has the same effect as using an 8 kHz lowpass on the original audio, which shouldn't be necessary.