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: more layer II (.mp2) questions (Read 11144 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

more layer II (.mp2) questions

Hey everybody,

I know we have some mpeg audio experts out there so I am curious to see if my answers to these questions are correct.

Please tell me if my guesses are wrong...

1. Because .mp2 is a subband encoder (and not a transformation encoder) encoding higher frequency content puts more strain on cbr encoding (e.g., 224 kbps).  In fact, as you increase from 16 Khz to 17, 18, 19 and 20 Khz the strain increases exponentially.

So question 1:
I have a .wav file that goes up to 20 Khz, and have to encode it in mpeg 1 layer II (.mp2) at cbr 224 stereo.  CRC needs to be on for SVCD so the effective bitrate is 208 kbps...

WHAT lowpass value should I use to minimize strain on the encoder (Qdesign mpeg acm codec) and minimize artifacts?

Is 18Khz the best bang for the buck? 19Khz?
Its a movie soundtrack by the way, not music...

Question 2:
The .wav file I want to encode is already encoded in Dolby Surround sound, If I perform an 18 Khz lowass in Cool Edit 2000 will this destroy or damage the surround sound information?
My guess is that it will not destroy the surround sound info...

Question 3:
What type of lowpass should I use in Cool edit 2000?
Hanning window, Hamming? Blackman?
My guess is that Hanning is the best for my movie soundtrack...

Thanks

more layer II (.mp2) questions

Reply #1
I only know the answer to question 2:  Don't worry about Dolby Surround, it's based on signal phase, not frequency.

more layer II (.mp2) questions

Reply #2
1)

I would use 16-17 kHz without even hesitating. I don't think very high frequencies are meaningful in movies and the spectral band above 17 kHz might look rather empty anyway.

3)

Hanning, Hamming and Blackman functions are essential tools when designing FIR signal filters. These are just the window functions the sinc-function is multiplied with.

Filter kernels generated with these window functions have differences in efficiency and in filter kernel length. Whereas single Hamming offers roughly 54 dB attenuation (might vary depending on the implementation), Blackman gives about 74 dB (also might vary a bit). Hanning is the lightest of the bunch, offering only about 45 dB's. Transition band length (aka the steepness of the curve) also depends on the window function. Efficiency order is again from lowest to highest, Hanning-Hamming-Blackman.

