HydrogenAudio

Lossy Audio Compression => Opus => Topic started by: krafty on 2016-11-04 21:00:53

Title: Looking at Opus for MP3 replacement and have questions
Post by: krafty on 2016-11-04 21:00:53
Hi. It's been a long time I don't post here, and just noticed last year that Opus was the new hot codec on the scene, beating everything it could on the latest listening test. I have a couple of questions though:

Opus resampling:
1) Why does Opus upsample everything to 48000Hz?
2) Is there any need to worry about quality concerning the Opus internal resampler?
3) Will Opus do everything right if it is told to not upsample but keep the original 44100Hz, or will it have to spit its guts to decode after this?

Opus binaries:
1) Seems that the latest binary is 1.1.3, however, the opusenc.exe seems that is not working with foobar2000. I tried to encode and it returned a error. With inbuilt foobar's opusenc lib, it encodes fine.

Opus quality:
1) Being a MP3 V0 guy, what would be (approximately) the equivalent setting around V0 or V2 in Opus, since it can produce smaller files and higher quality, better even that aoTuV?

Opus metadata:
1) Does embedded album art work for Opus? Are the size limits? My images are 1500x1500 and usually around 1.5 MiB.
2) ReplayGain is stored differently in Opus, like a global album gain in a tag, and a separate tag for track gain. Will this sort of have any complications with Android player Poweramp?

Opus icon for foobar2000:
1) foobar2000 folks now should address this, but here's the petition... I'm getting an OGG icon for opus files. Will we have a proper OPUS icon soon? Getting the OGG icon feels really odd.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: jmvalin on 2016-11-04 21:49:41
Opus resampling:
1) Why does Opus upsample everything to 48000Hz?
Because Opus is designed to work at 48 kHz. Using a single rate allows it to do many thing that would be hard otherwise.

Quote
2) Is there any need to worry about quality concerning the Opus internal resampler?
See the answer on the Opus FAQ (https://wiki.xiph.org/OpusFAQ#But_won.27t_the_resampler_hurt_the_quality.3F_Isn.27t_it_better_to_use_44.1_kHz_directly.3F).

Quote
3) Will Opus do everything right if it is told to not upsample but keep the original 44100Hz, or will it have to spit its guts to decode after this?
There's a special "Opus custom" mode that can operate at 44.1 kHz, but it's not as good as 48 kHz. You'll get worse quality and incompatible files, so you really shouldn't do that.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-04 23:51:41
Quote
1) Being a MP3 V0 guy, what would be (approximately) the equivalent setting around V0 or V2 in Opus, since it can produce smaller files and higher quality, better even that aoTuV?
Opus is better than both MP3 and Vorbis at 96-128 kbps. http://listening-test.coresv.net/results.htm

Opus 96k ~ MP3 160k
Opus 128k ~ MP3 192k (V2)
Opus 160-192k ~ MP3 256-280k (V0)
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Seren on 2016-11-05 03:34:38
Back when I encoded all mine for my phone (before 1.1) I found 180kbps transparent. Was above V0 (which I didn't find fully transparent) so I doubt you'd need to go higher than that. Right now I'm using Apple AAC (V109 ~256kbps) for my main library as I still rely on an old iPod and games such as Audiosurf which don't support Opus :(
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: ChronoSphere on 2016-11-05 15:39:40
2) ReplayGain is stored differently in Opus, like a global album gain in a tag, and a separate tag for track gain. Will this sort of have any complications with Android player Poweramp?
Depends on what Poweramp uses. If it's ffmpeg, then most likely, yes. I'm using goneMAD player which also uses ffmpeg as a backend and it basically applies RG twice, so the music is much quieter than it's supposed to be. Though, that's when converting to opus with foobar2000, maybe converting with another tool writes the tags differently. I haven't tried.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: lithopsian on 2016-11-05 21:50:42
2) ReplayGain is stored differently in Opus, like a global album gain in a tag, and a separate tag for track gain. Will this sort of have any complications with Android player Poweramp?
Depends on what Poweramp uses. If it's ffmpeg, then most likely, yes. I'm using goneMAD player which also uses ffmpeg as a backend and it basically applies RG twice, so the music is much quieter than it's supposed to be. Though, that's when converting to opus with foobar2000, maybe converting with another tool writes the tags differently. I haven't tried.
Poweramp is supposed to have sorted this problem in the v3 alpha. Not sure if it plays Opus at all in the current release version. Anyone?

