Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Choosing An Encoder... (Read 5009 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Choosing An Encoder...

Since the day i registered to this forum I've been told about the limitations of mp3, the ability of .ogg to deal with medium/high birates, and the excellent transparency at higher birates of .mpc.

But, when i'm ripping an album how do i know wich codec fits better? If we got (at least) 3 encoders for different birates, why do we keep encoding an entire CD using only 1 codec?
Hearing and analizing tracks one by one before encoding makes no sense, so a "ripping-and-choosing-the-best-encoder-available" program should be coded. By analizing the tracks, the program could choose the encoders and parameters wich deal better with desired quality/compression.
I'm not requesting anything, just suggesting... I would code it myself if i know how...

Choosing An Encoder...

Reply #1
That's kind of the whole point of VBR encoders with quality presets. You pick your desired quality level and the encoder will produce output consistent with your quality choice. VBR basically means "give me the lowest bitrate to maintain
  • level of quality". It performs your "hearing" and "analyzing" idea by using an optimized psymodel. Lossy encoders aren't perfect because we cannot completely model the operation of the human ear through software code, though some codecs demonstrate that we have gotten pretty close.

    Frankly, WHY would you want to encode a CD using multiple codecs? What a mess. I'm not sure I'm buying that, say, track #1 would sound better with Ogg and track #2 would sound better with MPC. At what bitrate? At what quality level? They don't directly compare. And with VBR, you don't know the final bitrate beforehand. Pick a codec, pick a quality level and go.

Choosing An Encoder...

Reply #2
Mess? What mess?
track01.mp3
track02.ogg
track03.mpc
You don't even notice the format changes, winamp reads them all!

Maybe i haven't explained well. (it's pretty diffucult to do it in a foreign language).

Let's assume you encode track 01 (VBR) using mp3, ogg, and musepack. Isn't it possible to sound better with musepack than with the other encoders? It will probably sound.

