HydrogenAudio

Lossy Audio Compression => Other Lossy Codecs => Topic started by: Kalenkoss on 2002-04-08 17:43:27

Title: Best settings for mp2 encoding
Post by: Kalenkoss on 2002-04-08 17:43:27
Hi everyone,
I'm not an expert, so be gentle...
Title: Best settings for mp2 encoding
Post by: Jan S. on 2002-04-08 17:59:46
Hi,

Are you sure you mean mp2 and not mp3?

just asking.....
I have no clue about what would be a good mp2 setting and why anyone whould want to use that.
Title: Best settings for mp2 encoding
Post by: Kalenkoss on 2002-04-08 18:00:35
I'm trying to convert AC3 to mp2 (svcd), but i can't find the settings that will stop the sound from hissing in the background (mostly heard in silent scenes). I've search other forums but i can't get answers. Even if i can get pretty good results at 384 kbps, i want to encode at 224 to be able to get higher video bitrate.
I'm using BeSweet (azid--»ssrc--»toolame) and my usual settings are: azid: STEREO ;  2 lame (-e -b 224 -m s) ;
ssrc: 48khz---»44.1khz
Just for testing purpose, i've convert the AC3 to MP3(192kbps) and i was getting excellent results (no hissing at all when listening with WinAmp)...that was not the case with MP2!!!

Thanks for your help
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-04-08 20:45:35
Use tooLame with Psychoacoustic Model #2 (-p 2). It's much better than #1 (default)

Regards;

Roberto.
Title: Best settings for mp2 encoding
Post by: kritip on 2002-04-08 22:40:13
If it's an actuall hiss. ie high frequency psst rather than artifactingy of the codec which is what i presume you are reffering to, you could try sound kind of sound processing in soundforge et cetera to reduce the hiss.
If it is artifactingy for certain, go with Roberto's suggestion, i've never done any mp2 encoding before.

Kristian Tippins


Ps.

Sorry Roberto, i called you Robertoe earlier in another post, no offence intended, just a poor typist 
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-04-08 23:00:24
Quote
Originally posted by kritip
Ps.

Sorry Roberto, i called you Robertoe earlier in another post, no offence intended, just a poor typist  


Hehe. I didn't even notice that.
That's OK.
Title: Best settings for mp2 encoding
Post by: gft on 2002-04-09 03:30:00
It sounds like your DVD hardware or software is increasing the volume during quiet scenes. You should turn this feature off. I'm don't remember what it is called usually, but it might be dialogue normalization or auto volume or something like that. Check your player's audio setup.

If you are resampling the audio from 48 kHz, the other thing you should do is use ssrc for resampling. Using toolame for resampling (48 kHz to 44.1 kHz) is a bad idea.

You can get ssrc here:
http://www.doom9.org/software2.htm (http://www.doom9.org/software2.htm)

-gft
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-04-09 03:58:31
Humm... It seems he's already using SSRC:

Quote
Originally posted by Kalenkoss
I'm using BeSweet (azid--»ssrc--»toolame) and my usual settings are: azid: STEREO ;  2 lame (-e -b 224 -m s) ; 
ssrc: 48khz---»44.1khz


BTW: You can get an ICL (faster)compile of SSRC at my page. (Bottom of message)

Regards;

Roberto.
Title: Best settings for mp2 encoding
Post by: Kalenkoss on 2002-04-09 15:37:39
Hi everyone,
Yes, in fact it seems that the "hiss" is sort of artifact because it's not present all the way through the file, only when there's a high-pitch sound (mostly voices singing) with not much music or sound effects. It's the same problem with low bitrate(< or =128)  mp3 files(soundtracks).
By the way, i've try downsampling (48--»44.1khz) with ssrc and also kept the original 48kbps (my DVD player accept that). Now, as for the PSY model #2, i've test that but my pc hang during the conversion process.
I will try the find if it's the playback settings of my DVD hardware and software, but WinAmp gave me the same problem...
By the way, i achieved very good result with the "experiemental" VBR setting with TooLame, but unfortunately, SVCD can't play VBR audio   

Thanks everyone for your suggestions,
I appreciate.
Kalenkoss
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-04-09 16:11:21
Quote
Originally posted by Kalenkoss
Now, as for the PSY model #2, i've test that but my pc hang during the conversion process.


Here's a stable compile:
http://www.macdvd.org/trnsz/Compiles/TooLAME-0.2i-Win32.zip (http://www.macdvd.org/trnsz/Compiles/TooLAME-0.2i-Win32.zip)

It's the only one I found that worked well with PSY 2.

Regards;

