Re: [MP3 ENCODER] filter options (and several questions)
It's right that it's not a lot, but I think it's important. As an example, a standard 10 or 15Hz high pass filter would be nice, as no one is able to ear such frequencies, so why encoding them? A 10kHz filter, IMHO, would be a bad idea. Even in poor listening conditions with less than adequate equipment this is noticable. It will make most music have a more muddy and boomy sound. I was speaking about a 15Hz HIGH-PASS filter, and not about any LOW-PASS filter. Regards, Gabriel Bouvigne - France [EMAIL PROTECTED] icq: 12138873 MP3' Tech: www.mp3tech.org -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options (and several questions)
What is the purpose of this high-pass filtering ? You said that it would affect only 2 MDCT coeficients, that is less than a percent of them all, so what gain do you/we expect from it ? In the tuning of the 44.1kHz voice option (I know that this option should be updated now for other bitrates), I added such an high pass filter by zeroing the 2 lower mdct coefficients. In my test cases, it dropped the vbr average bitrate from 121kbps to 120kbps. So it's just a little more than a percent. It's right that it's not a lot, but I think it's important. As an example, a standard 10 or 15Hz high pass filter would be nice, as no one is able to ear such frequencies, so why encoding them? Regards, Gabriel Bouvigne - France [EMAIL PROTECTED] icq: 12138873 MP3' Tech: www.mp3tech.org -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options (and several questions)
On Thu, Dec 16, 1999 at 08:06:26PM +0100, Gabriel Bouvigne ([EMAIL PROTECTED]) wrote ... It's right that it's not a lot, but I think it's important. As an example, a standard 10 or 15Hz high pass filter would be nice, as no one is able to ear such frequencies, so why encoding them? A 10kHz filter, IMHO, would be a bad idea. Even in poor listening conditions with less than adequate equipment this is noticable. It will make most music have a more muddy and boomy sound. 15kHz would be OK for all but very demanding situations. I'd guess that an 18kHz low pass filter would only be noticable with very good/excellent conditions, and an experienced ear. All of these estimates assume a good filter. Setting the coefs. to zero in those regions probably isn't the best way. As mentioned in previous emails, that could lead to some strange distortion. If you use a soundcard/headphone combination for music tests, I'd recommend getting good head phones, and checking out this web page for the performance (especaially DtoA) of various sound cards: http://www.pcavtech.com/soundcards/summary/. A sound card can make a world of difference with its own performance characteristics at various frequencies. An audiophile, John -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options (and several questions)
Date: Wed, 15 Dec 1999 23:20:03 -0800 From: Monty [EMAIL PROTECTED] a frequency resolution of only 22050/576 = 38Hz. So the accuracy of the first few coefficients is questionable, and a highpass filter at 50Hz would only effect the first 2 MDCT coefficients. I dont know how big a problem this is, but a true 50Hz filter would need to be done before calling lame, using a much larger fft/mdct window. No practical filter, digital included, will have a cutoff that sharp. It *could*, but that causes all sorts of other problems (like serious ringing throughout the spectrum). Monty Are there any rules of thumb for an appropriate frequency range that the filter should act on? Mark -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options (and several questions)
Robert Hegemann wrote: Thank you Ross for the info about radio frequencies. Coding FM quality with sharp cutoff would look like: lame --highpass 0.05 --highpass-width 0 ...etc May I make a case for --highpass 0.016 ? FM Radio usually goes down a bit lower than 50Hz. The lowest note on a conventional piano is 27.5Hz, the orchestral `double-bass' plays down to 32.7Hz, and a 32-foot organ pipe, playing the lowest note on the pedal board, is 16.35Hz, though not many home systems will reproduce this except to annoy the neighbours. It is true that some FM stations (in the UK at least) put filters in below 30Hz to allow in-band switching tones to be used between studios. I hope this is not too much of an imposition, but has anyone documented the various `-X n' options? I'm getting better results on choral music with -X 5 while some orchestral music sounds better with -X 4. The existing documentation is *very* helpful in other aspects, though. In psymodel.c, there are a couple of commented-out sections. One is around the bark computations... is the table you supply generally thought to work better than the calculated bark values? What is the effect of #define NEWS3 in psymodel.c, which enables certain extra computations within the spreading function routines? My choral music example (possibly) sounds better without this defined (as you have left it in the code). In your `USAGE' file, you have kindly included my old notes about filtering and sample rates. Now that these facilities are included within LAME, perhaps the notes are no longer needed? I would say, however, that at 96kbit/s and 32kHz sample rate, choral music in a large reverberant setting sounds better with --noshort enabled and (even) -m f. Thanks, John Hayward-Warburton [EMAIL PROTECTED] -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
RE: [MP3 ENCODER] filter options
John Hayward-Warburton wrote: It is true that some FM stations (in the UK at least) put filters in below 30Hz to allow in-band switching tones to be used between studios. Not that we use a filter here but I am aware that a lot of stations in the USA and elsewhere use a highpass filter which I thought was around 50hz (but maybe its 30hz) to allow more energy in the more audible freqs and therefore produce a louder sound. "Louder the better" is usually the motto. Maybe the highpass option should be removed altogether from the FM preset. I hope this is not too much of an imposition, but has anyone documented the various `-X n' options? I'm getting better results on choral music with -X 5 while some orchestral music sounds better with -X 4. The existing documentation is *very* helpful in other aspects, though. What does the -X parameter do exactly? -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options
Ross Levis wrote: What does the -X parameter do exactly? Only from looking at the code (and not understanding more than half of it...): It's all in quantize.c (look for references to `experimentalX'). It affects the output of function quant_compare(). John [EMAIL PROTECTED] -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options
What does the -X parameter do exactly? When LAME searches for a "good" quantization, it has to compare the actual one with the best one found so far. The function quant_compare says which one is better, the best so far or the actual. Now the -X parameter selects between different approaches to make this decision: -X0 the actual is better if it has less distorted scalefactor bands, or if it's equal to the best so far and the sum of noise over the thresholds is less than the best so far -X1 the actual is better if the maximum noise over all scalefactor bands is less than the best so far -X2 the actual is better if the total sum of noise is lower than the best so far -X3 the actual is better if the total sum of noise is lower than the best so far and the maximum noise over all scalefactor bands is less than the best so far plus 2db. -X4 this is a bit complicated, I think Greg Maxwell should explain this ;) -X5 the actual is better if the sum of noise over the thresholds is less than the best so far or if they are equal and the total sum of noise is lower than the best so far -X6 the actual is better if the sum of noise over the thresholds is less than the best so far or if they are equal and if the maximum noise over all scalefactor bands is less than the best so far or if they are equal and the total sum of noise is less or equal the best so far All these are EXPERIMENTAL and may disappear sooner or later. Maybe we find the one and only criterion someday. I hope it's getting a bit clearer to you. For the details take a look at quantice.c, search for experimentalX. Robert PS: -X6 is new, I just checked it in -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options
On Tue, 14 Dec 1999, Robert Hegemann wrote: -X4 this is a bit complicated, I think Greg Maxwell should explain this ;) -X4 resulted from testing, overthinking and sleep deperivation. :) It's better if: The worst subband is less or equal to the masking while the previous best's worst subband is 2db greating then mask or The worst subband and the prior best worst beat the masking threshold and the current worst comes within 2db the prior best worst and the current has less total noise-masking or The current worst subband is equal or less then masking, while the prior best worst is greater then masking and the current worst comes within 2db of the best worst and the current noise-masking is less then the best noise-masking + over noise (i.e. over noise is counting twice). or The current worst is less then masking and the best worst is greater then masking -0.5 and the best worst+1 is greater then the current worst and the current noise-masking + overnoise is less then the best noise-masking + overnoise or argh. You get the point. It's too complicated. It seemed to make a real advantage here, but it could have been more of a result of too small a test group.. I was trying to accomplish some sort of balence between the worst noise and the total noise. I later went completely nuts and made a completely crazy version that all the subbands and not just worst and total. But I never had a way to tune it, so I gave up. :) Is it better to have less overall noise even when there is more clustered in a single/few subbands, or have the subbands getting about equal noise, and the expense of a bit higher overall? No one knows. The current code lets us only easily look at the worst and the total. All of the other -Xes ignore the worst case subband unless the overall noise is less (except for 6 now, which only considers it when there is no over noise (or no difference in over noise), which I think puts too much faith in the psyco model). I don't think this is good, because I think that the 'more focused' noise will be more noticable even though the overall noise is less. However, I dont really have any good tests to back that up, and my current implimentation is too damn messy. Perhaps it should be replaced with: if (experimentalX==4) { better = ( ((max_noise best_max_noise) (tot_noise best_tot_noise)) || ((max_noise+1 best_max_noise) (tot_noise best_tot_noise+2) || ((max_noise best_max_noise+1) || (tot_noise+2 best_tot_noise)) ) ; I.e. If it's better it's better If the max noise is 1db better then it's still better if the total is upto 2db worse If the max noise is upto 1db worse then it's still better if the total is at least 2db better. I'd do it with ratios (i.e. each db of better worst allows 1.5db of worse total) but I'm trying to not be incomprehensiable again. :) -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options
X-Authentication-Warning: cs.csoft.net: $s=geek.rcc.se doesn't match $[EMAIL PROTECTED] X-Authentication-Warning: geek.rcc.se: majordom set sender to [EMAIL PROTECTED] using -f From: Robert Hegemann [EMAIL PROTECTED] Date: Sun, 12 Dec 1999 23:21:56 +0100 Content-Type: text/plain Sender: [EMAIL PROTECTED] Precedence: bulk Reply-To: [EMAIL PROTECTED] X-MIME-Autoconverted: from quoted-printable to 8bit by cs.csoft.net id QAA29448 X-UIDL: !e)e97c4!!'DOe9(4G!! I just want to notify, that I added filter commandline options to LAME in cvs. lame --highpass_l 300 --highpass_h 330 --lowpass_l 3100 --lowpass 3400 --resample 16 --noshort -b 16 -m m filename.wav = would produce an output with phone quality. I would suggest changing to a more sox like settings, where you specify the lowpass frequency, and then a width or rolloff parameter. lowpass_l and lowpass_h seems a little confusing. What about: --lowpass --lowpass_width And then there could be a default width of about 15% Mark -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
RE: [MP3 ENCODER] filter options
Hi Robert. Hopefully someone else can help with the Win32 compile - please :) I think Marks suggestion of using a width option may be less confusing and easier to use. As far as radio is concerned, the 2 main presets would be something like this: 1. Music/commercials: FM50 - 15000 hz, stereo: --lowpass 15000 --lowpass_width 0 (sharp cut-off) -m j -b 128 Not sure whether a highpass at 50hz would be beneficial or not. 2. High quality voice (interviews etc). I'm not sure what the best settings for this would be. I haven't analysed voice frequencies so I'm guessing at the following: HQvoice 200 - 1 hz, mono: --lowpass 1 --highpass 200 -m m -b 64 Support for variable bit-rate should be added to the presets as well. If -v is specified, an equivalent -V setting should be defaulted. I presume -V4 could be used for both of these. The -b settings would have to be increased or removed. Cheers, Ross. Robert Hegemann wrote: Hi Ross, I have no Windows, so I can't help you with a Win32 version. But I want to start a collection, that could become something like presets for Lame: phone 300 - 3400 hz, mono: --highpass_l 300 --lowpass_h 3400 --noshort(preechoes are a minor issue) --resample 16(8 would be better, needs MPEG2.5) -m m -b 16 (8 is a litle bit to low :( CD 2 - 2 hz, stereo: --lowpass_h 2 --resample 44.1 -m s -b 192 And as you are working for a radio station, you could probably extend the list for different radio types, studio standards, etc. Robert -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )
Re: [MP3 ENCODER] filter options
Mark wrote: I would suggest changing to a more sox like settings, where you specify the lowpass frequency, and then a width or rolloff parameter. lowpass_l and lowpass_h seems a little confusing. What about: --lowpass --lowpass_width And then there could be a default width of about 15% Mark OK, I just uploaded a new lame.c, now options look like: --lowpass freq --lowpass-width freq --highpass freq --highpass-width freq I switched the meaning of freq from Hz to kHz, because of the --freq sfreq and --resample sfreq options. You have to pass (re)sample frequencies in kHz too. If you don't pass the ...-width options, they will be 15% of lowpass/highpass, just as Mark suggested. Thank you Ross for the info about radio frequencies. Coding FM quality with sharp cutoff would look like: lame --highpass 0.05 --highpass-width 0 --lowpass 15 --lowpass-width 0 -m j -b 128 filename.wav filename.mp3 Robert -- MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )