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: lame and encoding 48kHz source as 44.1kHz mp3 (Read 3325 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

lame and encoding 48kHz source as 44.1kHz mp3

I've already learnt it makes sense to encode 24-bit source material directly with Lame, without first dithering it down externally to 16-bit resolution... but how about 24-bit source material at 48kHz, intended to be encoded to a 44.1kHz MP3 file?
Should I resample to 44.1 kHz using a hi-q external resampling tool, does Lame offer good internal resampling, or doesn't resampling take place inside Lame at all, but rather some kind of bandwith-limiting during the analyzing and encoding process? If the last option is the case, I expect I'd be better of having Lame do the 'conversion', as no samples will get removed or interpolated before the encoding possibly resulting in a more (phase)accurate end result.

I will test this soon, as I'm about to convert a couple of 24 bit 48kHz-recorded old world music vinyl record to mp3 and ogg, next to burning them to CD.
But I'm interested in the technology behind Lame in this case, and I couldn't find information on this issue (and I'm very bad at reading the Lame source code  )

Ernest

P.S. I'm even considering encoding the albums at 48kHz ogg/mp3, because I do pick out a 48kHz recording from a 44.1kHz recording, but I've never tested the results in an ogg or mp3

lame and encoding 48kHz source as 44.1kHz mp3

Reply #1
LAME is tuned specially for 44.1 KHz data, and internal resampling is said to have some problems. Better use an external program to do the resampling. SSRC is fine for this, input and output can be at 24 bit. CEP resampling with pre/post filtering and quality of  300 and over is fine too. Both are about the best you can find.

lame and encoding 48kHz source as 44.1kHz mp3

Reply #2
AFAIK lame, especially the --alt-presets are much more tested and tuned on 44.1kHz input than 48kHz. So it'd be safer to resample to 44.1kHz. Best resampling quality you can get is produced by Cool Edit Pro or SSRC (foobar2000's resampling is based on SSRC too so you can use fb2k's diskwriter. Lame's internal resampling quality is theoretically worse, but I don't know if it's possible to hear a difference.

AFAIK Vorbis and Musepack are are safer for 48kHz.
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

lame and encoding 48kHz source as 44.1kHz mp3

Reply #3
To downsample accurately, one must prefilter the original signal to remove frequencies (lowpass) that can't be represented at the new sampling rate, to prevent aliasing.

Lame uses polyphase filters for lowpass, which have a little more frequency ripple than those used in programs like CoolEdit, but it's way way down at something like -60 dB levels or something, so it's practically inaudible.

Given that frequencies above 22.05 kHz are entirely inaudible at -60 dB from full-scale, as are those at 19 kHz or so, where --alt-preset standard uses a lowpass this should all be well below the threshold of hearing, and psychoacoustically masked as well, so I'd have no hesitation to keep it simple and use --resample in LAME.

However, if you're curious and you have any external tools like CoolEdit Pro to try an ideal (but slow) low-ripple low-pass filter that introduces no delay, as part of the downsampling procedure, then you could perform a test.

• Encode 48 kHz, 24-bit with lame --resample 44.1 --alt-preset standard
• Encode the externally downsampled 44.1 kHz, 24-bit WAV with lame --alt-preset standard
• Compare the files produced and/or the decoded output.

If they're bit-identical, the difference, if any, is considered inaudible by the psymodel.

If they're not identical, there might have been some phase-shifts or delays with one filter or other that would change the MP3 encoding subtly but are almost certainly inaudibly, so ABX the difference.

Personally, I can't do the test, and in any case, I'm convinced that the pre-filter and post-filter (the LPF used in the LAME presets) will be as near perfect as to be audibly transparent.

 

lame and encoding 48kHz source as 44.1kHz mp3

Reply #4
Thanks for the quick replies!
I'll try SSRC for resampling, as I've never been too happy with the Wavelab resampling routines.