Roberto.
Title: Best settings for mp2 encoding
Post by: RD on 2002-04-09 19:55:25
Dear  Kalenkoss,

I'm sorry but I am going to have to disagree with  rjamorim (Roberto) about psymodel 2.

Maybe its better in the iso specs or in theory, but in toolame I recommend using psymodel 1 for SVCD movies.

First of all there is a reason that psymodel 1 and not 2 is the default in toolame. 

The reason is that Mike Cheng and friends decided to work on fine tuning psymodel 1 rather than model 2.  Perhaps they should not have done so, but they did, and as a result psymodel 1 is better because it has been tweaked more. 

For example, psymodel 1 will go above 16Khz for the breaking of glass, etc. but psymodel 2 never goes above 16Khz (obviously a bummer...)

Recently I spoke to Hans Heijden and he said he did tests comparing qdesign mp2 acm encoder vs. toolame and toolame was slightly better.  I asked him what psymodel he used and he said the default: psymodel 1.

So if you are going to encode movies (.ac3 to .mp2), which is much easier than encoding fatboy.wav and spham.wav, etc. use this commandline:

Commandline for CBR 224 stereo mp2 file:
-----------------------------------------------------
Toolame -b224 -ms 1.wav 1.mp2
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-04-09 20:42:22
Quote
Originally posted by RD
The reason is that Mike Cheng and friends decided to work on fine tuning psymodel 1 rather than model 2.  Perhaps they should not have done so, but they did, and as a result psymodel 1 is better because it has been tweaked more.   

For example, psymodel 1 will go above 16Khz for the breaking of glass, etc. but psymodel 2 never goes above 16Khz (obviously a bummer...)


Well, even if PSY2 isn't tuned, I still find it better than PSY1 in my encodings. I didn't encode breaking glass or the infamous test samples (Spahm, fatboy...), but my test samples (normal music with lots of details) sounded better with PSY2.

BTW, does anybody know the lowpass used by AC3 with typical DVD bitrates?

Quote
Recently I spoke to Hans Heijden and he said he did tests comparing qdesign mp2 acm encoder vs. toolame and toolame was slightly better.  I asked him what psymodel he used and he said the default: psymodel 1.


Well, we should ask him to test PSY1 vs PSY2, then. IMO, even SCMPX and maenc sound better than Qdesign. We must remember that Qdesign was made to be FAST - it's supposed to encode realtime with a P166. So, I regard it somewhat as a Xing encoder for MP2.

I still would go for:
toolame -p 2 -b 224 -m s input.wav output.mp2

Regards;

Roberto.

@RD: Your commandline won't work the way it's written at your post.

Edit: Found some lowpasses on Sonic Foundry Soft Encode:
(5.1 channel configuration)
@320kbps - 15.55kHz
@384kbps - 17.61kHz
@448kbps - 20.71kHz
Title: Best settings for mp2 encoding
Post by: RD on 2002-04-10 04:54:03
Quote
Originally posted by rjamorim


Well, even if PSY2 isn't tuned, I still find it better than PSY1 in my encodings. I didn't encode breaking glass or the infamous test samples (Spahm, fatboy...), but my test samples (normal music with lots of details) sounded better with PSY2.


Maybe, but Kalenkoss is encoding DVD movies, where dialogue (speaking) and explosions are the norm--not transient filled music, etc... so again, I disagree...

Quote
BTW, does anybody know the lowpass used by AC3 with typical DVD bitrates?


Often a 20 Khz lowpass, sometimes 18Khz....

Quote
Well, we should ask him to test PSY1 vs PSY2, then. IMO, even SCMPX and maenc sound better than Qdesign. We must remember that Qdesign was made to be FAST - it's supposed to encode realtime with a P166. So, I regard it somewhat as a Xing encoder for MP2.


Here is what Hans said about psymodel 2 (taken from email):

RD: You say the clear winner was toolame [over qdesign], and I suppose you used psymodel 1?

HANS: Yes, if that is the default psymodel of toolame. The other psymodel [psymodel 2] sounded considerably worse to me.

Quote
@RD: Your commandline won't work the way it's written at your post.


You are wrong.  There are no problems with my commandline.
I tested it EXACTLY as I have typed it and it works.  Try it out for yourself.  I made a little encode.bat file with the above commandline....
Title: Best settings for mp2 encoding
Post by: user on 2002-08-05 21:48:17
Hi all,

I did some testing on mp2, toolame regarding psy models 1 and 2.

Test equipment:
BlindAudio020
samples: hihat.wav, blackbird.wav, castanets.wav
each sample encoded via BeSweetGui, toolame.
Following parameters:
each sample in pure stereo (not joint stereo, as the goal is SVCD movies/concerts with keeping surround information).
each sample in 128, 160 and 224 kbit/s
each sample in psy model 1 and 2, each combination, each bitrate.
Via Terratec EWX 2496 wave spdif out , 5 m optical cable to Harman Kardon HK AVR 5000, which converted from D to A. Then headphones AKG 500.




Results:

From 128, to 160 to 224 it was more and more difficult to detect differences between psy 1 and 2.

hihat.wav:
this one was the sample which I could detect most easily between 1 and 2.

model 2 sounded much better than 1, much closer to original
2 contained more highs.
With 128 it was very obvious.
At 160 it was still possible to detect between 1 and 2. 2 was very close to original.
At 224 I have not been able to reach evident ABXing bewteen 1 and 2 with safety of 95%, probably due to tireness.

blackbird.wav:
128 : 2 was very close to original. 1 could be detected from 2.

castanets:
128: 2 was closer to original than 1.


So psy model 1 has lost against psy 2 at all tested samples.
Especially highs are cutted by psy 1.
At 128 psy 1 is really crap, if you like highs. Psy 2 is the winner.
At 160 psy 1 is still a little more worse than psy 2, but the difference is not so big. Psy 2 wins still.
At 224 I have not been able to give very clear results, both psy models sounded very close to original.

I should tell, that I started from 128 and went up to 160, then 224. So my ears got more and more tired.
At 128 I listened 1.: hihat, 2. blackbird, 3. castanets, so there could be the possibility of getting tired, too.
As hihat was the most evident sample, i deceided to listen at higher bitrates only to hihat.
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-08-05 22:19:02
I stand correct!!!!!
Title: Best settings for mp2 encoding
Post by: user on 2002-08-13 10:06:43
Hi all,

I found in the great program HeadAC3he 0.23a the possibility to select different psy models for the mp2enc. There are psy models 0, 1, 2.

