HydrogenAudio

Lossy Audio Compression => Opus => Topic started by: goneg on 2022-01-31 13:28:41

Title: Opus killer sample at 256kbps
Post by: goneg on 2022-01-31 13:28:41
While testing for opus transparency i found that it does not do well when there is a lot of high frequency noise, so I used audacity to manipulate white noise into the worst case scenario to see how it does and ended up creating a sample that is clearly not transparent even at 256kbps. i used opusenc sample.flac --bitrate 256k 256.opus to encode it.
And also a warning, this is not pleasant to listen to.
Title: Re: Opus killer sample at 256kbps
Post by: bennetng on 2022-01-31 13:41:11
Yes. Too audible.
Code: [Select]
foo_abx 2.0.6d report
foobar2000 v1.6.9
2022-01-31 21:37:46

File A: sample.flac
SHA1: b8dcec68f3ae6fd0978ea7473eb7276d1447cce3
File B: 256.opus
SHA1: bb6e767326969e472512ab9947a6ecdab7579015

Output:
Default : Primary Sound Driver
Crossfading: NO

21:37:46 : Test started.
21:37:58 : 01/01
21:38:06 : 02/02
21:38:12 : 03/03
21:38:21 : 04/04
21:38:27 : 05/05
21:38:33 : 06/06
21:38:40 : 07/07
21:38:46 : 08/08
21:38:50 : 09/09
21:38:55 : 10/10
21:38:55 : Test finished.

 ----------
Total: 10/10
p-value: 0.001 (0.1%)

 -- signature --
e25c9959978e97da214128286fd181cc6509e2ef
Title: Re: Opus killer sample at 256kbps
Post by: IgorC on 2022-01-31 21:38:17
A does not imply B

"Bad results on hand-made samples" does NOT imply "encoder is bad on music, speech etc material"

It's easy to break ANY lossy encoder exploiting its weaknesses by crafting some peculiar,  weird, unrealistic (like your) sample.
It doesn't prove that encoder performs bad on a normal material (music, speech etc.)

It was discussed 1000 times in the past. Testing lossy codecs on hand-crafted unrealistic material is useless.
Title: Re: Opus killer sample at 256kbps
Post by: bennetng on 2022-02-01 08:21:33
What I found interesting is that the png files have more downloads than the audio files :))
Title: Re: Opus killer sample at 256kbps
Post by: The Irish Man on 2022-02-01 08:27:14
Sometimes makes you wonder are some people just anti lossy compression, they must find ways to break it.  :)
Title: Re: Opus killer sample at 256kbps
Post by: NateHigs on 2022-02-01 08:48:51
A does not imply B

"Bad results on hand-made samples" does NOT imply "encoder is bad on music, speech etc material"

It's easy to break ANY lossy encoder exploiting its weaknesses by crafting some peculiar,  weird, unrealistic (like your) sample.
It doesn't prove that encoder performs bad on a normal material (music, speech etc.)

It was discussed 1000 times in the past. Testing lossy codecs on hand-crafted unrealistic material is useless.

This isn't the 60s - not every piece of music is created by recording acoustic instruments.

ANY AUDIBLE SOUND CAN BE USED IN MUSIC.

If there is an audible difference between input and output the codec has failed. Tell me, who defines what a 'realistic' sample is? You? Who defines 'normal material'? Again, is it you?
Title: Re: Opus killer sample at 256kbps
Post by: rutra80 on 2022-02-01 09:00:42
There's no way for any properly enginereed sound to contain such strong noise in high freqs. Some PWM 1-bit music comes to mind only, but still it wouldn't be like that. It's kinda like a painting standing next to 20k lumen light pointing straight into your eyes.
Title: Re: Opus killer sample at 256kbps
Post by: NateHigs on 2022-02-01 09:54:41
There's no way for any properly enginereed sound to contain such strong noise in high freqs. Some PWM 1-bit music comes to mind only, but still it wouldn't be like that. It's kinda like a painting standing next to 20k lumen light pointing straight into your eyes.

Ah, I've found him. The arbiter of music (and audio engineering).

I'll append some screens of released, popular music which contains similar signals.

[edit] screens added, all from pressed, commercial CDs.

I mean, what are we even discussing here? If there's an audible difference, the codec has failed.
Title: Re: Opus killer sample at 256kbps
Post by: shadowking on 2022-02-01 10:13:41
Its not totaly out of the question. I;ve heard similar sounds in
industrial / EBM genres
Title: Re: Opus killer sample at 256kbps
Post by: rutra80 on 2022-02-01 10:57:30
There's no way for any properly enginereed sound to contain such strong noise in high freqs. Some PWM 1-bit music comes to mind only, but still it wouldn't be like that. It's kinda like a painting standing next to 20k lumen light pointing straight into your eyes.

Ah, I've found him. The arbiter of music (and audio engineering).

I'll append some screens of released, popular music which contains similar signals.

[edit] screens added, all from pressed, commercial CDs.

I mean, what are we even discussing here? If there's an audible difference, the codec has failed.
Does Opus fail with songs you provided SCREENSHOTS for?
If you're looking for a lossy codec that is transparent for every signal in the world you must rethink what you seek, or rather acquire some knowledge how PSYCHO ACOUSTIC based coding works, because you won't find one.
Go encode some 1bit PWM music or oldschool chiptunes with full scale square waves and 100% stereo separation and whine how every psychoacoustic codec fails at mid bitrates. Or how lossless audio codecs fail to compress them better than zip/rar/7z.
Title: Re: Opus killer sample at 256kbps
Post by: doccolinni on 2022-02-01 11:07:08
I'll append some screens of released, popular music which contains similar signals.
Ah yes, thank you so much for the screens of music, because I listen with my eyes. Much appreciated.


edit: But you know, speaking of screens and things we actually do perceive with eyes, imagine this approach to judging lossy video encoders. Arguably, those are even easier to break and with more realistic material than that provided in the OP: just some confetti or a moderate snowfall is enough to bring any lossy video encoder to its knees and render its frames to look like pixel soup. And yet, we accept this as reasonable and don't mind.
Title: Re: Opus killer sample at 256kbps
Post by: Sunhillow on 2022-02-01 13:51:44
Ah yes, thank you so much for the screens of music, because I listen with my eyes. Much appreciated.

... Additional to @doccolinni 's words I would like to know which songs these screens were captured from. At least the first one looks like something made especially for purpose of torture.
And, noone will test a lossy movie of image format with unnatural noise pattern and evaluate them with an acoustic transformation of the results. If you want everything lossless then use lossless encoders! This has nothing to to with arbitration.
Title: Re: Opus killer sample at 256kbps
Post by: ajp9 on 2022-02-01 18:14:33
I can't hear the difference between the FLAC and Opus files. Some of these cases tend to show how good the hearing is of the members here. It's transparent to me.
Title: Re: Opus killer sample at 256kbps
Post by: Brand on 2022-02-01 18:26:14
I had to raise the volume to hear it. It's a "chirping" artifact at higher frequencies.
But it's not nearly as bad at 150kbps or even at 64kbps. To me, 150 sounds better than 256 here.

Using high bitrates like 256 is not very common for Opus. Maybe that can explain why cases like this slip through...
Title: Re: Opus killer sample at 256kbps
Post by: IgorC on 2022-02-01 18:52:44
This isn't the 60s - not every piece of music is created by recording acoustic instruments.
You can re-read previous posts and see that nobody says that electronic music can't be or shouldn't be tested on lossy codecs.

If there is an audible difference between input and output the codec has failed. Tell me, who defines what a 'realistic' sample is? You? Who defines 'normal material'? Again, is it you?
It simple. If sample comes from song, speech, CD, radio ... some real source then it's all good.

All formats MP3, AAC, xHE-AAC and Opus have passed formal verification listening tests on samples from real material like songs, speech, ambiental but never non-representative samples like just pure tones of single frequency, sawtooth wave, square wave,  etc.

As you can see it's not just me ... or Hydrogenaudio... 

Its not totaly out of the question. I;ve heard similar sounds in
industrial / EBM genres
It's totally ok to test on industrial/EBM genres or whatever touches your soul and you body.
The discussion is here about a little point of testing  samples with pure mathematical functions which doesn't represent a real use case because ... "Bad results on pure mathematical functions" does NOT imply "encoder is bad on music, speech etc material"
Title: Re: Opus killer sample at 256kbps
Post by: NateHigs on 2022-02-01 19:54:24
Igor, I’m uninterested in the excuses. I have no time for codec sycophants.

The output from the codec is audibly different from the input. You can argue that it’s not a common occurrence, but it remains a problem.

“ It simple. If sample comes from song, speech, CD, radio ... some real source then it's all good.”. Is so meaningless I can’t even comment.

“Pure mathematical functions” is a meaningless attempt at jargon. All audio is a pure mathematical function. Some more complex that others.

What the hell is going on here?! Do people have money invested in these codecs? Is there a fan club I’m unaware of?

I don’t care what the sample is, if it’s easy to ABC at 256kbps, it’s a problem.
Title: Re: Opus killer sample at 256kbps
Post by: The Irish Man on 2022-02-01 19:58:51
While testing for opus transparency i found that it does not do well when there is a lot of high frequency noise

May I ask do you have a list of songs or music? Might be interesting to find if there is a problem.
Title: Re: Opus killer sample at 256kbps
Post by: IgorC on 2022-02-01 20:14:34
The output from the codec is audibly different from the input. You can argue that it’s not a common occurrence, but it remains a problem.
You should seriously review your understanding of lossy coding then.
BTW have you tried to ABX the sample? Is it that bad?  how it compares to another state-of-art codecs?  Are devs willing to make change  for this not representative samples and very likely break the encoder for another actually more popular samples?

Igor, I’m uninterested in the excuses. I have no time for codec sycophants.

I don’t care what the sample is, if it’s easy to ABC at 256kbps, it’s a problem.
We're so sorry to disturb You, your mAJESTY. It will never repeat again.
First of all, nobody is excusing here.  Excusing to whom? To you?  It's just a matter of facts.
Second, there is no "codec sycophants". When You discuss someting you should control yourself and don't attack some individual.

I don’t care what the sample is, if it’s easy to ABC at 256kbps, it’s a problem.
ok, I'm glad that you mentioned this.... now I can tell you without "remorses"  that codec developers (especially Opus ones) have clearly stated that their don't care about corner-cases ( pure noise, pure tones and so on).

So, devs or any other member give a fingers whether You care or not about something!  ;)

“ It simple. If sample comes from song, speech, CD, radio ... some real source then it's all good.”. Is so meaningless I can’t even comment.
So every MPEG codec had a formal testing on real source samples.
It's a fact, not opinion.  What argument You have here to say?

When someone thinks that all people around are wrong and only he/she is right, it's time to look at himself/herself and start to think what's going on.

“ It simple. If sample comes from song, speech, CD, radio ... some real source then it's all good.”. Is so meaningless I can’t even comment.
If You are out of arguments it doesn't mean it's meaningless.  Defend yourself or at least try to do so. Nobody buys your answer  of "dissapointment" here.
Title: Re: Opus killer sample at 256kbps
Post by: bennetng on 2022-02-01 20:37:25
There's no way for any properly enginereed sound to contain such strong noise in high freqs. Some PWM 1-bit music comes to mind only, but still it wouldn't be like that. It's kinda like a painting standing next to 20k lumen light pointing straight into your eyes.

Ah, I've found him. The arbiter of music (and audio engineering).

I'll append some screens of released, popular music which contains similar signals.

[edit] screens added, all from pressed, commercial CDs.