Opus album art metadata is the same as Vorbis. It is basically a Flac picture block base64-encoded and slapped into a METADATA_BLOCK_PICTURE tag. Whether your player supports it or not is anyone's guess. Size is effectively unlimited in the spec, but there are practical limits in real-world software and hardware.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Leo 69 on 2016-11-05 21:56:46
The main reason I haven't switched to Opus is that I heard somewhere that it reconstructs high frequencies so that they are basically synthetic..like in HE-AAC, for instance. Is this a correct assumption or not?
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: ChronoSphere on 2016-11-05 23:23:03
If you can't hear the difference, does it really matter if they are reconstructed or not?

Also, I've looked at foobar2000-created Opus files with opusinfo and it seems the RG tags are written to reach -84db loudness, not -89db (so, according to spec). This would explain why opus sounds quieter than other formats in goneMAD player, though: it applies the RG value correctly, but assumes a target level of -89db!
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: krafty on 2016-11-06 03:17:03
Thank you for your replies.
Just to reply some of the risen doubts:
Poweramp stable does not play Opus. The alpha is supposed to play of most devices, but I haven't tried.
Resampling shouldn't matter as it is specified. Thanks for the folk who pointed out the FAQ and developers who commented on this.
I would have thought so that probably 192 VBR was a near target for V0 MP3 equivalent. Thank you.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: jmvalin on 2016-11-06 07:54:03
The main reason I haven't switched to Opus is that I heard somewhere that it reconstructs high frequencies so that they are basically synthetic..like in HE-AAC, for instance. Is this a correct assumption or not?
Depending on the bitrate, it may indeed inject synthetic high frequency content, just like HE-AAC (though the technique is very different), and I think even AAC-LC. The alternative is what MP3 does, which is spend lots of bits to code a handful of non-zero values in the HF that sound really bad (that's the musical noise you hear at low bitrate). As I said, it depends on the bitrate and it only happens when it improves quality.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: krafty on 2016-11-07 00:03:10
I can confirm Poweramp 703 alpha build is working with Opus and very stable.
Version 3 is actually a much better interface.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-07 00:28:46
The main reason I haven't switched to Opus is that I heard somewhere that it reconstructs high frequencies so that they are basically synthetic..like in HE-AAC, for instance. Is this a correct assumption or not?
Opus has similar technique to HE-AAC (SBR). It's called 'band folding'.
Don't worry about quality. It's smarter/better than both HE-AAC and LC-AAC. Band folding is applied only at relatively low bitrates.
As bitrate gradually increases the folding moves to higher frequencies and the rest of frequencies are coded normal way. The band folding doesn't apply at medium and high bitrates. 

Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Leo 69 on 2016-11-07 15:50:43
jmvalin

Thanks a lot for clarification! I appreciate it. I have one more question though..
I know Opus is a multichannel-capable codec, but is it really safe to use it for 7.1 audio? I tried to reach transparency for my ears at ~448 kbps, but I can clearly hear that it's inferior to a Dolby Atmos track, which is somewhere at ~4700kbps on average. Some high-frequency material in the movie soundtrack during the end of the film sounds "mushy", compared to the original. Do I need to set the bitrate higher? I'm wondering if Opus is really really intelligent in setting the quality right when encoding these non-trivial sources.

I must admit, Apple LC-AAC sounds 100% transparent to me in this case at the resulting bitrate of ~550 kbps on the very same track.

IgorC
Quote
Opus has similar technique to HE-AAC (SBR). It's called 'band folding'.
Don't worry about quality. It's smarter/better than both HE-AAC and LC-AAC. Band folding is applied only at relatively low bitrates.
As bitrate gradually increases the folding moves to higher frequencies and the rest of frequencies are coded normal way. The band folding doesn't apply at medium and high bitrates. 

Igor, many thanks. I'll do more testing. What I'm currently interested in most of all is multichannel encoding. Apple LC-AAC is the current choice, but I'm looking at ways of decreasing the bitrate even more without losing quality.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: krafty on 2016-11-13 22:29:40
Quote
Opus 96k ~ MP3 160k
Opus 128k ~ MP3 192k (V2)
Opus 160-192k ~ MP3 256-280k (V0)

I encoded several albums with 192k VBR setting in Opus.
The results are impressive. Given some albums (like Kraftwerk, The Mix), the bitrate is usually 240 kbps and sometimes it gets above 350 kbps. With MP3, 320 should hit the top, with the most problematic sample, having all its efforts to this ceiling.
I also noticed that 192 VBR with Opus gives the usual size of Lame MP3 V2 VBR.
Since Opus can even go up to 350-370 kbps in some samples with 192 VBR, I shouldn't bother to encode anything at 256 VBR with Opus? This coming from the point that the last listening test was almost hard to tell from 96 kbps, and the wiki page says 128 kbps achieve transparency for almost all people...
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: halb27 on 2016-11-14 06:45:08
Quote
With MP3, 320 should hit the top, with the most problematic sample, having all its efforts to this ceiling.
This is a common misunderstanding.
mp3 can go up to more than 400 kbps locally due to the bit reservoir.
mp3 does have technical restrictions but the practical impact of this fact is overestimated most of the time.
With a good mp3 encoder and a sufficiently high bitrate like your target bitrate of 256 kbps you are hard pressed to find a situation in which you're not totally satisfied using mp3.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: krafty on 2016-11-14 08:48:26
Quote
This is a common misunderstanding.
mp3 can go up to more than 400 kbps locally due to the bit reservoir.
mp3 does have technical restrictions but the practical impact of this fact is overestimated most of the time.
With a good mp3 encoder and a sufficiently high bitrate like your target bitrate of 256 kbps you are hard pressed to find a situation in which you're not totally satisfied using mp3.

halb27,

If that is a common misunderstanding, please forgive me to say this, but, some of the visuals and documentation on MP3 is not very clear then. For example, when you encode a file from the lame command line, you can only graphically see the max bitrate for a frame set to 320 kbps - there should be then, a way to see that some frames have 400 kbps. Another thing is the --free-format switch that boost MP3 up to 600 kbps and can render the file incompatible with almost anything that plays standard MP3. I guess that projected my wrongful thought on how this works.

As for my concern, do you think Opus 192 VBR is a little better than LAME V0 ?? I ask this because I saw many of your posts in which you catch some problem samples. Is what folk wrote, correct? Opus 160-192k ~ MP3 256-280k (V0) ?? Do you also think this way?

What about a user called /mnt (mount), is he active on the board? He used to catch artifacts like a beast! Did he do any ABX tests with Opus and LAME? /mnt used to catch a lot of problems in the 320 kbps range, I mean, a lot of samples! Perhaps he could confirm the superiority of Opus in the range of 192 kbps, being better than LAME's V0. (I know that that is confirmed by the 2014 Listening Test at 96 kbps, would be unbelievable at high bitrates) but since the Hydrogen Wiki on Opus says "192 is transparent with some killer samples", and the Xiph Wiki says differently: "128 is pretty transparent", I think that information is not lined up very well.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: shadowking on 2016-11-14 09:12:42
I am also wondering the [any???] practical advantage of opus over something like 224 k mp3 [halb27 version vbr Q1] .    If @ < 200k Opus could save over 256..320k mp3 then it may be worth it. But he [halb27] said quality 1.7 @ 200k is overall great.. Maybe it can go even lower like 170..190k  then opus would be of little to zero advantage .
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: halb27 on 2016-11-14 10:39:26
As for what can be easily misunderstood about frame bitrate:
The mp3 bitstream is a stream of frames. The meaning of frames however comes in two flavors. What usually is thought of is the meaning of frames as containers for the data. frames in this sense are restricted to certain frame bitrates like 192, 224, 256, 320 kbps (the maximum). And this is what you are told of when looking at the Lame encoding statistics. The audio data however which belong to a certain frame are not necessarily contained in the corresponding container frame. They can be located (within certain restrictions) also in neighboring containers. This allows for a local audio data bitrate of more  than 400 kbps. The statistics however doesn't tell you about this (my lame variant does when using the --frameAnalysis option). With my lame variant I take care that this maximum audio data rate is possible to the outmost extent, But also this shouldn't be overestimated.

As shadowking writes you'll probably be fine with lower bitrates than 256 kbps even with mp3. I second this.
I participated in the last public mp3 listening test @128kbps and nearly everything was fine to me. I am sensitive to certain tonal problems however that's why I take special care of them. lame3995o is fine with them using -Q2 (~192 kbps). I personally use -Q1 because I'm a bit paranoid (= want to be very much on the safe side) and storage space is no issue for me.

/mmt is sensitive to pre-echo issues in an extraordinary way, but as long as you aren't I wouldn't care about his results. Try to ABX castanets music. In case everything is fine to you I'd ignore pre-echo when using a well-established encoder. Same goes for my personal tonal problems.

As for Opus vs. mp3 the advantage of Opus is with low and very moderate bitrates. As long as you're using bitrates >=150 kbps on average I wouldn't expect Opus to be superior. At bitrates around 150 kbps a good AAC encoder would be my favorite, at bitrates around 200 kbps or more I 'd use a good mp3 or AAC encoder.

Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-14 15:14:54
Opus and AAC have siginificant advantage over MP3.

https://hydrogenaud.io/index.php/topic,102876.0.html

So if MP3 is OK at 160-192 kbps then Opus and AAC will be certainly at 128 kbps:
(http://oi42.tinypic.com/15zh0qu.jpg)

No more words need. Just some facts.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: greynol on 2016-11-14 15:30:08
No more words need. Just some facts.
Indeed! Your link and pics do not support your speculation about Opus.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-14 16:13:51
Opus and LC-AAC perform similarly at middle and high bitrates.

Old version of Opus still as good as Apple LC-AAC 128kbps:
http://d.hatena.ne.jp/kamedo2/20120603/1338706184

(http://cdn-ak.f.st-hatena.com/images/fotolife/k/kamedo2/20120603/20120603154404.png)
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: halb27 on 2016-11-14 17:00:52
Your last graphics shows that even @128 kbps there is no reason to prefer Opus over AAC.
If I were to choose on the basis of that graphics I'd certainly prefer AAC.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-14 17:41:49
Use whatever you want opus or aac. Nobody claims that there will be big difference at 128 kbps .  And re-read this was old version of Opus.

Now re-read (before talking) my messages
Opus and LC-AAC perform similarly at middle and high bitrates.

Old version of Opus still as good as Apple LC-AAC 128kbps:
http://d.hatena.ne.jp/kamedo2/20120603/1338706184

(http://cdn-ak.f.st-hatena.com/images/fotolife/k/kamedo2/20120603/20120603154404.png)
It was about Opus, AAC vs MP3 as You can see .... not "AAC vs Opus".
Is it clear now or should we re-read some parts again? :D

P.S. halb27, and just for the record your perfomance in previous public tests was truely  awfull (like here http://listening-test.coresv.net/). All your results were discarded because You couldnt say where is lossless and lossy (not that great quality anyway)  too many times.  It's improtant to know  from where comes critics and should we expect any claim from You.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: greynol on 2016-11-14 17:53:50
Use whatever you want opus or aac.
Or mp3 or vorbis or mpc or wavpack lossy or wma or atrac or ...

P.S. And just for the record your perfomance in previous public tests was truely awfull. All your results were discarded because You couldnt say where is lossless and lossy (not that great quality anyway)  too many times.
I don't see how this TOS2 violation serves any constructive purpose in this conversation.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: halb27 on 2016-11-14 18:32:36
@IgorC:
Yes,  my performance in that test was bad.
Which shows
a) 128kbps mp3 is usually fine to me (as I said in my first post above).
b) when it's about quality in a very critical way, I'm not the person to listen to (other than for certain special issues).

But you do know the results of that test: mp3 is pretty good @128 kbps! With the  exception of one sample the average Lame score for any of the samples tested was between 4 and 5, with the one  exception being not far behind.

But in the end I think we can agree upon the following statements:
a) as for current knowledge Opus is the most promising codec for bitrates below say 100 kbps. This does not exclude superiority for higher bitrates,  but so far there is no evidence for that.
b) for bitrates of say 128 kbps or more AAC is the most promising codec
c) for bitrates of say 200 kbps or higher it takes golden ears and/or special samples to tell the results of a good mp3 encoder apart from AAC.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-14 20:07:38
b) for bitrates of say 128 kbps or more AAC is the most promising codec
It would be helpful to name reasons why You think so. 
AAC is a good choice in my opinion but Opus is too.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: david-lisb on 2016-11-14 20:52:27
And ogg ?

