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: (MPC) best quality for target bitrate (Read 6847 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

(MPC) best quality for target bitrate

Hi!

I need an encoder with the following features:

* simple 2ch stereo 44.1/16; 48/16 would be nice
* transparent for most listeners even with hq equipment
* also transparent when transcoded (assuming the other format is capable of achieving transparency)
* can't afford lossless bitrates; <300 kbps is ok
* no streaming; the 300 kbps is not a hard limit, just an average: if it needs a higher bitrate for a particulary difficult piece, so be it
* decoder source code must be available (and buyable by a mere mortal)

I've been reading the forum for a few months now, and also doing some experimentation myself, and concluded that the encoder to use is MPC.  Now the question is, what command line parameters produce the best quality with the restrictions above?  (without the 2nd order transparency, even --standard would be ok)

The parameters below seem to deliver the best quality under 300kbps; what's the best one? (other suggestions greatly welcomed)

PROFILE=a, GAIN -6, NMT=11, TMN=28, ANS=b

where a = {xtreme, insane minSMR=0}  and  b = {0..5}

(GAIN -6 ANS 2 are defaults for insane; GAIN 0 ANS 5 for xtreme)

With the parameters above, the choice of profile affects the bitrate very very lightly (like 0.01%); there seems to be other, non visible, parameters that differ from xtreme to insane(minSMR=0).

Thanks for any suggestion,
krill

(MPC) best quality for target bitrate

Reply #1
--standard = --bw 22050 --ltq ank --ltq_gain 0 --ltq_max 83 --minsmr 0 --nmt 6 --tmn 18 --tmpmask 1 --ms 2 --cvd 1 --ans 5

--extreme = --bw 22050 --ltq fil --ltq_gain 0 --ltq_max 83 --minsmr 0 --nmt 8 --tmn 20 --tmpmask 1 --ms 2 --cvd 1 --ans 5

--insane = --bw 22050 --ltq fil --ltq_gain -6 --ltq_max 77 --minsmr 3 --nmt 9 --tmn 24 --tmpmask 1 --ms 2 --cvd 1 --ans 2

These are the switches behind the profiles (thanks to xmixahlx audio )

Personally I use --insane --minSMR 0 --nmt 12 --tmn 28 which gives me high quality files that usually range from 230 kbps avg to 300 kbps avg for the difficult ones.
The most used average bitrate is 250 kbps wich for me is excellent considering that a lot of people are encoding mp3's with 256 CBR thinking this will be the infamous "cdquality", the fools they are 

BTW You really got to see the look in some peoples eyes when you say that they should use LAME to encode their MP3's but that MP3's will always have audible artifacts due to the format restrictions (when I start about artifacts they usually get annoyed because they have already encoded lot's of albums thinking the quality was perfect)
-->xmixahlx<-- learn the truth about audio-compression

(MPC) best quality for target bitrate

Reply #2
with the restrictions provided, the answer could be musepack or psytel aac [roberto would stop talking to me if i didn't include aac...]

for aac, use the -archive profile and talk to ivan or rjamorim for more details...

for musepack, captain carnage is on track...but with a ceiling of 300 kbps average we can alot much more content to your mpcs...

try "--insane --minSMR 0 --ltq_gain -9 --nmt 14 --tmn 32" and see if that is ok with you size wize...

those commandlines [regarding the switches of the 3 profiles] are really a piece of juha's work...i took them from an old post of johnv's and modified them with him to reflect klemm's changes

later
mike

[edit: CLARIFICATION]

(MPC) best quality for target bitrate

Reply #3
I think you should use insane instead of xtreme if you plan to transcode in the future - the insane profile stores the entire frequency spectrum. I personally find the "fil" ath profile to be exceptionally sensitive and see no need to lower the ath by any more than 3dB. You can play with the nmt and tmn values to meet your bitrate demands. Based on experience, this should work fine for your task:

--insane --ltq_gain -3 --minSMR 0 --ans 5 --nmt 14 --tmn 28

(MPC) best quality for target bitrate

Reply #4
mith:

why use "--ltq_gain -3" this is less than the default of insane?

this is new to me...i thought you have been on a tweaked extreme profile nowadays?

don't know...
mike

(MPC) best quality for target bitrate

Reply #5
Thanks for all the replies!

I was thinking in a way to amplify the quality delta between the different cl switches when transcoding, to make it easier to tell them apart.

Right now I'm running a mpc->mpc transcoding test of 864 parameters combinations, each transcoding going up to order 30 or getting an EAQUAL ODG below -2.
The full EAQUAL output and bitrate are recorded for each iteration.  Due to the hardware it's running on, it'll take a few days to complete.

Currently the sample used is an unscaled porcelain.pac (downloaded from ff123's site).  It's only 15 secs long, and that may be a problem (some EAQUAL site recommends using clips of at least 20 seconds).  If the methodology proves to be valid, the test can be redone with a better clip and even more parameter combinations.

I known it's not perfect, EAQUAL not being able to hear pre-echoes, etc.  But the quality perceived by EAQUAL nicely degrades in each transcoding and also is consistent with what one expects when going to a higher nmt, etc.  Some (xtreme!) command-line combinations degrade to ODG<-2 in as little as 5 transcodes, while others are ok even after 20.

What I guess/expect/hope reflects the quality of a set of cl switches is the area under the |ODG| curve inter/extrapolated to ODG=-2, divided by the number of expected iterations (or something else based on the x axis).

I'm testing the following combinations:

(software: MPPENC 1.0, MPPDEC 1.0, EAQUAL 0.1.3alpha)

PROFILE :  xtreme, insane
ANS        :  0, 2, 5
TMN        :  20, 26, 32
NMT        :  8, 10, 13, 16
GAIN      :  0, -6, -12
MINSMR  :  0, 3
TMPMASK:  0, 1

If there's any interest I'll post the results (raw text file).

(MPC) best quality for target bitrate

Reply #6
When I was doing transcoding tests, I found that MPC -> MP3 transcoding caused very little audible distortion with the clips I used (Green Day - Burnout, castanets, fatboy, drone_short). In all cases, I could not ABX MPC-standard. I could ABX castanets and drone_short up through LAME-insane, but I didn't notice a difference between WAV -> Lame-insane and MPC-std -> Lame-insane.

With fatboy, I could only ABX up to Lame-aps (my listening environment is very noisy), and not Lame-ape (alt-preset extreme). Likewise, when I transcoded from MPC-std, I could ABX Lame-aps just as easily, but not Lame-ape.

In summary, I have yet to find a sound clip that I cannot ABX with MPC-std or Lame-aps, but that I can ABX when transcoding MPC-std -> Lame-aps. I'm sure they exist, but I haven't encountered them yet.

However, MPC re-encoding sounded terrible (contrary to what I thought I read in these forums a while back). Re-encoding Green Day - Burnout from --insane to --xtreme caused horrible cymbal flanging... it was worse than an MP3 re-encode! By comparison,  the MPC re-encode sounded almost as bad as re-encoding from Lame-aps to --alt-preset 119.

I did my own EAQUAL tests a while back, and I found that EAQUAL can hint at what might sound better or worse, but you need to use your own ears to really determine what settings work for you. I would like to see what results you get with your huge test, though. Have you listened to any of the resulting files yet?

(MPC) best quality for target bitrate

Reply #7
What about the new Braindead profile?

I believe the average is over 230-240kbps.

(MPC) best quality for target bitrate

Reply #8
SometimesWarrior:

"When I was doing transcoding tests, I found that MPC -> MP3 transcoding caused very little audible distortion with the clips I used (Green Day - Burnout, castanets, fatboy,"

I used the same codec twice to try to eliminate as many variables as possible; changing codecs (or even command lines) would introduce differences that do not correlate well with the quality of the tested switches (ie different psymodels)

"I did my own EAQUAL tests a while back, and I found that EAQUAL can hint at what might sound better or worse, but you need to use your own ears to really determine what settings work for you. I would like to see what results you get with your huge test, though. Have you listened to any of the resulting files yet?"

--standard is transparent for me.  Now the problem is, will it still be when transcoded?  (not always; I'm not including --standard level quality switches in the test)

The "hint" you mention is what I want, so instead of looking at plain numbers, I plan to compare the ODG curve of each switch combination (how to do it I don't know, CS is my stuff, but hey, one can always learn)

Let's assume the graphs give roughly a line, being ODG = -k*t, where t is the transcode number and k>0.  If that's the case I'd like to order the graphs by k, where a smaller k means better quality.  Of course it's not that simple.  And even if it were, it's still a hint, not a hard fact.

I did some listening on my $5 speakers with my $.5 ears, and --xtreme (mostly plain switches) sounded awful after 5 transcodes, underwater and distorted in ways I don't even dare to describe, but a heavily tweaked --xtreme sounded just like the original after 20 transcodes.

It's at 13% now.

(MPC) best quality for target bitrate

Reply #9
Quote
Originally posted by xmixahlx
mith:

why use "--ltq_gain -3" this is less than the default of insane?

this is new to me...i thought you have been on a tweaked extreme profile nowadays?

I saw what the "fil" ath profile looked like on ff123's site and realized it is more sensitive than what I could possibly hear in my various listening environments. -6dB is really too much unless you simply don't care about bitrate bloat. You may not even need the -3dB...0dB could be fine, but I chose -3dB for the transcoding reasons, not that it is necessary for first generation listening.

My current command line has changed drastically. I now use:

--xtreme --ltq_gain 28 --bw 17000

ltq_gain 28!? Yea, well, I listen to the MPCs while at the PC so I find anything more sensitive is just a waste of bits. Mind you, this command line is not good enough if I want to play back the file on a hi-fi system and I would use a completely different set of switches in that case.

(MPC) best quality for target bitrate

Reply #10
Quote
Originally posted by krill
Let's assume the graphs give roughly a line, being ODG = -k*t, where t is the transcode number and k>0. If that's the case I'd like to order the graphs by k, where a smaller k means better quality. Of course it's not that simple. And even if it were, it's still a hint, not a hard fact. 

Interesting... this method will probably give more consistent results than trying to compare different switches, since I found that EAQUAL would do counterintuitive things like decrease the ODG by a few hundredths when I increased minSMR (I'm sure you already read my pathetic attempts to come to a conclusion about MPC switches here ). Of course, small changes like that are not statistically significant, but perhaps your tests will show that including the minSMR switch really does increase the quality of multiple re-encodes.
Quote
I did some listening on my  speakers with my $.5 ears, and --xtreme (mostly plain switches) sounded awful after 5 transcodes, underwater and distorted in ways I don't even dare to describe, but a heavily tweaked --xtreme sounded just like the original after 20 transcodes.

I'm curious to see if the tweak simply requires a very high nmt or if those other switches actually affect re-encoding quality significantly... but as long as the tweaked files still have bitrates well under typical lossless filesizes, I would be happy to use them for archival purposes, since currently I need to re-rip and re-encode my CD's whenever I want a different quality MPC.

(MPC) best quality for target bitrate

Reply #11
Quote
Originally posted by mithrandir

--xtreme --ltq_gain 28 --bw 17000

ltq_gain 28!?


More like ummm... ltq_gain 28!?!?!?!?!?!?! :jawdrop:

I'm using --ltq_gain -12 for some stuff... :cool2:

(MPC) best quality for target bitrate

Reply #12
Quote
Originally posted by CiTay


More like ummm... ltq_gain 28!?!?!?!?!?!?! :jawdrop: 

I'm using --ltq_gain -12 for some stuff... :cool2:


SV8 will write the profile "tWeAkEd (may be low quality)" in
the header if someone modifies parameters into the "wrong"
direction.
--  Frank Klemm

(MPC) best quality for target bitrate

Reply #13
Hm, nice feature. Maybe someday we'll have something like the LAME tag with information about all settings that were used for encoding.

BTW, Frank, you are in the new issue of the c't magazine, under "letters from our readers"! At first i had to rub my eyes, hehe...!

(MPC) best quality for target bitrate

Reply #14
Quote
Originally posted by CiTay


More like ummm... ltq_gain 28!?!?!?!?!?!?! :jawdrop: 

I'm using --ltq_gain -12 for some stuff... :cool2:

What matters is the ABX tests and if I can't tell the two apart except in uncommon cases, that's all that matters. You'd be amazed by how the noise from your computer masks what you hear. I wouldn't use ltq_gain 28 for "general purpose" encoding, but the differences this setting produces against the original WAV (occasional as they are) seem to be subtractive rather than additive.

But think about it. ltq fil has a threshold of -107.3dB at 3500Hz. I'm basically raising that to -79.3dB. It's not really that destructive given that I don't play the music very loud on headphones.

(MPC) best quality for target bitrate

Reply #15
Finally got the EAQUAL results (Celeron/500 and Celeron/700 running for 4 days)

The parameters tested are slightly different than the ones declared in the previous message (NMT isn't 8,10,13,16, it's 8,10,12,14,16), resulting in 1080 combinations (not 864).

The raw output (text file) is around 4 megs, 1 meg when zipped.  If anyone wants it leave me a mail.

There're a few conclusions below, but please take this into account:
- it's for a *single* clip, porcelain
- porcelain is 15 secs long, less than optimum for EAQUAL
- EAQUAL is no substitute for listening tests, it does not "hear" many common artifacts
- the transcodes are, in fact, re-encodes with exactly the same command-line parameters.  Even if EAQUAL were accurate (it is not), it may not reflect the actual transcoding performance
- the analysis I did is way limited -- the intent is to attract someone who wants to redo it with more clips and has the software and math background to do a proper analysis

Each line should be read as if it was preceded by "everything else being equal, ..."

* higher NMT -> higher quality
* higher TMN -> higher quality
* lower ANS -> higher quality
* usually (but not always) gain -12 is better than -6 is better than 0
* insane is almost always marginally better than xtreme and gives bitrates <<1% higher.  The cases where X beats I seem to be in the top 5-10% of the scores, where the accuracy is pretty low, so they can be safely ignored
* minSMR3 usually gives better quality than minSMR0, with a huge bitrate increase.  In some cases -mostly in the top_score_low_accuracy group- minSMR0 gives better results
* tmpMask affects quality very little in either direction

Now, above are the obvious conclusions; to get more useful ones (like best switches for target quality/bitrate) the test should be run on many more clips.  Any takers?

(MPC) best quality for target bitrate

Reply #16
mithrandir:

Quote
--xtreme --ltq_gain 28 --bw 17000


You should definitely switch back to mp3 with this command line...

I mean... why even bother using mpc if you won't hear the artifacts in mp3? (computer noise and so on - did you summon a tornado to cool your cpu???).

Does it hurt so much to use plain --xtreme? Guess so, after ages of LAME switch tweaking is painful to encode something using only one switch.

Oh, btw: turn the headphone volume a bit up: surprise! no more PC noise! (but I guess you don't like high volumes)...

As for the other posts, I must state that I always use a batch file to transcode the mpcs back and forth for 10 times THEN I'll give them a good listen... mpc is no good

Sorry for getting so carried away

Anyone... ABX - remember?

(MPC) best quality for target bitrate

Reply #17
Quote
Originally posted by lucpes
mithrandir:

You should definitely switch back to mp3 with this command line...

I mean... why even bother using mpc if you won't hear the artifacts in mp3? (computer noise and so on - did you summon a tornado to cool your cpu???).

I CAN hear the artifacts in MP3 which is why I don't use that format...the issue is more complex that it may seem. After spending a ton of time experimenting, I have found that subband encoders sound much better than transform encoders to my ears and in the case of MPC, I like to have high nmt/tmn values. However, the ath curve need not be set high at all. Remember, these are settings for my personal use...I am not saying they should be used by others. I suggest that you invest time in finding the "proper" command line for your needs in order to strike that delicious balance between quality and filesize.

Is anybody up to ABX'ing --xtreme --ltq_gain 28 --bw 17000? Certainly musical samples exist that will identify an MPC created with these switches from the WAV, but I'd like see how quickly or easily the task really is. I haven't tested these settings on dynamic classical music, but it seems entirely fine for pop music, which is typically compressed.

No, my computer isn't quiet: 1 5500rpm CPU fan, 2 80mm case fans, 1 video card fan and 2 7200rpm hard drives create a goodly amount of background noise. It's not that my PC is annoyingly loud, but the sonic signature of the noise is such that it masks low level information "wonderfully."
Quote
Does it hurt so much to use plain --xtreme? Guess so, after ages of LAME switch tweaking is painful to encode something using only one switch.

The extra switches are there and if you know what they do, you might as well experiment. I'm not encoding to share with other people. If that were the case, I'd probably stick with the presets. But I'm encoding for myself, so I have the liberty to play around and stick my nose under the hood.
Quote
Oh, btw: turn the headphone volume a bit up: surprise! no more PC noise! (but I guess you don't like high volumes)...

High volumes aren't good for your ears. I already experience a decent amount of HF rolloff and continued high volume listening would probably make that worse.

(MPC) best quality for target bitrate

Reply #18
Quote
Originally posted by mithrandir

Is anybody up to ABX'ing --xtreme --ltq_gain 28 --bw 17000? Certainly musical samples exist that will identify an MPC created with these switches from the WAV, but I'd like see how quickly or easily the task really is.

Edit: Sorry, Winamp decoded MPC was some decibels quieter. I'll have to retest.

Edit 2: That commandline seems quite good. It gave 1kbps smaller bitrate than standard profile, and I couldn't tell the difference on the clip I tried.

(MPC) best quality for target bitrate

Reply #19
bah!

Quote
5500rpm CPU fan, 2 80mm case fans, 1 video card fan and 2 7200rpm hard drives


Try to get a cooler like Titan D5TB (80mm fan, 3000 RPM, very quiet.) I have one, it's very nice, also cheap.

http://www.ocshoot.com/titan%20ttc_d5tb.htm (I payed 10 bucks for it)

Switch the case fans to 5V instead of 12V, close the case back & voila! no more thunderstorm-like computer.