However, increased efficiency means longer filter kernel which means more tedious calculations. Also these more effective lowpass filters tend to reduce accuracy in time-domain, meaning ringing and transient smearing. (Let's see how many audiophiles respond to these particular buzzwords by refusing to use lowpassing ever again :evilgrin: )

I would consider the Hanning window you mentioned a good compromise for movie soundtracks. Already very low-amplitude signals attenuated by yet 45 dB surely won't get encoded.

more layer II (.mp2) questions

Reply #3
Thanks guys...

So I take it that I am correct about this?:
"Because .mp2 is a subband encoder (and not a transformation encoder) encoding higher frequency content puts more strain on cbr encoding (e.g., 224 kbps). In fact, as you increase from 16 Khz to 17, 18, 19 and 20 Khz the strain increases exponentially. "

To Johnicon:

I understand your point, and I guess no windowing function has enough ripple and smearing and width problems to confuse a Dolby surround decoder about phase...

Nik: How noticable would the "ringing and transient smearing" be if I used blackman windowing?  Is it very subtle?

Thanks

more layer II (.mp2) questions

Reply #4
Quote
Originally posted by RD
Hey everybody,

I know we have some mpeg audio experts out there so I am curious to see if my answers to these questions are correct.

Please tell me if my guesses are wrong...

1. Because .mp2 is a subband encoder (and not a transformation encoder) encoding higher frequency content puts more strain on cbr encoding (e.g., 224 kbps).  In fact, as you increase from 16 Khz to 17, 18, 19 and 20 Khz the strain increases exponentially.

So question 1:

I have a .wav file that goes up to 20 Khz, and have to encode it in mpeg 1 layer II (.mp2) at cbr 224 stereo.  CRC needs to be on for SVCD so the effective bitrate is 208 kbps... 

WHAT lowpass value should I use to minimize strain on the encoder (Qdesign mpeg acm codec) and minimize artifacts?

Is 18Khz the best bang for the buck? 19Khz?
Its a movie soundtrack by the way, not music...

Question 2:
The .wav file I want to encode is already encoded in Dolby Surround sound, If I perform an 18 Khz lowass in Cool Edit 2000 will this destroy or damage the surround sound information?
My guess is that it will not destroy the surround sound info...

Question 3:
What type of lowpass should I use in Cool edit 2000?
Hanning window, Hamming? Blackman?
My guess is that Hanning is the best for my movie soundtrack...

Thanks


CRC eats 667 bps. So a 224 kbps MP2/CRC has effective
223.33 kbps.

For lowpass filtering polyphase filtering should be used.
22 or 23 subbands should be enough.
--  Frank Klemm

more layer II (.mp2) questions

Reply #5
What MP2 do you use? I use toolame for my MP2 encoding, and if there is better point me in the direction thanks

Cheers
AgentMil
-=MusePack... Living Audio Compression=-

Honda - The Power of Dreams

more layer II (.mp2) questions

Reply #6
Quote
Originally posted by RD
the encoder (Qdesign mpeg acm codec)


Do you like this encoder?

In some tests I made, it's quality was quite worse than toolame, among others.

Regards;

Roberto.

more layer II (.mp2) questions

Reply #7
Sorry!!! I didn't see that in the post silly me!

Hehe thanks for the encouraging comments rjamorim, it looks like I choose the right encoder for my VCDs encodes

Cheers
AgentMil
-=MusePack... Living Audio Compression=-

Honda - The Power of Dreams

more layer II (.mp2) questions

Reply #8
Quote
Originally posted by AgentMil
it looks like I choose the right encoder for my VCDs encodes


Which MPEG1 encoder do you use?

I personally prefer Panasonic (Slightly better than Tsunami, IMO)

Regards;

Roberto.

more layer II (.mp2) questions

Reply #9
Thanks again for the replies... I just want to make absolutely clear about some issues:

Frank:

"CRC eats 667 bps. So a 224 kbps MP2/CRC has effective
223.33 kbps.

For lowpass filtering polyphase filtering should be used.
22 or 23 subbands should be enough."

---So even though lame mp3 has 16 kbps for CRC layer II .mp2 only uses 667 bps...

---How do I do lowpass polyphase filtering in Cool Edit 2000?
    It just gives you these options: triangular, hanning, hamming,
    blackman, etc. IS there another program I should use?

rjamorim
Which .wav files should I test to see that toolame is superior to qdesign? 

In my limited tests qdesign sounds very good for movie soundtracks, and it encodes the WHOLE bandwith 20-20Khz.

Toolame with psymodel 2 never goes above 16Khz....
Toolame with psymodel 1, which Frank and Ivan say is not as good as psymodel 2, does occaisionally go above 16Khz.
Since exploding glass and other things sound nice above 16Khz,
qdesign seems very attractive.

The only thing I am afraid of is that 224 kbps in qdesign mp2 cannot handle full bandwith without some artifacts, henc I am trying to decide on when to lowpass it.... no one has told me if this point is correct yet  :

"Because .mp2 is a subband encoder (and not a transformation encoder) encoding higher frequency content puts more strain on cbr encoding (e.g., 224 kbps). In fact, as you increase from 16 Khz to 17, 18, 19 and 20 Khz the strain increases exponentially."

Frank Klemm did not refute the above, which leads me to believe its correct...

Btw, rjamorim, qdesign did get some praise:

QDesign's MPEG Layer 2 gets a critical assessment and is compared with other  codecs, in a two part series "Lossy Compression" in the May and June 2000 editions of the "Hi-Fi" Magazine.
"Codec B (MPEG Layer 2)...better on vocals and speech, providing more expressive vocals and more realistic ambience and reverb."
"Codec B (MPEG Layer 2)...among the best again, sounding more expressive musically.

I know this may not mean much, but...

more layer II (.mp2) questions

Reply #10
Quote
Originally posted by RD
rjamorim
Which .wav files should I test to see that toolame is superior to qdesign? 


I use to test codecs with my own sample, that has lots of details in the track, which makes easier to distinguish 'differences' from the original, although I couldn't point out if it's pre-echo, stereo problems...

"Chage & Aska - On Your Mark" (You probably won't find it on your favorite CD store)

I love this song, and listened to it many and many times, so it's easier to pick differences.

Quote
In my limited tests qdesign sounds very good for movie soundtracks, and it encodes the WHOLE bandwith 20-20Khz.

Toolame with psymodel 2 never goes above 16Khz....
Toolame with psymodel 1, which Frank and Ivan say is not as good as psymodel 2, does occaisionally go above 16Khz.
Since exploding glass and other things sound nice above 16Khz,
qdesign seems very attractive.

The only thing I am afraid of is that 224 kbps in qdesign mp2 cannot handle full bandwith without some artifacts, henc I am trying to decide on when to lowpass it.... no one has told me if this point is correct yet  :


Dunno... but I tend to look with high suspicion to encoders that claim 'full bandwidth encoding". WMA claims the same thing. Enough said.

Quote
Btw, rjamorim, qdesign did get some praise:

QDesign's MPEG Layer 2 gets a critical assessment and is compared with other  codecs, in a two part series "Lossy Compression" in the May and June 2000 editions of the "Hi-Fi" Magazine.
"Codec B (MPEG Layer 2)...better on vocals and speech, providing more expressive vocals and more realistic ambience and reverb."
"Codec B (MPEG Layer 2)...among the best again, sounding more expressive musically.

I know this may not mean much, but...


Right, but you must remember that some 'magazine' tests (I don't know if it's the case with these ones)  take in consideration only legal encoders - so, they won't test tooLame, scmpx, maenc...

And, if you want to take the conclusions from a highly serious test made by an audio guru, here they are:
Quote
Qdesign Imedia 2 has the most natural and open sound
of them all and compared best with the wav file, but all the
others were quite good also. I cant rate the individual encoders
and even choosing a "winner" wasnt too easy.


BTW: The guru's name is Kirsten Madsen 

Regards;

Roberto.

more layer II (.mp2) questions

Reply #11
Quote
Originally posted by RD
Nik: How noticable would the "ringing and transient smearing" be if I used blackman windowing?  Is it very subtle?


Key issue here is that lowpassing is aggressive modification of a signal. Sharp transients have a lot of high frequency components, just what you are filtering away. A square wave doesn't look square anymore after lowpassing. If it's audible, then you have set your cut frequency too low .

However, this isn't quite everything. FIR filtering isn't exactly "perfect" and there are few mathematical compromises. But these are nowhere near for example "pre-echoes" of MP3 or such. Effects besides the obvious loss of high frequency components should be very far from audible. An adequate analogy would be that even a modest FIR filter beats even the best analogous filters used in the most expensive pair of loudspeakers.

What I'm trying to say is that FIR lowpassing has some undesired side-effects on the passband area (the remainder of the signal, that is) but I think is completely safe to say that they are negligible at hearing point of view. The compression effects are surely 10^n times stronger than harm from lowpassing alone.

This applies only to "classic" FIR lowpassing like described earlier. If I had any idea what "polyphase" lowpass filtering is I could elaborate even more .

more layer II (.mp2) questions

Reply #12
a suggestion :
instead of filtering the signal (FIR is more advised, imho), in order to acheive better resolution in low frequencies, we could modify the bit-allocation engine in the mp2 encoder.
this suggestion has some sort of audioable drawbacks, but it might be better than filtering.

btw,
BeSweet can go directly from ac3 to mp2.  the mp2 encoder i use is Albert Faber's mp2enc. it isn't as advanced as toolame, but the source-code is very clear, and is very easy to modify.

more layer II (.mp2) questions

Reply #13
Quote
Originally posted by rjamorim


Which MPEG1 encoder do you use?

I personally prefer Panasonic (Slightly better than Tsunami, IMO)

Regards;

Roberto.


Yah, I sometimes use (way too complex encoder, I have no time to learn about it) the Standalone Panasonic Encoder to encode, I am learning how to multiplex the audio and video stream, cause I wanna use toolame for the audio stream.

rjamorim, what settings do you use on the Panasonic encoder, for fast motion sections on a movie? If you teach which settings you use for encoding fast motion sections and if they encode reasonably fast, I would be very greatful!

Cheers
AgentMil
-=MusePack... Living Audio Compression=-

Honda - The Power of Dreams

more layer II (.mp2) questions

Reply #14
Quote
Originally posted by AgentMil
Yah, I sometimes use (way too complex encoder, I have no time to learn about it) the Standalone Panasonic Encoder to encode, I am learning how to multiplex the audio and video stream, cause I wanna use toolame for the audio stream.


You can encode video-only with Panasonic (creates an m1v file), encode audio with tooLame, then multiplex it with TMPGenc.

Quote
rjamorim, what settings do you use on the Panasonic encoder, for fast motion sections on a movie? If you teach which settings you use for encoding fast motion sections and if they encode reasonably fast, I would be very greatful!

Cheers
AgentMil


I use the default settings. It works very well, and it's not like the encoder is awfully configurable.

Now, don't expect high speed from Panasonic. It's a tradeoff, if you want great quality, let the encoder take it's time.
(That's not valid for MPEG2, but that's another story...)

Regards;

Roberto.

more layer II (.mp2) questions

Reply #15
Thanks rjamorim!!!

You are a great help! Ok it seems the Panasonic Encoder is the way to go then. It just that I got a program that does all the above in one step and in a point and click format  But it seems doing it the way you have said doesn't sound too hard and hopefully provide better quality!

What do you mean not configurable? I was reading that the Panasonic Encoder was configurable to the extent of choosing how the images look on the screen and how the encoder post processed them? Do you have another version? Yours sounds much easier to learn, I think I have version 2.5.

Cheers
AgentMil
-=MusePack... Living Audio Compression=-

Honda - The Power of Dreams

more layer II (.mp2) questions

Reply #16
At the risk of teaching my grandmother to suck eggs...

To those testing the quality of Q-design MPEG - you have found the speed/quality switch, haven't you?

Cheers,
David.

more layer II (.mp2) questions

Reply #17
Quote
Originally posted by 2Bdecided
To those testing the quality of Q-design MPEG - you have found the speed/quality switch, haven't you?


Certainly, sire. And I tested on both, fast and slow, modes.

Sometimes, the slow mode produced more artifacts than the fast one. Kinda like MP3enc vs. fastenc. :confused:

Quote
Originally posted by AgentMil
Thanks rjamorim!!!


Heh, no problem.

Quote
You are a great help! Ok it seems the Panasonic Encoder is the way to go then. It just that I got a program that does all the above in one step and in a point and click format  But it seems doing it the way you have said doesn't sound too hard and hopefully provide better quality!


Which program is that, may I know?

Certainly, Panasonic is as good as it gets regarding MPEG1 quality encoding. And, believe me, it's much easier to set up than Tsunami..

I have experience with Tsunami, Panasonic, Ligos LSX & GoMotion, Rainbow, Honestech, Cinemacraft, Cleaner, DVMPEG, BBmpeg, Xing, MEGApeg, MPEGg... regarding MPEG encoding. So, it's safe to trust me.

Quote
What do you mean not configurable? I was reading that the Panasonic Encoder was configurable to the extent of choosing how the images look on the screen and how the encoder post processed them? Do you have another version? Yours sounds much easier to learn, I think I have version 2.5.


Mine is V. 2.51 (fixed a small bug in 2.5). It has some great features, like Cropping (One of the best cropping / resizing engines around) and quantizers optimized for CG/Animation and Natural Image. But, other that these simple configurations, you shouldn't try to play with bizar settings. They tend to produce shit. Panasonic is very smart on choosing what will be best for that particular frame being encoded.

Regards;

Roberto.

more layer II (.mp2) questions

Reply #18
Icic, it seems the Panasonic one is quite automatic in its operation then. It looks like I will definitely fiddle around with that this weekend  Thanks alot! And the program I use is Dup-DVD, one step DVD to VCD/SVCD, the quality is quite nice and the sound to. But then again I don't have anything to compare it too that is on the same level as VCD encoding. But will try Panasonic hopefully this weekend (work leaves no free time for no one).

Cheer
AgentMil
-=MusePack... Living Audio Compression=-

Honda - The Power of Dreams

more layer II (.mp2) questions

Reply #19
Quote
Originally posted by 2Bdecided
At the risk of teaching my grandmother to suck eggs...

To those testing the quality of Q-design MPEG - you have found the speed/quality switch, haven't you?

Cheers,
David.


Um.... I have the 79 dollar acm mpeg layer ii codec and there are no speed / quality switch modes...

more layer II (.mp2) questions

Reply #20
Quote
Originally posted by RD
Um.... I have the 79 dollar acm mpeg layer ii codec and there are no speed / quality switch modes...


Yes, there are.

Control Panel -> Multimedia -> Devices -> Audio Codecs -> Qdesign MPEG Audio codec -> Properties -> Configurations -> Encoder Optimized for Speed / Quality.

You can choose CRC too.

Regards;

Roberto.

more layer II (.mp2) questions

Reply #21
Thanks Roberto (rjamorim) !!

They did not give me a manual when I bought it, and their website is very spartan... still I feel like a dumbass right now...

Now I cannot go to sleep i must try the new tweaks...

more layer II (.mp2) questions

Reply #22
Quote
Originally posted by rjamorim
BTW: The guru's name is Kirsten Madsen  
That's from km's website... There should be enough people around here knowing you shouldn't believe a thing it says on that website. It was meant for TAC promotion (a proprietary codec, now discontinued).

 

more layer II (.mp2) questions

Reply #23
Quote
Originally posted by YouriP That's from km's website... There should be enough people around here knowing you shouldn't believe a thing it says on that website. It was meant for TAC promotion (a proprietary codec, now discontinued).


Heh. Don't worry about that. I've been a dweller at the VQF.com forums for far too long to know KM very well.

Ever wondered why I used the smilies after his name?

Regards;

Roberto.

more layer II (.mp2) questions

Reply #24
Ah sorry, I should've noticed you were being sarcastic.

Yes, I think most of the VQF.com people should remember KM very well.