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: Foobar OPUS decoding (Read 2475 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar OPUS decoding

While transcoding some OPUS files to WAV using Foobar v1.5.1, I noticed that portions of the audio on the output file were clipped.
The clipping does not occur when using the official opus-tools software to transcode the same OPUS files to WAV. 
It would appear that Foobar is adding gain during the decoding process, but I have replaygain and all other processing (DSPs) disabled.

Attached is an image showing a portion of the resulting WAV files. At the top is (one channel of) the output from Foobar. Below is the equivalent output from opus-tools, inverted to make a visual comparison easier.

Am I missing something?

Thanks.

Re: Foobar OPUS decoding

Reply #1
Did you somehow have foo_input_vgmstream high in your decoder priority list? That component also supports Opus, mainly to support random game formats, and outputs everything as 16 bit, clipped obviously.

Re: Foobar OPUS decoding

Reply #2
I think you got it backwards. opusdec from opus-tools applies the opus header gain when decoding.

Re: Foobar OPUS decoding

Reply #3
No foo_input_vgmstream in my decoder priority list.
I don't have it backwards - foobar's output has the clipping.
"Opus header gain" is 0.00dB, as confirmed in fb2k's file properties window.

Thanks for the suggestions thus far.

Re: Foobar OPUS decoding

Reply #4
It will be clipping if you convert to 16 or 24 bit format WAV file. Are you converting to 32 bit?

Re: Foobar OPUS decoding

Reply #5
No I'm not converting to 32-bit, or between other bit depths  (but why should that create clipping anyway?)
It's just 16-bit 48k input, 16-bit 48k output.

Re: Foobar OPUS decoding

Reply #6
It's just 16-bit 48k input,
Opus (and many other lossy formats such as MP3, AAC or Vorbis) doesn't have bit depth.

Back to the question: Opus decoder has "soft clipping" feature. You can achieve similar results with foobar2000: add "Advanced Limiter" to the Active DSPs list.

 

Re: Foobar OPUS decoding

Reply #7
You have to convert to 32-bit floating point output if you want no clipping of the signal, or use a DSP which alleviates the effects of clipping, since lossy codecs like this will introduce clipping all on their own.