I mean, what are we even discussing here? If there's an audible difference, the codec has failed.
How about simply post some 30 seconds samples (TOS9 (https://hydrogenaud.io/index.php?topic=3974#post_tos9)) of these tracks as flac so that the rest of us can try them out? Or at least, tell us which CDs and which tracks they are come from.
Title: Re: Opus killer sample at 256kbps
Post by: IgorC on 2022-02-01 20:50:03
... If there's an audible difference, the codec has failed.
Please review your deep and valuable understandings of lossy compression, how it's tested, how samples are picked up and in which quantity, statistics, interpretations etc.


You can also re-read rutra80 and improve your concept of lossy compression:
Go encode some 1bit PWM music or oldschool chiptunes with full scale square waves and 100% stereo separation and whine how every psychoacoustic codec fails at mid bitrates. Or how lossless audio codecs fail to compress them better than zip/rar/7z.
Title: Re: Opus killer sample at 256kbps
Post by: goneg on 2022-02-01 22:15:16
So this is a real world example for those who asked, not music, but it's from 13th episode of an anime called "Serial Experiments Lain", a lot harder to hear but still fails at 256kbps.
Also does anyone know some abx software for linux?

Title: Re: Opus killer sample at 256kbps
Post by: doccolinni on 2022-02-01 23:13:26
The output from the codec is audibly different from the input. You can argue that it’s not a common occurrence, but it remains a problem.

I appreciate the fact that you're completely ignoring my point and only focusing on points you can come up with valid responses to, but let me reiterate:
speaking of screens and things we actually do perceive with eyes, imagine this approach to judging lossy video encoders. Arguably, those are even easier to break and with more realistic material than that provided in the OP: just some confetti or a moderate snowfall is enough to bring any lossy video encoder to its knees and render its frames to look like pixel soup. And yet, we accept this as reasonable and don't mind.
Title: Re: Opus killer sample at 256kbps
Post by: Brazil2 on 2022-02-02 00:52:53
screens added, all from pressed, commercial CDs.
Please name these CDs and share audio samples of these tracks.
Title: Re: Opus killer sample at 256kbps
Post by: bennetng on 2022-02-02 08:03:42
So this is a real world example for those who asked, not music, but it's from 13th episode of an anime called "Serial Experiments Lain", a lot harder to hear but still fails at 256kbps.
Also does anyone know some abx software for linux?
My left ear can no longer hear that high frequency, but right ear still can.
Code: [Select]
foo_abx 2.0.6d report
foobar2000 v1.6.9
2022-02-02 15:57:49

File A: sample_2.flac
SHA1: ba9cb8ff3957f23f1243a442b03ba112de2c9839
File B: 256_2.opus
SHA1: 8e17602062d8f7c3460bed141366210c7e7c4872

Output:
Default : Primary Sound Driver
Crossfading: NO

15:57:49 : Test started.
15:58:04 : 01/01
15:58:11 : 02/02
15:58:20 : 03/03
15:58:27 : 04/04
15:58:34 : 05/05
15:58:44 : 06/06
15:58:48 : 07/07
15:58:57 : 08/08
15:59:03 : 09/09
15:59:10 : 10/10
15:59:10 : Test finished.

 ----------
Total: 10/10
p-value: 0.001 (0.1%)

 -- signature --
a0e1f0ccaf7effe52b64fed71e16d85dd1b3f228
Title: Re: Opus killer sample at 256kbps
Post by: m0rbidini on 2022-02-02 11:11:52
I can hear it clearly with headphones. There are clear, annoying artifacts on the Opus version. I don't even have trained ears or golden ears, and I'm in my 40s.

Given all this, imo this is relevant. I mean, I listen to Aphex Twin, Autechre, etc, and this could be very well be used in one of their tracks.

Unless this is a well known behaviour and there is no possible fix, it should be looked into.

Quote
foo_abx 2.0.6d report
foobar2000 v1.6.7
2022-02-02 11:00:29

File A: sample.flac
SHA1: b8dcec68f3ae6fd0978ea7473eb7276d1447cce3
File B: 256.opus
SHA1: bb6e767326969e472512ab9947a6ecdab7579015

Output:
Default : Primary Sound Driver
Crossfading: NO

11:00:29 : Test started.
11:01:36 : 01/01
11:02:37 : 02/02
11:02:45 : 03/03
11:03:22 : 04/04
11:03:36 : 05/05
11:03:48 : 06/06
11:03:53 : 06/07
11:03:57 : 07/08
11:04:01 : 08/09
11:04:05 : 09/10
11:04:12 : 10/11
11:04:17 : 11/12
11:04:21 : 12/13
11:04:27 : 13/14
11:04:31 : 14/15
11:04:39 : 15/16
11:04:39 : Test finished.

 ----------
Total: 15/16
p-value: 0.0003 (0.03%)

 -- signature --
ca3d6b261d73d1a124f279896821aaac76a05f4e
Title: Re: Opus killer sample at 256kbps
Post by: shadowking on 2022-02-02 14:50:52
I tried wavpack with this HF lab sample. 320 is easy 8/8. more forward aggressive tonality.
384 is very close 7/8, slightly different presentation.  448 failed abx
settings;  -hhx6s.75  -b3.63,  -b4.35,  -b5.08

Title: Re: Opus killer sample at 256kbps
Post by: Gravitator on 2022-02-07 17:42:17
While testing for opus transparency i found that it does not do well when there is a lot of high frequency noise,
You can get an improvement with --framesize 10.
------
Chirp0to24kHzPlusWhiteNoise - same chirping on test file (15kHz region);
Chirp0to24kHz - from 12kHz onwards it experiences convulsions (the straight line increases with jerks. MP3 and AAC go smoothly).
I watch through Spectrum from Foobar.
Test files > Chirp0to24kHz.zip (10.51 MB) (https://hydrogenaud.io/index.php?action=dlattach;topic=100313.0;attach=7483)









Title: Re: Opus killer sample at 256kbps
Post by: Gravitator on 2022-02-07 17:43:28
Developers may not hear and continue to ignore problems at high frequencies ::)
Title: Re: Opus killer sample at 256kbps
Post by: NateHigs on 2022-02-09 09:22:16
If we think this behaviour is acceptable we need a huge disclaimer on the OPUS codec.

“NOT SUITABLE FOR VIDEO OR VIDEO GAMES. TRANSPARENCY CAN ONLY BE ACHIEVED WITH SPEACH AND “NORMAL” MUSIC”.
Title: Re: Opus killer sample at 256kbps
Post by: NateHigs on 2022-02-09 09:24:52
screens added, all from pressed, commercial CDs.
Please name these CDs and share audio samples of these tracks.

Why? They’re not the result of hundreds of hours of research, it’s just a collection of tracks that I thought had “sharp” sounds.

One of them is from the Jimmy Edgar EP “Make, Model, Bounce”.

You never heard of Pan Sonic?
Title: Re: Opus killer sample at 256kbps
Post by: NateHigs on 2022-02-09 09:28:51
The output from the codec is audibly different from the input. You can argue that it’s not a common occurrence, but it remains a problem.

I appreciate the fact that you're completely ignoring my point and only focusing on points you can come up with valid responses to, but let me reiterate:
speaking of screens and things we actually do perceive with eyes, imagine this approach to judging lossy video encoders. Arguably, those are even easier to break and with more realistic material than that provided in the OP: just some confetti or a moderate snowfall is enough to bring any lossy video encoder to its knees and render its frames to look like pixel soup. And yet, we accept this as reasonable and don't mind.

I’m not ignoring it. It’s a terrible analogy. Lossy video is almost never “transparent” to the master. In fact we generally don’t even shoot in lossless formats for video any more.
Title: Re: Opus killer sample at 256kbps
Post by: Porcus on 2022-02-09 10:01:22
It’s a terrible analogy. Lossy video is almost never “transparent” to the master.
I often see the video people use the phrase "lossless" to mean perceptually indistinguishable from, that is what we call "transparent". In that terminology, they don't use the word "lossy" if it is transparent.

They also have a "slightly different" attitude: if you want to distinguish by eye, you can zoom in by insane factors. They assume you don't. Wouldn't work against audiophool users.

In fact we generally don’t even shoot in lossless formats for video any more.
Now back to "our" terminology and yes you are right - but inconsistent with previous sentence. Shooting and storing directly to a mathematically lossy format and then re-encoding to the same - mathematically lossy, but, if high enough resolution, it is transparent.



Title: Re: Opus killer sample at 256kbps
Post by: bennetng on 2022-02-09 10:44:01
Lossy formats are all about sweet spot and trade off, among bitrate, processing power, latency and quality. For video games, CRI ADX, a proprietary ADPCM format is very popular. There were also XA-ADPCM for Playstation games. These formats don't have good bitrate/quality ratio, but they have low processing power requirement and latency.

Other formats like aac, mp3 and vorbis exhibit weaknesses in other aspects as well, some of them are discussed in the Listening Tests sub-forum for example.
Title: Re: Opus killer sample at 256kbps
Post by: doccolinni on 2022-02-09 14:05:10
Lossy video is almost never “transparent” to the master.

Well hold on just a second there, buckaroo. Where is this claim coming from? What is "almost never"?

I can't comment on this claim with anything other than a retort that it is simply blatantly incorrect. If video is encoded with high enough bitrate, most video content will be transparent - with the exception of the aforementioned content of confetti and moderate (or more severe) snowfall, which essentially won't be encoded transparently no matter how high a bitrate is used. And that is exactly the same situation to what we have here with Opus - except one can argue that the particular content that breaks Opus is more artificial than confetti or snowfall.

This isn't a "terrible analogy", it's an almost perfect analogy - you just don't like it.

They also have a "slightly different" attitude: if you want to distinguish by eye, you can zoom in by insane factors. They assume you don't.

Not only that, but you also aren't supposed to be staring at a single individual frozen frame of a video - you're only supposed to see an individual frame for a couple dozen microseconds, and video encoders actually use this fact as well to spend less data on very quickly moving/changing areas of a frame. If you pause and stare at an individual frame, you're "cheating". In other words, if a video encoder failed to achieve visual transparency when looking at an individual frame, that does not also mean that it has failed to achieve visual transparency when the video is actually watched at its nominal framerate.

Why? They’re not the result of hundreds of hours of research, it’s just a collection of tracks that I thought had “sharp” sounds.

One of them is from the Jimmy Edgar EP “Make, Model, Bounce”.

By the way, did you actually encode these tracks using Opus and verify that you can ABX them? Or did your entire argument stop at proclaiming that their spectra look "similar enough" to the problematic sample?

For that matter - I see you also haven't ABXed the sample provided in the OP - you just jumped on the bandwagon without even checking that you can hear a difference.
Title: Re: Opus killer sample at 256kbps
Post by: doccolinni on 2022-02-09 15:12:51
For anyone interested in further testing, I provide more encodes of the sample at varying frame sizes (frame size indicated in the filename). All provided encodes are 256 kbps VBR.
Title: Re: Opus killer sample at 256kbps
Post by: Brazil2 on 2022-02-09 23:55:37
Why? They’re not the result of hundreds of hours of research, it’s just a collection of tracks that I thought had “sharp” sounds.
For testing purposes, obviously. I don't understand how this is music in the first screenshot.
So, can you upload the corresponding audio samples please ?
Title: Re: Opus killer sample at 256kbps
Post by: kode54 on 2022-02-10 05:06:46
The whole purpose of lossy codecs is to range in functionality from "not terribly annoying" to "audibly transparent to the listener". The threshold depends on how much you're willing to put up with, and how much bits you're willing to throw at the encoder. Clearly, in this case, transparency depends on the listener, and if it's not achieving transparency even at high settings, something needs to be looked into.
Title: Re: Opus killer sample at 256kbps
Post by: doccolinni on 2022-02-10 16:17:58
The whole purpose of lossy codecs is to range in functionality from "not terribly annoying" to "audibly transparent to the listener".

Honestly, I feel like this perfectly summarizes why non-transparency in this particular case is such a non-issue to me.

Well, first of all, it's noise. It's not white noise - rather it's particularly coloured noise - but it's noise nevertheless. And there's only so much you can do when encoding pure noise, even when encoding lossily. To me, the original sample and the Opus encode both equally adequately sound like particularly coloured noise, even though they sound (slightly) different.

But onto the part that relates to what you posted. Which is - even though, from what little I listened to the original sample and the Opus encode, to me it seemed like I could hear a slight difference, both samples were too PAINFUL for me to actually perform a proper ABX. Personally, I think that in itself is relevant to judging how detrimental a failure to achieve transparency is for a particular sample. When lossy audio encoders are tested, people are asked to rank samples on a scale which includes options such as "noticeable but not annoying", "annoying", etc. In this case, I would personally rate the original sample itself at the absolute bottom of that scale, so from that perspective, what even is there for a lossy encoder to ruin further anyway?!

To me, both the FLAC and the Opus samples make my ears bleed - it's just that they do it while sounding slightly differently. Does one sound better/worse than the other? To me personally, no.

If - somehow - a piece of music I was listening to included a sample such as this and the Opus encode failed to achieve transparency in the same manner in which it failed to achieve it here, would I notice it and would it bother me? Even if I did notice it, there is absolutely no way that it would bother me more than the original sound itself bothers my ears in the first place.

If something like this happens to a sample for which I think the Opus encode actually makes the sound worse, then I'll be bothered.
Title: Re: Opus killer sample at 256kbps
Post by: m0rbidini on 2022-02-17 13:29:37
None of the samples were PAINFUL for me to actually perform a proper ABX.

Everyone is talking about "music" or whatever. Lossy audio encoding is not supposed to be used exclusively in music.

We have lots of examples of "noise" that are transparently coded at these bitrates. I assume this is by design and not just an accident.

I can understand the limitations of lossy encoding but spinning it to be a good thing outside of niche scenarios (eg. using artefacts on music) really takes the cake.




Title: Re: Opus killer sample at 256kbps
Post by: doccolinni on 2022-02-17 13:56:30
spinning it to be a good thing

This is a thing I very explicitly did not do.

What I said is that I don't see the failure to encode this particular sample transparently as detrimental, because I personally am primarily interested in whether a lossy encoder degrades the sound quality, and to me both the original sample and the encode sound equally bad. Nowhere in this do I claim that the failure to encode this sample transparently is "a good thing", just that I personally don't find it problematic.

I'm not spinning anything, but you are - you're spinning my words into something I never said.
Title: Re: Opus killer sample at 256kbps
Post by: Porcus on 2022-02-17 14:16:25
This is maybe a goes-without-saying to some, but likely not to everyone:

Lossless encoding depends on the information content of the signal. Harder to compress is harder to compress.
Lossy encoding depends on the (most) useful content of the signal, but not directly - it depends on a model for ordering the "(most) useful".

White noise is hard to compress losslessly, but in principle easy lossy - just replace it with a "play noise!" instruction.

A compressor should minimize overall badness for given total size. Saying that a lossy compressor shall not judge which music shall have artifacts, gets two things wrong:
1: a lossy compressor shall obviously compress silence with no artifacts because that is easy - even if that means that difficult music will get treated worse.
2: a model for hearing is a model. All models are wrong. Some are useful.

Saying the opposite also gets something obviously wrong: if those who build and tune the psy model didn't imagine we would listen to these or those signals, then well, it may have failed out-of-sample testing. Revise.

Saying that "minimizing badness entails that ..." often makes the mistake that there is one nature-given criterion with no subjectivity. It isn't. Lossy compression at low bitrates is about subjective badness. Hopefully my subjective badness when I am listening (and yours when you are).

And pulling the "so you are saying we cannot even assess lossy ..." forget that thing. Even in situation where there is no subjective agreement on what is best, there could very well be a ton of consensus about wrongs. Yes we can say something about the wrongs of [fill in nineties encoder at suitable bitrate] and whether we have improved.
Recommended: Isaac Asimov's "The Relativity of Wrong" (https://en.wikipedia.org/wiki/The_Relativity_of_Wrong). The ... uh, the title track, in musical terms. Google for (errhm something something TOS9).
Title: Re: Opus killer sample at 256kbps
Post by: rutra80 on 2022-02-17 15:25:00
Lossless audio encoding is shortsighted - if you feed it with a signal bit-for-bit repeating every minute several times, it won't be very effective. If you feed 7z or rar with it, given large enough dictionary, they will be several times more effective. It's sometimes the case with synthesized/emulated beeper/pc-speaker or otherwise oldschool chiptune music. That's the cost of specialisation.

Lossy encoders are specialised/tuned for real world TYPICAL audio signals. There ARE edge cases where they will fail either by lack of CBR/ABR transparency or by VBR bitrate bloat. Is it a problem if it happens with typical audio signals? Yes. Is it a fail if it happens with 0,01% of artificial signals? No. Should it be looked into? Yes. Should it be tuned if there's a risk of affecting typical audio encodings? No.
Lets take a screenshot of this page and save as 80% quality JPEG. Artifacts are obvious. Is JPEG a fail and should it be tuned? No, 80% quality is perfectly fine for 99% of photos.

And indeed that artificial example from this thread isn't very annoying to me, barely noticeable, far from emotions it aroused. But I always was on the lower side of bitrates (most of my collection is MPC --radio).
I'm guessing now but it probably is possible to filter the original file the way an audio engineer would do - so it still sounds the same but doesn't have that absurd ultra noise, and I guess Opus would encode it well then (seems like it allocates too much bits for that useless freqs which should be lowpassed whatsoever).
Title: Re: Opus killer sample at 256kbps
Post by: doccolinni on 2022-02-17 16:49:54
Is it a problem if it happens with typical audio signals? Yes. Is it a fail if it happens with 0,01% of artificial signals? No. Should it be looked into? Yes. Should it be tuned if there's a risk of affecting typical audio encodings? No.

100% agree.
Title: Re: Opus killer sample at 256kbps
Post by: C.R.Helmrich on 2022-02-17 23:56:06
Me too. As a codec developer, I actually looked into this by encoding at different bitrates and can't find any obvious problem here. The 14-kHz spectral content is simply at the threshold of being zeroed out during encoding. Anybody worried by such behavior should either increase the bitrate (here, to e.g. 320 kbps) or use a different codec (i.e., a newer one).

Chris

P.S.: I can't hear the artifact myself, at least not at loudness levels which don't hurt my ears.
Title: Re: Opus killer sample at 256kbps
Post by: j7n on 2022-02-18 01:16:13
If you feed 7z or rar with it, given large enough dictionary, they will be several times more effective. It's sometimes the case with synthesized/emulated beeper/pc-speaker or otherwise oldschool chiptune music.
Synthesized music will rarely have exactly repeating sequences because its samples may start at an offset in time that is not an integer multiple of a sampling interval, such as if the music has been rendered at an odd internal rate, or if it has been captured from a physical device. 7-Zip by default has a delta filter for WAV files (only), which has to be defeated to take most advantage of repeating patterns. Other compressors also have multimedia mode for sound and graphics, similar to how a lossless audio codec works.

I agree that it is not worth optimizing the codec for artificial noise. It is well preserved in this example. If it was used as an effect in a real audio file, to simulate a raging water or an electronic device like the HBO logo, I would get the same impression from it after compression.

What I initially thought to be artifacts, three clicks (at 0.57, 3.20, 6.1 seconds) and three tones are also present in the original. There seems to be a real sound mixed under the noise, or a random generator that is not truly such. To hear the high frequency portion of the spectrum, I have to turn up the volume, and then I only hear a sharp pulse when starting playback, as my ears rapidly become insensitive.