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: Best settings for mp2 encoding (Read 17261 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Best settings for mp2 encoding

Reply #25
Quote
Originally posted by user
Has somebody been able to ABX mp2enc vs. toolame both at psy 2 (hmm, the preferred model) ?
I think better question would be has anybody ever tried to ABX those..
Juha Laaksonheimo

Best settings for mp2 encoding

Reply #26
To user,

Reading your posts again, now I realize you based most of your comments on bitrates of 128 or 160 k. Trying hihat at 128 k, I agree with you that -p2 is better than -p1, both for mp2enc (HeadAC3he) and toolame. -p2 sounds cleaner and has more highs.

But such low bitrates are too low for mp2 to handle. At the bitrates I had in mind, things are different. I encoded samples like fatboy and spahm at 224 k, plain stereo. The 'best' encoder here seems just a compromise you have to make yourself, between artifacts and lowpassing. With artifacts getting less, but also lowpass frequency going down, these are:

QDesign 'speed' (always encodes up to  20.6 kHz)
mp2enc -p1, Toolame -p1, better than QDesign 'quality'
mp2enc -p2, Toolame -p2, CDex
mp2enc -p0 (always sounds dull)

QDesign 'quality' was disappointing on these mp2 killers

So the bitrate makes a lot of difference. As said, at 320 k I prefer QDesign 'speed'.

Hans

Edit: Corrected wrong Toolame ranking.

Best settings for mp2 encoding

Reply #27
Quote
Originally posted by HansHeijden
mp2enc -p2 is almost equal to CDex, and better than Toolame -p2


???

mp2enc SHOULD be equal to CDex. Both use the same engine!

<CDex admin mode on>
(Which is crappy BTW)
</off>

Best settings for mp2 encoding

Reply #28
Yes but not bit-identical, that why I said 'almost'! Not audible anyway.

Is there a frontend for mp2enc.dll that allows batch encoding with -p1 ?

Hans

Edit: Corrected wrong toolame ranking.

Best settings for mp2 encoding

Reply #29
Quote
Originally posted by HansHeijden
Is there a frontend for mp2enc.dll that allows batch encoding with -p1 ?


Indeed, it exists.

I'll compile it soon and upload to RareWares.

Best settings for mp2 encoding

Reply #30
I wonder if you guys noticed a flaw with mp2enc, which I noticed. It seems mp2enc adds a *very* low volume "feeeep" tone into the encode, once one user reported he also got it from tooLame and I suspected that dist10 code had a bug. If you want to make that tone easily hearable: Make a 24bit wav, but only use the first 8bits of it for a signal. Feed it to HAC3 and encode to MP2. Then decode the MP2 to WAV (16bit, 2pass should work fine) again. Then you should clearly hear it. I can't remember whether it was actually below the 16bit level or close to the border. Of course it could be a bug of the decoder as well. I recall that day I used MAD for decoding, but I forgot. Well, maybe I should try to reproduce the flaw...

Another (maybe stupid) idea: Couldn't you encode an mp2 using compined psy models, ie. like VBR changes the bitrate for each frame, the encoder selects the optimal psy model for each frame. Of course this would mean double computation time, but maybe it would be worth it.

Best settings for mp2 encoding

Reply #31
Quote
Originally posted by DarkAvenger
Another (maybe stupid) idea: Couldn't you encode an mp2 using compined psy models, ie. like VBR changes the bitrate for each frame, the encoder selects the optimal psy model for each frame. Of course this would mean double computation time, but maybe it would be worth it.


It might be interesting (if possible), but I wonder if is there merit in trying this. Psy2 (almost?) always beats Psy1, quality wise - except for the lowpass, but that's a tooLame issue, not a fault of the Psymodel itself.

I think a better approach would be patching tooLame to disable the forced lowpass with Psy2. :-P

Regards;

Roberto.

Best settings for mp2 encoding

Reply #32
Ok, forget what I told you about that flaw. I tried following: Encoded a WAv (16bit) in 1pass with -96db gain to mp2 and decoded it back with 2pass and it sounded alright - and quite good, as well. Interesting to see that mp2enc encodes material below 16bit quite well. So it was a MAD decoding bug, I guess.

@roberto

Hmm, let's see it shouldn't bee too hard to patch tooLame for that.

Best settings for mp2 encoding

Reply #33
Hi all!

This is my first post in this forum! I am very interested in DVD-Video and SVCD authoring and have a DVD-RW burner at home. I use toolame as external encoder in TMPGEncPLUS. I prefer a low bitrate but still reasonable high quality on the audio to give more space for a higher video bitrate. But bad audio can destroy a video...

OK, here's my question.
Can I get better quality by using joint stereo at lower bitrates in a similar way as when encoding mp3? Most people say that I should use stereo instead of joint stereo to get best quality and not destroy dolby sourround information. Will joint stereo really destroy the sourround at a bitrate of 192 kbit/s? If there is no dolby sourround, just normal stereo, at which bitrates is the quality better without joint stereo?

Anyway when I encode my home videos from my DV-camera I think 192 kbit/s 48 kHz sampling rate (DVD-standard) and joint stereo seems to be a good choice. There is no dolby sourround on my handicam, it only has 2 microphones...

It also seems that using psy2 should be a good choise, I did not know this earlier. Thanks for the good info!
Ronny

Best settings for mp2 encoding

Reply #34
spectral analysis of psy1 and psy 2 at different bitrates, by WinAmp DSP spectrum tool

Due to the different opinions to psy1 and psy2, I checked sample hihat.wav, encoded to by toolame, psy1 and psy2, each in 128, 160 and 224 kbit/s stereo only.

My listening is confirmed, probably HansHeydens, too !

I preferred very clearly at bitrates of 128 and 160 kbiT/s psy2.

This is confirmed by spectrum, too.

128: psy2 encodes up to 15,3 kHz;
psy1 up to 14,5, but with  missing frequencies between 13,1 and 13,6 kHz !!!

160: psy2 encodes up to 15,3 kHz;
psy1 up to 14,6, but with  missing frequencies between 13,2 and 13,6 kHz !!!

224: psy2 encodes up to  16,0 kHz;
psy1 up to sometimes even 17,1, no missing frequencies anymore !



RESULT

I think, we can conclude, that

for low bitrates up to 160 kbit/s including, psy model 2 is recommended;

for high bitrates from 224 kbit/s including, psy model 1 is recommended.




This would confirm all observations, from rmajorim, HansHeijden and me.

Best settings for mp2 encoding

Reply #35
Agreed user!

To Roberto,
Any news on the batch encoding frontend you mentioned for mp2enc.dll ?
And on the Psy2 "forced lowpass" you thought could be removed?

Hans

Best settings for mp2 encoding

Reply #36
Quote
Any news on the batch encoding frontend you mentioned for mp2enc.dll ?


Eh. Sorry for the delay.
Here:
http://www.inf.ufpr.br/~rja00/files/mp2enc.zip

Quote
And on the Psy2 "forced lowpass" you thought could be removed?


Yes, I think it can be removed, but I don't know enough about tooLame's sources to try to fix that.

Someone with better knowledge should try it.

Regards;

Roberto.

Best settings for mp2 encoding

Reply #37
Quote
spectral analysis of psy1 and psy 2 at different bitrates, by WinAmp DSP spectrum tool

Due to the different opinions to psy1 and psy2, I checked sample hihat.wav, encoded to by toolame, psy1 and psy2, each in 128, 160 and 224 kbit/s stereo only.

My listening is confirmed, probably HansHeydens, too !

I preferred very clearly at bitrates of 128 and 160 kbiT/s psy2.

This is confirmed by spectrum, too.

128: psy2 encodes up to 15,3 kHz;
psy1 up to 14,5, but with  missing frequencies between 13,1 and 13,6 kHz !!!

160: psy2 encodes up to 15,3 kHz;
psy1 up to 14,6, but with  missing frequencies between 13,2 and 13,6 kHz !!!

224: psy2 encodes up to  16,0 kHz;
psy1 up to sometimes even 17,1, no missing frequencies anymore !



RESULT

I think, we can conclude, that

for low bitrates up to 160 kbit/s including, psy model 2 is recommended;

for high bitrates from 224 kbit/s including, psy model 1 is recommended.




This would confirm all observations, from rmajorim, HansHeijden and me.

I would use MP2 only for bitrates between 192 and 256 kbps and I would always use
Psy-Model 2. Psy-Model 1 has more problems than Psy-Model 2.

Especially at 192 kbps Psy-Model 1 has a lot of problems with speech.
And forget you quality estimation via measuring the frequency reponse.

Only fools and illiterate do that.
What help a frequency repsonse up to 18 kHz (which you can only
distinguish if you can compare with the original sample) when the
important range from 2...5 kHz has audible defects which you can
easily detect even when you never heart the original clip???

Comparing frequency responses is typical for all people not able to hear
any difference, so they try to compendate this lack by measuring technical
properties.
--  Frank Klemm

Best settings for mp2 encoding

Reply #38
...Ahem, I have to correct myself...
After making some new test encodings (-b224 -p1 -ms) with mp2enc.exe (thanks Roberto!) and toolame.exe, I didn't hear the bad artifacts on toolame any more. But they were there on the encodings I made a month ago.
Now it seems I accidentaly encoded in joint stereo (toolame's default) back then. And unlike lame, toolame's joint stereo actually sucks!
BTW, Winamp's file info box does not mention 'joint stereo' for mp2 when it should.
So toolame is not worse than mp2enc, but very similar indeed!

As a batch encoding frontend for mp2, an old vbLamer version with toolame presets can be (ab)used. Since this one can't be found anymore I've put it here:
http://web.inter.nl.net/users/hvdh/vbLamer...for_toolame.zip
The 'output path' box must be empty, then the mp2 will be placed in the wav's directory.

There's also another frontend here:
http://guiguy.wminds.com/downloads/toolamegui/
but I can't get it to batch encode and it gives some error messages as well.

Hans

Best settings for mp2 encoding

Reply #39
Quote
Now it seems I accidentaly encoded in joint stereo (toolame's default) back then. And unlike lame, toolame's joint stereo actually sucks!

MP2 Joint Stereo suckes because it's IS. There's no M/S stereo in MP2 specification.

Blame Philips for that. They invented IS, and now they believe it's the best thing ever. (That's actually the reason Philips AAC sounds so bad)

Best settings for mp2 encoding

Reply #40
Frank,

With music, a 224 k -p2 mp2 sounds dull to me, constantly. As if lowpassed at 15-16 kHz. I take the occasional artifact, that will be slightly stronger with -p1, for granted. As I said a few posts above, a compromise between an acceptable lowpass (yes that can be measured!) and artifacts.
Please don't whine about frequency responses being mentioned, it just illustrates what is obviously audible. Relax.

Hans

Best settings for mp2 encoding

Reply #41
somewhat related: anything bad come of encoding a "stereo" source that actually contains mono info in mp2 joint stereo? In other words, any ill effects from an intensity stereo encoding when there isn't actually any stereo information anyways?

Best settings for mp2 encoding

Reply #42
Quote
somewhat related: anything bad come of encoding a "stereo" source that actually contains mono info in mp2 joint stereo? In other words, any ill effects from an intensity stereo encoding when there isn't actually any stereo information anyways?

Why wouldn't you just encode in Mono?
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

 

Best settings for mp2 encoding

Reply #43
What's the consensus now?

Psycoacoustic model 2...ok
How about mp2enc VS toolame?

Edit: uh, seems like both produced bit-wise identical files unless I did something wrong in BeSweet