In toolame (with BeSweet-GUI's batch mode) you can select psy models 1 and 2.

As ABX'ed previously, I prefer toolame's 2 over 1, very clearly.


As HeadAC3he is the very fastest program for converting ac3 (eg. 5.1) -> wav (eg. DS2) -> mp2 (unfortunately not via toolame.exe, but mp2enc.dll), I am interested in the quality of mp2enc.


I created following testfiles:

hihat.wav as original sample.
each mp2 in 128 kbit in pure stereo (pure stereo is important for mp2 and keeping surround informations):
1. psy 2 of toolame
2. psy 2 of headAC3he's mp2enc
3. psy1 mp2enc
4. psy 0 mp2enc

ABXing results:

psy1 and psy 0 sounded dull, no ABXing would be required to select them from psy2 or the original.

psy 0 sounded even slightly worse than psy 1.

psy 0 and psy 1 had a great loss of the highs.

psy 2 of toolame and mp2enc sounded both close to the original.

With mp2 I can really recommend to use psy model 2. Even at 128 kbit/s stereo you have a sound quality, that is well.

I have not been able to ABX psy 2 between  toolame and mp2enc.
Perhaps because this was my last task and I was tired.

What are your opinions about the quality compared between psy 2 of HeadAC3he's mp2enc and toolame ?
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-08-13 16:25:07
Quote
Originally posted by user
I found in the great program HeadAC3he 0.23a the possibility to select different psy models for the mp2enc. There are psy models 0, 1, 2.


That makes no sense!

There are only two psymodels in MPEG Audio Layer 2 specification: Musicam and Aspec.

That's probably the reason psymodel 0 sounds so bad. It's probably linking to other psymodel with some modifications to sacrifice speed from quality. (That's the only explanation I can imagine)

Quote
What are your opinions about the quality compared between psy 2 of HeadAC3he's mp2enc and toolame ?


Heh. IIRC, mp2enc is an outdated version of toolame created by Albert Faber to be used with CDex.

That, or Dist10 wrapped inside a DLL. I really don't remember now.

My suggestion is go with tooLame - always!

Regards;

Roberto.
Title: Best settings for mp2 encoding
Post by: JohnV on 2002-08-13 17:19:30
Quote
Originally posted by rjamorim
There are only two psymodels in MPEG Audio Layer 2 specification: Musicam and Aspec.
Hmm, I don't think Musicam and Aspec can be said to be MPEG1 audio layer psymodels.
The psy-models are model 1 and model 2. Both model 1 and model 2 work with all mpeg1 layers, but only model 2 includes special modifications for Layer 3.

It can be said that features were derived from Musicam and Aspec, but if I'm not totally mistaken, it's incorrect to say Musicam and Aspec are Mpeg1 audio psymodels...
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-08-13 18:23:05
My whole point there is that there is no 3rd psymodel (psymodel 0)

So, something must be wrong.

Quote
Originally posted by JohnV
The psy-models are model 1 and model 2. Both model 1 and model 2 work with all mpeg1 layers, but only model 2 includes special modifications for Layer 3.


Yes, but they are called Musicam and Aspec, for these were the groups that created them.

Quoting Mr. Ivan Dimkovic:

Quote
Psymodel 1 was developed by MUSICAM group, for Layers 1 and 2 (MUSICAM - Philips & Co)
Psymodel 2 was developed by ASPEC group, for Layer 3 (MP3) (ASPEC - AT&T, FhG & Co)
Psymodel 2 is >better< than Psymodel 1


Regards;

Roberto.
Title: Best settings for mp2 encoding
Post by: HansHeijden on 2002-08-13 19:29:43
There's a lot of confusion in this thread. Will this post make it worse?

First to Roberto, indeed the toolame compile you linked to solved the 1/3 of crashes I had with -p2 on Dmitry's compile.

Then let me add another quote of my reply to RD a few months ago:
> "I had to do some comparative listening at 224 k stereo with toolame and
> QD's ACM, because I never used mp2 below 256 k. The clear winner was
> toolame. At times toolame's artifacts sound quite similar to QD's
> (quality setting), and also the rather audible lowpassing is similar.
> But usually toolame was better. QD (speed setting), though it has no
> audible lowpass, just messes up too often here. Like I said before, the
> speed setting needs high bitrate and is at its best at 320 k.
> BTW, toolame setting was simply -b224 -ms."

and I said about the QD ACM:
Well, the step from 224 to 256 is more of an improvement with mp2 than with mp3.
The thing I had with 'quality' vs. 'speed' at 256 or 320 k was, that 'speed'
messed up more (though differently) with hard samples like 'spahm', but I
liked its sound more with 'normal' music. It had a more 'open feel'.
Probably I (also) noted the lowpassing of 'quality'. Since you want to use
mp2 with movie soundtracks, mainly consisting of speech, probably just
settle with 'quality' at 224 k.

I listened again at some toolame -p1 vs. -p2 encodings at 192 k and still for this bitrate, the heavy -p2 lowpassing sounds unacceptable for my hearing, at least with most music (not speech). Strange that User reports highs are cutted more by -p1, I'd think something is mixed up here.

Hans
Title: Best settings for mp2 encoding
Post by: user on 2002-08-13 23:20:14
I checked it. I used and preferred psy 2 in settings of both programs/GUIs, HeadAC3he 0.23a (mp2enc) and BeSweetGUI, batch mode, toolame.exe (the one, which crashes not so often).

Yes, the differences regarding highs between psy 1 and 2 in both encoders, mp2enc and toolame, are very easy to listen.

Should the naming of psy 1 and 2 be mixed up in both programs ?

Perhaps somebody else performs the test, a short sample, like hihat.wav, encoding at low/medium bitrate (so the difference is clearer) with psy 1 and psy 2.
These 2 mp2 files can be tested against original wave. (and against each other, but it will be very obvious).
Title: Best settings for mp2 encoding
Post by: JohnV on 2002-08-14 08:54:58
Quote
Originally posted by rjamorim
Yes, but they are called Musicam and Aspec, for these were the groups that created them.
No, psymodel 1 and 2 are not called Musicam and Aspec. Or if they are called that, it's wrong. The models are derivatives from those.
Ivan doesn't call it that at least in that quote, he says there that models are developed by Musicam/Aspec groups. He didn't say that model 1 is called Musicam and model 2 is called Aspec...

[Edit]. Just asked this from Ivan:
Quote
PsyQ wrote: 
well - there is no name for psymodels, except model 1 and model 2...
you are right - you can put them in any codec
...

both [Musicam and Aspec] were submitted in 1989 to MPEG for "competition" phase.. and then combined (as these two were the best) in "collaboration" phase


[Edit2]Also this page (http://www.public.asu.edu/~rampriya/audiocoding.htm (http://www.public.asu.edu/~rampriya/audiocoding.htm)) says:
Quote
As part of the Eureka 147, a project designed for digital audio broadcasting (DAB), a system known as MUSICAM (Masking pattern adapted Universal Sub-band Integrated Coding and Multiplexing) was developed jointly by CCETT in France, IRT in Germany and Philips in the Netherlands. In parallel, the ASPEC (Adaptive Spectral Perceptual Entropy Coding) system was developed as a joint proposal by AT & T Bell Labs, Thomson, Fraunhofer Society and CNET, aimed at audio transmission over the Internet. Both systems were subjected to comprehensive listening tests and the MPEG/Audio group combined the attributes of both into a draft standard[10] having three levels of complexity and performance.

The three different levels offer increasing levels of compression at the cost of higher computational requirements. The standard supports three sampling rates of 32, 44.1 and 48 kHz and output bitrates between 32 and 384 kbits/sec. The transmission can be mono, dual channel (e.g. bilingual), stereo or joint stereo (where the redundancy between left and right channels can be exploited).

MPEG Layer I is a simplified version of the MUSICAM algorithm, tailored for mild compression and low cost applications. The Philips Digital Compact Casette (DCC) uses this scheme at rate of 192 kbps per channel.

Layer II is identical to MUSICAM and has been engineered for target bitrates around 218 kbps per channel. Applications include DAB, storage of synchronized video-and-audio sequences on CD-ROM and Video-CD.

Layer III combines the best attributes of both the MUSICAM and ASPEC coders and hence the most complex of the three. It provides high compression factors, with target bitrates as low as 64 kbps per channel, required for low bandwidth applications like audio transmission over ISDN channels."

Whether or not it's completely accurate that Mpeg1 layer2 is indentical to Musicam codec, it certainly is not correct to call MPEG Psy-models Musicam or Aspec. MPEG psymodels are called model 1 or model 2.
Title: Best settings for mp2 encoding
Post by: user on 2002-08-14 09:36:04
He tells:

psy 0 in his headAC3he means: no psy model


If psy models 1 and 2 are able to be implemented into different Codecs, programs, then we could assume, that psy 2/1 are the same in toolame and mp2enc.

So the output of mp2enc and toolame will sound the same with same bitrate, psy model and other settings.

This would mean that you could use the fast HeadAC3he with mp2enc.
There is even the VBR mode with different q settings.
Title: Best settings for mp2 encoding
Post by: JohnV on 2002-08-14 11:09:35
Quote
Originally posted by user
He tells:

psy 0 in his headAC3he means: no psy model


If psy models 1 and 2 are able to be implemented into different Codecs, programs, then we could assume, that psy 2/1 are the same in toolame and mp2enc.

So the output of mp2enc and toolame will sound the same with same bitrate, psy model and other settings.

This would mean that you could use the fast HeadAC3he with mp2enc.
There is even the VBR mode with different q settings.
Of course these models only define some of the basic structures of the psymodel. So it in no way means that the model 1/2 is identical or sound the same in every encoder...far from it.
Title: Best settings for mp2 encoding
Post by: user on 2002-08-14 11:18:01
Has somebody been able to ABX mp2enc vs. toolame both at psy 2 (hmm, the preferred model) ?

And why seems psy 2 vs. psy 1 mixed up ?
Title: Best settings for mp2 encoding
Post by: JohnV on 2002-08-14 11:27:41
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..
Title: Best settings for mp2 encoding
Post by: HansHeijden on 2002-08-14 22:15:36
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.
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-08-14 23:01:43
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>
Title: Best settings for mp2 encoding
Post by: HansHeijden on 2002-08-14 23:34:41
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.
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-08-15 00:16:45
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.
Title: Best settings for mp2 encoding
Post by: DarkAvenger on 2002-08-15 01:13:10
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.
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-08-15 01:23:21
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.
Title: Best settings for mp2 encoding
Post by: DarkAvenger on 2002-08-15 10:38:55
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.
Title: Best settings for mp2 encoding
Post by: Ronny on 2002-08-16 17:58:07
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!
Title: Best settings for mp2 encoding
Post by: user on 2002-09-06 10:25:08
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.
Title: Best settings for mp2 encoding
Post by: HansHeijden on 2002-09-09 20:22:08
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
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-09-10 19:49:28
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 (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.
Title: Best settings for mp2 encoding
Post by: Frank Klemm on 2002-09-10 20:58:06
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.
Title: Best settings for mp2 encoding
Post by: HansHeijden on 2002-09-10 20:58:21
...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 (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/ (http://guiguy.wminds.com/downloads/toolamegui/)
but I can't get it to batch encode and it gives some error messages as well.

Hans
Title: Best settings for mp2 encoding
Post by: rjamorim on 2002-09-10 21:08:48
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)
Title: Best settings for mp2 encoding
Post by: HansHeijden on 2002-09-10 21:16:11
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
Title: Best settings for mp2 encoding
Post by: _Shorty on 2004-02-29 03:52:29
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?
Title: Best settings for mp2 encoding
Post by: music_man_mpc on 2004-02-29 03:57:59
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?
Title: Best settings for mp2 encoding
Post by: Daijoubu on 2004-09-26 03:50:51
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