For bitrate around 128 or 160 kps, i choose ogg.
With higher bitrate like 256, i still prefer ogg over mp3.
The cutoff frequencies ae too low with mp3 (lame 3.995o Q0.5 - 256 kps : cuttoff around 18 kps))
I'am very  sensitive with high frequencies (18-19 kps)

I don't like the resampling with opus:
i have a dac with asynchronous usb (Cambridge Audio Dac Magic 100), and 98 % of my music is 44khz....
So no reason to resampling to 48 khz.... (lost of quality...)

Sorry for my bad english :S
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: halb27 on 2016-11-14 21:04:03
@IgorC:
Currently we don't know much about Opus' quality at higher bitrates though it won't be bad certainly.
Compare this with AAC's established quality at these bitrates. Add the wide support for AAC,  resp.  consider the fact that Opus still has a bit of a development status.

Sure with higher bitrates there are more codecs to choose from. Qualitywise it doesn't matter much which one is chosen. For universal usage on the playback side AAC and mp3 are most attractive.

@david-lisb:
Your wishes for a higher cutoff frequency can easily be fulfilled with Lame and lame3995o by using the - - lowpass option.
But if you prefer Ogg Vorbis: Go ahead.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: krafty on 2016-11-14 22:06:33
I want to rectify something back in the thread. When I said that this:

Quote
As for my concern, do you think Opus 192 VBR is a little better than LAME V0 ?? I ask this because I saw many of your posts in which you catch some problem samples.

I actually meant shadowking, not halb27.

Thanks for halb27's explanation on bit reservoir and making the statement why software does not show that side of LAME.

When I am asking which codec is superior, it is purely on technical terms, as of: which is the one with few or virtually none killer samples, with high bitrates. It's is understood by the 2014 listening test, all 4 codecs used (excluding low anchor) are exceptionally good above 128 kbps.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: greynol on 2016-11-14 23:25:50
@david-lisb:
Your wishes for a higher cutoff frequency can easily be fulfilled with Lame and lame3995o by using the - - lowpass option.
But if you prefer Ogg Vorbis: Go ahead.
FWIW, I'm not buying that any of the reasoning in david-lisb's post complies with TOS8.  I'd call bullshit, but he isn't the OP and it would be a distraction.  Besides, the OP knows better.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-15 22:16:22
Currently we don't know much about Opus'  quality at higher bitrates ...
:-X  :D
This is the most unbeleivable excuse/argument I've ever heard lately. It really is.

There were varios reports of very good listeners  of how Opus performs on high bitrates.  Just in case if someone don't remeber.
https://hydrogenaud.io/index.php/topic,108211.msg888651.html#msg888651

