Skip to main content
Topic: Looking at Opus for MP3 replacement and have questions (Read 9638 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Looking at Opus for MP3 replacement and have questions

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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #1
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.

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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #2
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)

Re: Looking at Opus for MP3 replacement and have questions

Reply #3
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 :(

Re: Looking at Opus for MP3 replacement and have questions

Reply #4
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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #5
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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #6
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?

Re: Looking at Opus for MP3 replacement and have questions

Reply #7
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!

Re: Looking at Opus for MP3 replacement and have questions

Reply #8
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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #9
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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #10
I can confirm Poweramp 703 alpha build is working with Opus and very stable.
Version 3 is actually a much better interface.

Re: Looking at Opus for MP3 replacement and have questions

Reply #11
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. 


Re: Looking at Opus for MP3 replacement and have questions

Reply #12
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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #13
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...

Re: Looking at Opus for MP3 replacement and have questions

Reply #14
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.
lame3995o -Q1.7
opus --bitrate 140

Re: Looking at Opus for MP3 replacement and have questions

Reply #15
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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #16
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 .
wavpack 4.8 -b4x4s0.75c

Re: Looking at Opus for MP3 replacement and have questions

Reply #17
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.

lame3995o -Q1.7
opus --bitrate 140

Re: Looking at Opus for MP3 replacement and have questions

Reply #18
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:


No more words need. Just some facts.

Re: Looking at Opus for MP3 replacement and have questions

Reply #19
No more words need. Just some facts.
Indeed! Your link and pics do not support your speculation about Opus.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?


Re: Looking at Opus for MP3 replacement and have questions

Reply #21
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.
lame3995o -Q1.7
opus --bitrate 140

Re: Looking at Opus for MP3 replacement and have questions

Reply #22
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


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.

Re: Looking at Opus for MP3 replacement and have questions

Reply #23
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.
Is 24-bit/192kHz good enough for your lo-fi vinyl, or do you need 32/384?

Re: Looking at Opus for MP3 replacement and have questions

Reply #24
@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.
lame3995o -Q1.7
opus --bitrate 140

 
SimplePortal 1.0.0 RC1 © 2008-2018