HydrogenAudio

Lossy Audio Compression => Opus => Topic started by: Lumitopia on 2018-05-07 21:31:45

Title: Would variable bit-depth for OPUS (à la LossyWAV) be technically possible?
Post by: Lumitopia on 2018-05-07 21:31:45
I feel like I'm possibly asking a stupid question, since I don't know if this method for reducing bitrate is technically only applicable to lossless codecs.

I've been playing around with LossyFLAC / LossyWav and the results are impressive. I can get my original FLAC files down to less than half their original bitrate while maintaining perceptual transparency. This is achieved by intelligently reducing bit depth and shaping the resulting noise so that is inaudible, while keeping all the detail intact. https://wiki.hydrogenaud.io/index.php?title=LossyWAV

If I'm not mistaken, OPUS does not currently affect the bit depth of samples, and uses other means to efficiently encode audio.

My question is this. Can OPUS, in principle, implement this kind of method (perhaps as an extra setting) to further reduce the bitrate while maintaining a certain quality level? That would be an amazing addition IMO but I'm just unclear as to whether it can be done - whether it is at odds which how OPUS actually works at a basic level.

By the way, you can try out LossyWAV by searching "LossyFLAC GUI". Nifty program.
Title: Re: Would variable bit-depth for OPUS (à la LossyWAV) be technically possible?
Post by: lvqcl on 2018-05-07 22:26:47
Lossy codecs such as Opus, Vorbis, MP3, AAC, ... don't have bitdepth.
Title: Re: Would variable bit-depth for OPUS (à la LossyWAV) be technically possible?
Post by: Lumitopia on 2018-05-07 22:43:40
Lossy codecs such as Opus, Vorbis, MP3, AAC, ... don't have bitdepth.
Thanks. I had a feeling I was missing something. Doing more reading on this now.
Title: Re: Would variable bit-depth for OPUS (à la LossyWAV) be technically possible?
Post by: saratoga on 2018-05-08 00:30:42
Lossy codecs such as Opus, Vorbis, MP3, AAC, ... don't have bitdepth.
Thanks. I had a feeling I was missing something. Doing more reading on this now.

Specifically lossy transform codecs transform audio into the frequency domain and then use a psychoacoustical model to quantize each individual frequency component to a different number bits (depending on its relative importance and the target bitrate). Since the data is not encoded as PCM, the bits per sample is not defined (instead there is a bitrate, the average number of bits per second for the compressed stream as a whole). 
Title: Re: Would variable bit-depth for OPUS (à la LossyWAV) be technically possible?
Post by: butrus on 2018-05-09 15:09:25
Lossy codecs such as Opus, Vorbis, MP3, AAC, ... don't have bitdepth.

Would be interesting to see, if using LossyWav before encoding with Opu (Mp3, Vorbis, AAC...), has any effect anyway...
Title: Re: Would variable bit-depth for OPUS (à la LossyWAV) be technically possible?
Post by: saratoga on 2018-05-09 15:24:36
Lossy codecs such as Opus, Vorbis, MP3, AAC, ... don't have bitdepth.

Would be interesting to see, if using LossyWav before encoding with Opu (Mp3, Vorbis, AAC...), has any effect anyway...

It introduces more uncorrelated noise, so it will change the output of the encoder but shouldn't have much effect on the actual encoding process.
Title: Re: Would variable bit-depth for OPUS (à la LossyWAV) be technically possible?
Post by: jmvalin on 2018-05-10 23:45:10
For PCM audio the bit depth affects two things: 1) the amount of noise (SNR) you get on the audio 2) the lowest volume you can represent (dynamic range). With a codec like Opus (or even MP3), the SNR and dynamic range are independent. The SNR you'll get with Opus never exceeds 8 bits (and that's for very high bitrates), whereas the dynamic range you can encode in an Opus file is probably more than 32 bits (more than 24 bits in the "quiet" direction, plus close to 8 bits to encode signals louder than the normal PCM range).
Title: Re: Would variable bit-depth for OPUS (à la LossyWAV) be technically possible?
Post by: bennetng on 2018-05-11 07:27:31
It introduces more uncorrelated noise, so it will change the output of the encoder but shouldn't have much effect on the actual encoding process.
When talking about noise, I am interested about opus's "filling spectral holes with noise" feature. I tried to encode something to mp3 with relatively low bitrate to reveal "spectral holes", then transcode to opus. Opus filled the holes and made the transcoded file looks even better the mp3 file. In this way it is basically impossible to identify transcoding visually.