Otherwise feel free to show where Opus doesn't perform well at high bitrates. There was somebody talking about Opus's problematic perfomance on high bitrate few years ago. We're still waiting for samples from that person.

P.S. And Opus 96 kbps hits high 4.653 score in the last public test.  What?  "4.653 it's not enough" but LAME's score 4.237 is enough for you.
OK, 64 kbps wasn't enough high bitrate where Opus has hit score 4.0 . Then we tested  96 kbps where it hits 4.653.  "But we still don't know how it performs at 128k...". Are You telling that You're not sure that Opus won't hit 4.7-4.8 at 128 kbps which is on par with  ITU definition of "transparency" which was used 20 years ago in performance verificartion test of AAC 128k ?
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: halb27 on 2016-11-15 23:18:55
IgorC,
I really don't like to argue with you forever. So this is my last post on this aspect.

I said that we don't have a lot of information about Opus quality at high bitrates. High bitrate means significantly higher than 128 kbps to me. You point to 2 personal listening tests with higher bitrates.
Jplus' test contains 8 problem samples, and his result is 'If I were to rank the codecs for their performance at high quality settings, QT AAC ends up at a distinct first place and Opus at second place, while I'd have a hard time to decide whether to put LAME or aoTuV next. ... Opus was judged fully transparent at VBR with target bitrate 224kbps, which is consirably higher than I expected based on previous reports. At preset 192 I judged it untransparent so there's no grey area like in AAC or Vorbis. Opus VBR seems to be a lot less variable than the other codecs so in CBR mode I would trust Opus files of 230kbps and up.'
Steve Forte Rio tested 4 problem samples and the average score was 5 for Opus and 4.6 for QAAC.

So we have two personal high bitrate tests, and they have a different outcome (no miracle of course with different listeners for different samples).

This is not exactly what your post is suggesting,

I never said Opus isn't a great codec, and whoever wants to use it with higher bitrate: it certainly isn't unwise.
There's just no evidence that is to be prefered over AAC, especially as AAC is a no-brainer on the playback side. Exactly this is my point, not scepticism about Opus quality.