Let's encode track 02, now. It is a bridge to track 03, and it's only digital silence, for, let's say, 10 minutes. LAME would probably encode it at a constant birate of 32 Kbps since it's the lowest birate it can encode, but mpc and ogg can encode it at 1 Kbps (can't they?). Wich means, for this track, mp3 isn't the smartest choice for my encoding.

This is just an example, but you see what i mean, right?

Choosing An Encoder...

Reply #3
The main problem with this is that there isn't a way of deciding which of the three formats produces the best output without listening to them.  You can't compare them to the original, because the whole point of psycho-acoustic compression is that the files don't LOOK the same, they just SOUND (pretty much) the same.  And if you don't know if they sound the same, it isn't safe to pick the smallest.

Cheers, Paul
----
rarewares at http://audio.ciara.us/rarewares/

Choosing An Encoder...

Reply #4
just stick to mpc 
A riddle is a short sword attached to the next 2000 years.

Choosing An Encoder...

Reply #5
Quote
The main problem with this is that there isn't a way of deciding which of the three formats produces the best output without listening to them.  You can't compare them to the original, because the whole point of psycho-acoustic compression is that the files don't LOOK the same, they just SOUND (pretty much) the same.

I must disagree with you. You can analize the frequency of the output file and compare it with the original track. r3mix.net webmaster have done it, in the analysis section. By encoding a file in different formats and comparing the frequency of each one of the output files with the original frequency, the program could determine wich one sounds most like the original.

Each track is a case, you can't assume Musepack will encode all of them better than ogg or mp3. As far as i'm concerned, comparing the frequencies is the only accurate method to determine wich file is encoded with more precision.

Choosing An Encoder...

Reply #6
Quote
Hearing and analizing tracks one by one before encoding makes no sense, so a "ripping-and-choosing-the-best-encoder-available" program should be coded.

It's not an ultimate solution. Some people are more annoyed by some artifacts than other one. And this judgment can evoluate. In summer, I found Vorbis unbeatable at 100-150 kb/s. Less distorsion (or no distorsion), but a small amount of noise. I find it more « analogic », more natural. At the moment, this vorbis artifact make me crazy : I can support it anymore, and, worse, I don't find it natural anymore. Maybe this winter will I find vorbis marvellous again...


Another thing to take into consideration is that a CD track is not uniform. In the time of 5 seconds, it's possible that 5 different encoders should be used : mpc for pre-echo, vorbis for other problem, lame for another, mp3pro, etc...

So better chose one codec/format, and use lossless for your favorite songs/CD. Othewise, you will waste your time
Wavpack Hybrid: one encoder for all scenarios
WavPack -c4.5hx6 (44100Hz & 48000Hz) ≈ 390 kbps + correction file
WavPack -c4hx6 (96000Hz) ≈ 768 kbps + correction file
WavPack -h (SACD & DSD) ≈ 2400 kbps at 2.8224 MHz

Choosing An Encoder...

Reply #7
Quote
I must disagree with you. You can analize the frequency of the output file and compare it with the original track. r3mix.net webmaster have done it, in the analysis section. By encoding a file in different formats and comparing the frequency of each one of the output files with the original frequency, the program could determine wich one sounds most like the original.

The most noticeable degradation of a perceptual encoding is not the level of cutof. Distortion, pre-echo, watering-sound, noise... are not represented by this way. Otherwise mp3pro will clearly be a winner, with 80 kb/s only...
Wavpack Hybrid: one encoder for all scenarios
WavPack -c4.5hx6 (44100Hz & 48000Hz) ≈ 390 kbps + correction file
WavPack -c4hx6 (96000Hz) ≈ 768 kbps + correction file
WavPack -h (SACD & DSD) ≈ 2400 kbps at 2.8224 MHz

Choosing An Encoder...

Reply #8
Aah, the ghosts of r3mix.net will haunt us for all eternity.

Choosing An Encoder...

Reply #9
Someone care to explain why frequency analysis is the worst method possible for determining audio quality?

I'd do it, but I don't feel like typing it up for the Nth time.

(Yes, I know, we *really* need to finish those damn FAQ's... )

Choosing An Encoder...

Reply #10
Dibrom I have always respected your unbiased  and intelligent opinion but you are wrong on this point. The following link proves that spectrum analysis can determine the quality of audio data. Link. As can be clearly seen the spectrum analysis shows that this compressed audio file has been perfectly reproduced from the original file.   

Anyways emtee before even more people flame you, currently the only way that you can judge different lossy codecs is to listen to them. The goal of a lossy codec is to discard parts of the audio file that it does not believe that you will hear. There are tons of other posts throughout this board that explain how it does this. If you think about it you are taking a file, telling three programs to get rid of data that it thinks a human won't hear and then asking a fourth program to decide which program it thinks did the best job of throwing away information that it doesn't think humans will hear. So as you can see what you propose makes no sense. If your program had such a perfect psymodel then all encoders would use this psymodel and we wouldn't have to worry about different encoders because they would all pretty much be exactly the same.


PS - I got the link from here.
Sorry, I have nothing witty to say here.

Choosing An Encoder...

Reply #11
Thank you for "bothering" flloyd.

Choosing An Encoder...

Reply #12
Quote
Dibrom I have always respected your unbiased  and intelligent opinion but you are wrong on this point. The following link proves that spectrum analysis can determine the quality of audio data. Link. As can be clearly seen the spectrum analysis shows that this compressed audio file has been perfectly reproduced from the original file.  

lol 

I have that album btw.. good stuff

Choosing An Encoder...

Reply #13
Quote
Thank you for "bothering" flloyd.

No need to be bitter

I'm sorry if I may have been a bit dismissive, but the information on r3mix.net, especially about frequency analysis being used to determine audio quality is, quite frankly, bullshit.

The topic has been covered many many times before on this forum, and I've personally explained why this information is incorrect more times than I can count.

The bottom line is that the author of r3mix.net didn't understand psychoacoustics, for the most part didn't really know what he was doing with MP3 (at least, certainly not to the degree implied on his website in the various subsections), didn't really understand how to properly test audio codecs (and moreover, didn't believe in blind testing), and, worst of all, knows that most of the information on his page is inaccurate/incorrect/outdated (search his forums, he's even admitted this) but yet he refuses to change or remove it.  As a consequence, we get people new to audio compression reading the stuff on his site and then coming here posting about it.  They make proposals based on flawed information, and it becomes a hassle to try and explain over and over the fundamental problems with their theories.

I'd really suggest looking through some of the older threads on this site and using the search function quite liberally.  There's a lot of good information buried in there and a lot of it will explain in detail the proper way to go about testing audio quality, etc.

Choosing An Encoder...

Reply #14
As far as r3mix.net goes, it obviously doesn't help that mp3dev.org has them at the top of their " MP3 Encoding Web Sites:" list.

I too made the mistake of r3mix.net at first, but the kind and knowledgable people here have certainly set me on the right path.  Of course I'm still in the throws of Ogg -q6 vs Lame 3.92 --preset extreme, but I'll figure that out sooner or later.

Dave

Choosing An Encoder...

Reply #15
Sorry emtee I wasn't trying to be rude to you, just teasing.  Basically for the exact reasons that Dibrom explained (who I do believe is very unbiased, intelligent, and rational).

BTW if I didn't explain clearly why I believe that the program that you propose is impossible to design please let me know and I will try to make my point more clearly.
Sorry, I have nothing witty to say here.

Choosing An Encoder...

Reply #16
Quote
Mess? What mess?
track01.mp3
track02.ogg
track03.mpc
You don't even notice the format changes, winamp reads them all!

Totally wrong, there.

At least on my PC, Winamp's MPc input plugin has major problems. Specifically, it tells me my files are full of errors when in fact they are not, and so it can only play maybe the 7 first seconds of a files before stopping.

But I can play MP3 and OGG files just fine.

So if you, in your infinite wisdom, made me an album the way you're talking about, I wouldn't be able to play all the tracks.

...

Also, I would believe that consistency is just as important for most of the people in this community as the quality itself.

Each encoder not only performs differently at different bitrates, but they also all have their own unique colouring effects on the music. On top of that, each supports tags differently, would require a different program to adjust the gain with, uses up a different amount of memory during playback, etc...

So you'd be leaving yourself or whomever else you trade albums with, with something that would be a major headache to manage.

Choosing An Encoder...

Reply #17
Quote
At least on my PC, Winamp's MPc input plugin has major problems. Specifically, it tells me my files are full of errors when in fact they are not, and so it can only play maybe the 7 first seconds of a files before stopping.

Could you post your answer to this thread.

 

Choosing An Encoder...

Reply #18
ok, emtee, now that everyone else is apologizing for being rude, i might as well apologize for being quite short-worded as well

i do suggest you to use mpc (--standard, for example), because over time it has shown to deliver a _very_ stable level of quality, with most samples deteriorating only very slightly.

the gains of your method over just using mpc as a fire-and-forget would most likely be _very_ marginal, and on the other hand if only using mpc your savings in time would be immense.

you might want to consider mpc's insanely fast encoder there (it's more than thrice as fast as its competitors on my computer) and its high performance for transcoding purposes, should you ever need mp3s or oggs for your hardware player (and maybe we'll see mpc hw players as well, someday...)
A riddle is a short sword attached to the next 2000 years.

Choosing An Encoder...

Reply #19
Quote
the gains of your method over just using mpc as a fire-and-forget would most likely be _very_ marginal


I don't think the gains would really exist period.

The only situation I could think where this approach *might* work is at very low bitrates like 64kbps.  Even then, it'd really only be a choice between 2 codecs: mp3pro and ogg vorbis, and maybe eventually aac+ depending on how good it turns out to be.

At mid to high-level bitrates, it's pretty much a no brainer.  MPC will come out on top in almost all cases.  Just by searching this board, you can see that the ratio of problem samples found in MPC to the ratio of problem samples found in other formats (relative to users also) favors MPC.

The percentage of cases where MPC would fail and another codec wouldn't but actually sound better is would be very low so you'd really just be wasting your time in most cases.

Not to mention, with this approach, you're likely not going to have gapless playback, especially if you use mp3.  You also might not have consistency across tracks with replaygain, etc.

Overall, this approach just doesn't make sense.

Oh, and this is all assuming that you actually do *valid* comparisons of files through rigorous double blind listening tests -- not frequency analysis.  You have to realize in that situation also that it is likely there will be cases where one sample is inferior to another but that you cannot hear it.. while others will still be able to.  Sonograms and Frequency Analysis don't correlate with perceived quality, especially in the case of psychoacoustic encoders, so there's also no 100% absolute bjective way to judge the perceived quality of each sample relative to the original.

So basically, aside from the impracticalities which would arise from using different physical formats and the extremely low effort/gain ratio of using a method like this, there's also no way for you yourself to really even be able to make such fine and absolute judgements of quality in all cases anyway.