As for me personally (as you are again adressing this though this is a totally different story): Probably Opus quality at very moderate bitrate is good enough for me (never tested it, sure I care about tonal samples). But as AAC and mp3 quality is also good enough for me at bitrates I can easily tolerate (I'm not into -V5 like you are suggesting) I have no motivation to try Opus. I can play my mp3 library everywhere, share mp3 tracks with family and friends without problems, and I love having things easy.

Sure everybody does it the way he likes. You're a great admirer of Opus obviously. So use Opus.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-16 00:12:49
You're a great admirer of Opus obviously.
And big admirer of LC-AAC, HE-AAC, xHE-AAC/USAC, Vorbis, LAME MP3, Helix, EVS, 3DAudio, MPEG2, MPEG4 ASP XviD, AVC/H.264, HEVC, Daala, Theora,  VP3/VP4/VP5/VP6/VP7/VP8/VP9/AV1.
And a tester of big-name cormmercial AAC and xHE-AAC encoders.
And?


Speaking of MP3 and AAC wide compability, yes, it was a panacea several years ago when users had to stick with what firmware support. Today most of people use mobile devices with Android, iOS, Windows. Heck, even foobar2000 now has Android and iOS version. People's preferements are changing:
HA's polls. I know they aren't 100% representative what happens globally but still.
(https://s16.postimg.org/6wjp4d85x/polls.png)
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2016-11-16 00:32:29
Currently we don't know much about Opus' quality at higher bitrates...

Exactly this is my point, not scepticism about Opus quality.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: greynol on 2016-11-16 03:56:09
I think the reasonable takeaway here is people should not blindly assume that Opus  at 320 is going to be better than aac at 320 or mp3 at 320 for that matter.

Arguments from ignorance are just that: logical fallacies.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: jmvalin on 2016-11-16 06:49:43
OK, a little bit of information theory here... One property of all (not totally stupid) quantizers is that their noise does down by 6 dB every time we increase the bitrate by one bit/coefficient. The difference between a good quantizer and a bad one is how many bits it takes to reach a fixed low-quality level. Same with different predictors, entropy coders, ... So while there may be a large difference between codecs at low bit-rates, like 48 or 64 kb/s, once you reach a high-enough quality point (around 96-128 kb/s), the rate at which quality improves as a function of bit-rate tends to be constant across codecs.

Looking at the results of the latest 96 kb/s listening test, I would say that the difference between Opus and Vorbis was probably equivalent to about 10 kb/s, with AAC being right in the middle. Information theory says that barring significant differences in encoder decisions, the quality of Opus, AAC and Vorbis is going to increase at more or less the same rate. So once you reach 192 kb/s, you could expect the differences to still be equivalent to about 10 kb/s, which is now a ridiculously small difference. At that point, I won't claim that Opus is still exactly 10 kb/s better than AAC, but I will claim that whatever difference between the two (either way) will be really small and given how insanely hard it is to do quality testing at that rate, any test you will attempt will tell you that Opus, Vorbis and AAC are all statistically tied at that rate. Also, at that point, any difference you might hear with the original would be due to a mistake made by the encoder and not something related to the format. Really, if you want transparent quality (or anything above 128 kb/s), you can use pretty much anything and you'll be fine.

Now, I did not mention MP3 above. In the 96 kb/s test, 128 kb/s MP3 was about on par with 96 kb/s Vorbis, so MP3 is 32 kb/s worse. This means you would expect MP3 to require about 234 kb/s to match 192 kb/s Opus. That's probably not too far off, except for the some issues MP3 tends to have with transients at any bit-rate. So MP3 is probably the only codec for which 192 kb/s may not be on par with Opus/Vorbis/AAC.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Soap on 2016-11-17 11:24:54
That would only hold true if all the formats allocated bits in a perfect manner and simply had different starting positions. 

However I believe that almost the entirety of format evolution is smarter and smarter (attempting to reach that perfect) allocation of bits, therefore expecting a consistent offset is incorrect.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: jmvalin on 2016-11-17 15:39:52
That would only hold true if all the formats allocated bits in a perfect manner and simply had different starting positions. 

However I believe that almost the entirety of format evolution is smarter and smarter (attempting to reach that perfect) allocation of bits, therefore expecting a consistent offset is incorrect.

The thing is that wherever you allocate the bits to sound good at 96-128 kb/s (which may differ slightly across codecs), the smart thing to do when you want to increase the bitrate is to pretty much evenly distribute the increase. That's what all the codecs do? Or have you made some psychoacoustic discoveries we haven't heard of?
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Neuron on 2017-10-18 13:40:35
The main reason I haven't switched to Opus is that I heard somewhere that it reconstructs high frequencies so that they are basically synthetic..like in HE-AAC, for instance. Is this a correct assumption or not?

Nah, it does not. It has a special "band folding" method of encoding high frequencies at low bitrates, but it always operates at 48 Khz. It does not bluntly downsample it to 22 Khz and then fake half of the frequency spectra. The downside is that under 48 kbps it sounds more "cassetty" and muddy than HE-AAC, through in my opinion less artificial (HE-AAC sounds metallic to me at low bitrates).
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: includemeout on 2017-10-18 16:07:24
The downside is that under 48 kbps it sounds more "cassetty" and muddy than HE-AAC, through in my opinion less artificial (HE-AAC sounds metallic to me at low bitrates).
You'll probably agree with me (and with TOS #8 ) that statements such as these would only make sense if backed up by ABX tests results.
Other than that they're not helpful at all, are they? Not even to justify the nechroposting.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Neuron on 2017-10-18 19:28:36
No, I do not. ABX testing would only prove that I can hear difference, not the nature of it, and I think it is fairly clear that at 48 kbps each codec has their own artifacts. No codec is transparent at 48 kbps yet, look at listening tests.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: pdq on 2017-10-18 19:47:48
ABC/HR would be the correct tool in this case.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: includemeout on 2017-10-19 01:15:39
No, I do not. ABX testing would only prove that I can hear difference, not the nature of it, and I think it is fairly clear that at 48 kbps each codec has their own artifacts. No codec is transparent at 48 kbps yet, look at listening tests.
No siree! Subjective, arcane statements such as "cassetty", "muddy" or "metallic", used by you in such a context, only belong into the typical audiophile forum.

Were you willing to follow the afore-mentioned science-driven method (which, as you know, and thank god, makes up one of the pillars of this community) a simple "Yes I can/No, I can't (hear differences)" should suffice. As simple as that.

Other than that, your claims stand as they are: discredited and of no use to anyone else.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: IgorC on 2018-01-14 16:50:53
Speaking about Opus as MP3 replacement,

SoundCloud has transitioned from streaming MP3s 128 kbps to Opus 64 kbps files (http://www.factmag.com/2018/01/05/what-is-opus-audio/)

64 kbps is kinda low even for Opus.  Opus 80k will be on par with MP3 128.
Opus 96 will be still both better & smaller than MP3 128. 

But still great to see Opus in  Soundcloud.  :D  :D  :D

Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: KozmoNaut on 2018-01-15 13:27:57
The move has also created somewhat of a shitstorm, with a bunch of people complaining loudly about it. Most of them seem to be stuck in a late-90s/early-2000s "more bitrate = always more better" mindset of 64kbps Xing-encoded MP3s downloaded from Napster, and don't seem to realize that as lossy formats get better, the required bitrate for transparency gets lower. We've had 20 years of improvements since then, which they also seem to ignore.

I find it very hard to ABX ~64kbps Opus against lossless and the default setting of ~96kbps is 100% transparent for me, no matter which samples I use. I can reliably ABX LAME -V5 MP3s (~128kbps), so for me Soundcloud's move should absolutely improve the sound quality.

I did hear some complaints that they used an old encoder version, though. My comparisons were done using opusenc v1.2.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Klimis on 2018-01-15 21:27:05
The move has also created somewhat of a shitstorm, with a bunch of people complaining loudly about it. Most of them seem to be stuck in a late-90s/early-2000s "more bitrate = always more better" mindset of 64kbps Xing-encoded MP3s downloaded from Napster, and don't seem to realize that as lossy formats get better, the required bitrate for transparency gets lower. We've had 20 years of improvements since then, which they also seem to ignore.

I find it very hard to ABX ~64kbps Opus against lossless and the default setting of ~96kbps is 100% transparent for me, no matter which samples I use. I can reliably ABX LAME -V5 MP3s (~128kbps), so for me Soundcloud's move should absolutely improve the sound quality.

I did hear some complaints that they used an old encoder version, though. My comparisons were done using opusenc v1.2.
The thing is that these improvements do not apply only to one specific format.
It's not like mp3 the last 20 years was a dead format that received no quality improvements. We cannot compare the 2000s mp3 encoders at 128kbps with Soundcloud's Lame-based 128kbps encoder that is up to date. For alot of people 128kbps can be transparent or very close to that, while a 64kbps opus file may not be far from transparent but I find it a stretch to say that it's as close to transparent as 128kbps lame is. I agree that they shouldn't have gone less than 80kbps. The move they did was just because they wanted to save a set target amount bandwidth with as little as possible loss in quality. Opus was definitely the answer. That doesn't mean that they didn't make a significant compromise in quality though, it just means it was in their least important thing out of a list.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: saratoga on 2018-01-15 22:50:26

It's not like mp3 the last 20 years was a dead format that received no quality improvements. We cannot compare the 2000s mp3 encoders at 128kbps with Soundcloud's Lame-based 128kbps encoder that is up to date.

Lame 3.93 came out in 2002, and while there was some improvements over the next 4 or 5 years, 2000s mp3 encoders were not that different from the ones we have today.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Klimis on 2018-01-16 04:54:51

It's not like mp3 the last 20 years was a dead format that received no quality improvements. We cannot compare the 2000s mp3 encoders at 128kbps with Soundcloud's Lame-based 128kbps encoder that is up to date.

Lame 3.93 came out in 2002, and while there was some improvements over the next 4 or 5 years, 2000s mp3 encoders were not that different from the ones we have today.
Still they is no comparison with any generic mp3 encoders of that time of most applications that cared little about quality at lower bitrates (like most music library programs that had a rip to mp3 function). I clearly remember struggling to encode something below 192kbps without the sound starting to get distracting on my tiny storage space phone. Most generic encoders of that time had a nose dive in sound quality below 192kbps. Lame offered unparalleled audio quality and still does for what mp3 is capable of and it still managed to pull the boundaries atleast for a slight bit the last decade or so. I wish I knew about it then, but then I wish I knew that my phone would play AAC-LC and I knew the technical advantages, but even more I wish there was opus around, it would have saved me hours of exchanging tracks on my phone's storage depending on my mood for music for the day.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: KozmoNaut on 2018-01-16 09:30:34
For alot of people 128kbps can be transparent or very close to that, while a 64kbps opus file may not be far from transparent but I find it a stretch to say that it's as close to transparent as 128kbps lame is.

It is equally good for me, ie. no noticeable artifacts or degradation, unless I listen carefully in direct comparison with a lossless version.

That's what I can say with confidence. Other people may be more sensitive to any artifacts and such.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: PtCip on 2018-01-16 15:20:20
The user most vocal about the decrease in sound quality in soundcloud even wrote an article about it Opus Tests (https://opus-tests.neocities.org/). I'm not sure though if his findings are accurate.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: KozmoNaut on 2018-01-16 19:51:49
As far as I can tell from that page, the problem is phase issues in the mono downmix.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: adamOLC on 2018-01-16 20:12:44
The user most vocal about the decrease in sound quality in soundcloud even wrote an article about it Opus Tests (https://opus-tests.neocities.org/). I'm not sure though if his findings are accurate.
I would bet that the average users of SoundCloud are not as knowledgeable when it comes to the various codecs, nor care.  They just want to hear the music and I don't believe the average users will notice a difference between 64 bit Opus and a 128 bit mp3.  It's a streaming service and they need the smaller files to provide users the same service as their catalog and user base grows. 

Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Trace on 2018-06-15 00:15:56
When they say that 160-192 is completely transparent, would 160vbr count as covering up to 192 or it's necessary that I use 192 vbr to cover up to 224?
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: ThaCrip on 2018-06-18 07:50:05
@adamOLC

Quote
I don't believe the average users will notice a difference between 64 bit Opus and a 128 bit mp3

That sounds plausible in my opinion especially given the equipment the typical person is likely to use. because listening to Opus @ 64kbps on my PC's speakers(Klipsch Pro-Media (which I had since the early 2000's)), which I would say are above average speakers in general, I think Opus @ 64kbps is up to a certain standard that many would not really notice the difference between that and the higher bit rate files. main reason I say that is because Opus @ 64kbps does not sound obviously bad as I suspect for some people you have to have sound that clearly sounds much worse than the audio CD (or the equivalent) with the overall sound for them to complain and Opus @ 64kbps is no where near that point. hell, I would not be surprised if some people could go even lower than 64kbps and not complain because when not comparing to the lossless file they still sound pretty good overall as they don't stand out in any obvious negative way with the overall sound.

@Trace

Quote
When they say that 160-192 is completely transparent, would 160vbr count as covering up to 192 or it's necessary that I use 192 vbr to cover up to 224?

When the wiki page says 160-192kbps is transparent I just assume it means you set the encoding rate to 160kbps or 192kbps (or random in-between settings which are not worth nitpicking over). I would not worry about the bit rate climbing higher or lower than the selected bit rate as the encoder seems to do that in general depending on the music it's encoding as it might go higher or lower than the selected bit rate, which is normal.

to copy some info directly from the Opus wiki page...

-96kbps = Approaching transparency
-128kbps = Very close to transparency
-160-192kbps = Transparent with very low chance of artifacts (a few killer samples still detectable)

so given that info, you can't really lose with any of those in terms of overall sound quality. so use 96kbps or 128kbps or 160kbps and forget about it. if your a little paranoid, use 192kbps and forget about it. there should not be much else you really need to know given that info above. hell, for those who like to gamble a bit on sound quality can use 64kbps as I think many will find that quite respectable for portable use and is very efficient to since it's half the storage space of 128kbps and ain't significantly worse in overall sound quality to the average person.

bottom line.... for portable usage(which is the whole point of lossy audio files), I suggest 96kbps or 128kbps and forget about it (I would apply that to Apple AAC also) as those two are pretty safe settings across a wider range of equipment that I am confident would easily please most people.

p.s. I would imagine your going to keep your lossless files (FLAC/ALAC etc) as it would be unwise to delete those especially since hard drive space has become much cheaper over the years. so worst case, you can always re-rip to a different bit rate to any lossy encoder you like in the future if you really need to. so you ain't got much to lose by trying the lower bit rates first (say 96kbps(maybe even 64kbps if space is of some concern)) and working your way up if need be.

NOTE: as far as MP3... I consider 128kbps (basically LAME @ v5) as a minimum given it's not as good as AAC/Opus in general especially at lower bit rates (say less than 128kbps or so). like if I am using MP3 for music, which I don't anymore, I simply would not use lower than LAME @ v5 as when you start to float around 96kbps and lower the differences become more profound between MP3 vs AAC-LC/Opus. so since I prefer 128kbps and less in general, that's why MP3 is pretty much obsolete for me especially given the fact that AAC will play on the vast majority of devices that MP3 will play on and if you ain't worry about hardware support much, Opus is the preferred option since it's the lastest-and-greatest in lossy audio.
Title: Re: Looking at Opus for MP3 replacement and have questions
Post by: Trace on 2018-06-19 15:33:07
@ThaCrip Much appreciated for the info, cuz. ;)