HydrogenAudio

Lossy Audio Compression => MP3 => Topic started by: dnewhous on 2018-07-07 07:17:39

Title: best mp3 encoder with something better than a command line interface?
Post by: dnewhous on 2018-07-07 07:17:39
If I understand, different mp3 encoders sound different.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: polemon on 2018-07-07 08:38:00
Command line encoders like lame are really just interfaces to the library libmp3lame.

Many graphical encoders (which I assume you mean by the term "better"), either use the command line program by calling that underneath, or using whatever encoding library directly.

Things like foobar either use libraries or call encoders, too.

Your question doesn't really make sense, but given what I've explained, and that LAME is kinda the best encoder over all (including availability, etc.), I'd suggest get a GUI for LAME. I.e. one that either calls the command line program (and there's tons of those, as this is often a programming exercise for novice programmers), or simply uses libmp3lame internally (this is by far the standard).

I believe the "best" MP3 encoder in terms of perceived audio quality, is fastenc from FhG, but I might be wrong, I haven't looked at any ABX test for quite some time. Just get a GUI calling fastenc for you, if that's what you're after.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Porcus on 2018-07-07 09:54:57
If I understand, different mp3 encoders sound different.

You don't need to worry over that. Use LAME or any media player that (cf. polemon's reply) that uses LAME to encode. E.g., as mentioned, foobar2000.

IMHO, tweaking MP3 options and the like isn't really worth it. If MP3 isn't good enough at a certain bitrate - for example if I wished to cram as much as possible into my cellphone at "acceptable in-car quality" - then rather than asking how to get the best out of MP3, I would ask whether I could use a different codec. I can play Opus.
Heck, given that MP3 cannot even go below 32 kbit/s, I am kinda shocked at how good Opus at 31 kbit/s is.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Franky666 on 2018-07-07 17:29:51
Yep. LAME is the clear winner for MP3. Forget everything else. :D

As long as an up-to-date version of LAME is used, it doesn't really matter what tool you use for the conversion. Will result in same quality.

A barebone tool for MP3-encoding from files is RazorLame.

If you encode from a CD, use ExactAudioCopy, which turns a CD straight into a bunch of MP3's (using LAME).

Audacity uses MP3 export too.

In many cases, you have to download LAME separately to enable the MP3 encoding functionality.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Porcus on 2018-07-07 19:58:01
If you encode from a CD, use ExactAudioCopy, which turns a CD straight into a bunch of MP3's (using LAME).

Don't. Rip to lossless and keep the rip. Encode you can always do later.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Franky666 on 2018-07-07 20:07:22
He asked for Software with GUI that encodes high-quality MP3's using the best encoder, not FLAC. :P

If he has a few CD's, it is OK to rip directly to MP3 (re-rip wouldn't be that time-consuming).
But yes, a big archive with 1000's of CD's should be archived losslessly. :)
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Deathcrow on 2018-07-07 20:38:06

In many cases, you have to download LAME separately to enable the MP3 encoding functionality.

That should be a thing of the past though, since MP3 patents have run out.  They should all be able to bundle the LAME encoder now, no?
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: dnewhous on 2018-07-08 00:12:34
Didn't Winamp Pro have the Fraunhoffer IIS encoder?  The best?
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: lvqcl on 2018-07-08 01:09:36
IIRC it has Fraunhofer AAC encoder and LAME MP3 encoder.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: ThaCrip on 2018-07-08 02:24:16
Quote
best mp3 encoder with something better than a command line interface?

Foobar2000 with the Foobar2000 'Encoders Pack'. you can't really go wrong with that as, while I don't know for sure, I would imagine Foobar2000 is one of the more popular general audio playback/conversion programs on Windows based PC's in general as it's simple and effective.

that gives you the newest LAME encoder which seems to be the standard for encoding MP3 files. just add your lossless files into the active window (a simple drag and drop from Windows Explorer into the Foobar2000 window will work) and then select them (left click a file, hold CTRL (or shift to select a bunch), click what you want to select what you want to convert) and then right click and select 'Convert' and the rest I don't expect you to have much trouble figuring out. but one may want to tweak the 'destination' info a bit (which you will see once you enter the "Convert > ..." section) as I usually have mine appear like "01. Track Name Here" and then put those into a folder in relation to the album title (for example, "Artist Name - Album Title (2010)" (with "(2010)" being the year of release of that particular album)) etc.

Foobar2000 is my general 'go to' program for converting FLAC to MP3/AAC/Opus etc. but as far as getting your FLAC files from say a original audio CD in the first place, I would probably suggest using EAC (Exact Audio Copy). although you can use Foobar2000 but EAC is safer for ripping CD's.

p.s. if possible, I would suggest keeping a copy of your music CD's in FLAC format as this way in the future when converting to another lossy format (i.e. MP3/AAC/Opus etc) it will be nice and simple as a typical album would convert in no more than about 1 minute on most CPU's still in use. so unless you got a boatload of music to convert, it takes a minimal amount of ones time.

NOTE: as a general guideline for MP3... you want to use a minimum of LAME v5 (130kbps) and to be safe try LAME v2 (190kbps). but like I always say, unless you must use MP3, it's best to use either AAC or Opus at this point in time since they give you better quality at lower bit rates as if your using high bit rates, say around 190kbps (or more), it does not really matter what lossy format your using. but at the lower ranges, say around 128kbps and less, it's best to stick to AAC if you need wide compatibility or Opus if your going for maximum sound quality at the low bit rates and are not too concerned with having wide support.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Stacker on 2018-08-08 09:29:39
I know this tread is aging, but LameXP is an option.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: CodsterTX on 2018-08-18 22:37:53
how has no one mentioned dbpoweramp? i've been using it to create mp3's for the past 20+ years
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-16 09:14:50
IMO lame v3.100 is the best .mp3 encoder.

If you want to know what lame.exe really can do, you must recompile the source code with all the dev settings unlocked. Now I realized the .mp3 format is not dead; can be used even for high quality encoding, with the .mp3 file size +7x smaller than the .wav format.

By the way, use some good quality speakers to hear the differences;  my subwoofer make 20 Hz audible signal and the best vibration output is at 34 Hz -3dB.

I made a small bat file to automate the finding of the best scale when I encode with lame.

Code: [Select]
@echo off
@setlocal
color 1E
echo  ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
echo  Ý                                          ÚÄÄÄ¿Þ
echo  Ý         LAME v3.100 64bit unleashed      ³ û ³Þ
echo  Ý                                          ÀÄÄÄÙÞ
echo. ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
echo.

:: highpass filter disabled. polyphase lowpass filter disabled
:: using short blocks if better
:: interchannel masking ratio: 0.0002
:: using joint stereo for better compression
::      for access to dev settings (--help dev) put "#define _ALLOW_INTERNAL_OPTIONS 1" in parse.c and compile
:: default lame psychoacustic tuning:                        --ns-bass -0.5 --ns-alto -0.25 --ns-treble -0.025 --ns-sfb21 0.5
:: adjusted masking (more clear and selective sounds, noise out): bass=-1 dB,    alto=-0.5 dB,   treble=-0.275 dB,  sfb21=0 dB

lame.exe -mj --ns-bass -0.5 --ns-alto -0.25 --ns-treble -0.25 --ns-sfb21 -0.25 --short --verbose -q0 -b320 --cbr -c --resample 48 --highpass 0.001 --lowpass -1 --clipdetect aaa.wav out.mp3 --bitwidth 24 --interch 0.0002 --scale 1.5
ECHO 

:step1
echo -------------------
Set /P _link=new scale:
echo -------------------
lame.exe -mj --ns-bass -0.5 --ns-alto -0.25 --ns-treble -0.25 --ns-sfb21 -0.25 --short --verbose -q0 -b320 --cbr -c --resample 48 --highpass 0.001 --lowpass -1 --clipdetect aaa.wav out.mp3 --bitwidth 24 --interch 0.0002 --scale %_link%
ECHO 

echo ----------------------------
     Set /P _abort=exit? (y, *):
echo ----------------------------
If /i "%_abort%"=="Y" goto step2
If /i "%_abort%"=="y" goto step2
goto step1
:step2
pause
P.S.- Before the .mp3 encoding, I used some wave editor to make sounds better for me.
(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_4cfe4d548bda53748eea134b51606980;topic=116217)
(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_4cedb0fd306e3bdf6ac944530af9c2dc;topic=116217)
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-16 12:26:48
IMO lame v3.100 is the best .mp3 encoder.
 
 
Another example:
- aaa.wav before encoding
- out.mp3 after encoding with my above mentioned lame settings.
(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_0c32f69e192e6870ad7612b79756581a;topic=116217)
(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_1377ccb75e1b6d09526530f6abf6a622;topic=116217)
(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_b573ba4bcca1c73ea330452564004a84;topic=116217)
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-16 16:27:04
Default settings are choosen by the devlopers for a reason. If you're the kind of user who thinks posting spectrograms of mp3s is a good idea, you should probably should stick to the defaults.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-16 21:03:01
Default settings are choosen by the devlopers for a reason. If you're the kind of user who thinks posting spectrograms of mp3s is a good idea, you should probably should stick to the defaults.
Are you happy now? Check the ABX tests. The encoded sample sounds better, more vivid and selective sounds, less noise.
(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_766a7ce7221a917b72f20db5065b4c93;topic=116217)
I posted spectograms only to see the encoded .mp3 was not butchered by the encoder (trimmed from 20 kHz to 16 kHz), as you suggest with the default settings and so on.

May you tell me what is the reason the developers locked for general use the fine tuning (psychoacoustics) of lame v3.100? I remember in lame v3.98 these settings was available, not locked. Commercial reasons whatever?

GiT gUd
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-16 22:35:11
Default settings are choosen by the devlopers for a reason. If you're the kind of user who thinks posting spectrograms of mp3s is a good idea, you should probably should stick to the defaults.
Are you happy now? Check the ABX tests. The encoded sample sounds better, more vivid and selective sounds, less noise.

That is an ABX test comparing a WAV and an MP3.  Assuming the WAV is the lossless file and the MP3 is your custom compile, that shows is that your MP3 is not transparent, which is a bad thing.

I posted spectograms only to see the encoded .mp3 was not butchered by the encoder (trimmed from 20 kHz to 16 kHz), as you suggest with the default settings and so on.

A spectrogram cannot show you if a file was "butchered".  It just shows you the spectrum, which is irrelevant.  It is not impossible that you might outsmart the developers, but if you're looking at spectrograms, it is very, very unlikely.

May you tell me what is the reason the developers locked for general use the fine tuning (psychoacoustics) of lame v3.100?

Generally settings are exposed if there is a reason a user might need to change them.  For things that don't have a reason to change they're not exposed.

Title: Re: best mp3 encoder with something better than a command line interface?
Post by: forestasia on 2018-10-18 12:53:18
Are you happy now? Check the ABX tests. The encoded sample sounds better, more vivid and selective sounds, less noise.

What do you mean by "sounds better"? Are you saying the MP3 sounds better than the WAV?

In the ABX you are just showing that you are able to tell the difference between the original WAV and the MP3. That is not what you want. (For example if you encode an mp3 with very low bitrate so that it sounds terrible, you would also get this 40/40 ABX result.) What you want is an MP3 that is indistinguishable from the WAV. So in the ABX you could not tell the difference. This is what you will get if you test LAME v3.100 with -b 320. Your modifications are totally untested, unlike the LAME default settings.

Have a look at the LAME changelog: https://svn.code.sf.net/p/lame/svn/trunk/lame/doc/html/history.html The changes in red are all the fine tuning and tweaking that has gone into the default settings (particularly around 2001-2003). If there was anything more to be squeezed out of LAME, it would already have been done years through these very rigorous tests and tweaks. Your new settings are very unlikely to be of any improvement over these.

May you tell me what is the reason the developers locked for general use the fine tuning (psychoacoustics) of lame v3.100? I remember in lame v3.98 these settings was available, not locked. Commercial reasons whatever?

I'm confused here too. What are you suggesting? Something like LAME developers having some secret high quality settings which they have locked out for normal users for commercial reasons? And your script is "unleashing" them? If you are suggesting anything along these lines, your thinking is way, way off. Sorry if I have misunderstood what you are saying here.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-18 14:07:13
What do you mean by "sounds better"? Are you saying the MP3 sounds better than the WAV?

Lowering the psychoacoustic masking patterns (with the dev settings unlocked) give more room for creativity, testing and discovering new sounds masked before. More vivid, crystal, noiseless and selective sounds. I encode music for myself not for you. You are free to use the default settings, is your problem. Why Lame v3.98 had the psy settings unlocked by default?

Personally, I don't like this new generally idiocratic trend to simplify everything to only two buttons, start and stop, and nothing else. If this is the future, the brave new world, then humans will end in cages guarded by robots. Idiocracy.

By the way, the ABX test was a joke, I found a glitch, a 1/8 second desync between samples at a certain point. But if you listen A and B entirely, more times, you will unable to guess the right answer. If you want to check yourself, I can send you in private the "unleashed lame" with settings, the .wav and the .mp3. The .wav is ripped from an original CD. You know, the copyright policy of TOS.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-18 14:22:44

Lowering the psychoacoustic masking patterns (with the dev settings unlocked) give more room for creativity, testing and discovering new sounds masked before.

I don't think any of that is accurate.

I encode music for myself not for you. You are free to use the default settings, is your problem.

If you didn't read the ToS when you signed up, now might be a good time. You are required to support claims you make about quality with objective means. The idea is to allow the community to evaluate ideas objectively.

Personally, I don't like this new generally idiocratic trend to simplify everything to only two buttons, start and stop, and nothing else.

In this case though it was a good idea. With access to those settings you changed a lot of things you did not understand while looking at tools you did not know how to interpret. A best you wasted a lot of time, and more likely than not also made bad files.

The settings are always there since the code is open source, but by forcing people to look at the code it hopefully suggests to people that these are complicated tools that require careful understanding.

By the way, the ABX test was a joke, I found a glitch, a 1/8 second desync between samples at a certain point.

Not sure that's a joke. It sounds like you inadvertently found out that something is wrong with your encoder changes, even if at the time you didn't understand that.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: forestasia on 2018-10-18 15:09:44
Lowering the psychoacoustic masking patterns (with the dev settings unlocked) give more room for creativity, testing and discovering new sounds masked before. More vivid, crystal, noiseless and selective sounds.
But if you listen A and B entirely, more times, you will unable to guess the right answer.

I am trying to understand what you are saying here. You say your new settings produce a "more vivid sound" in one sentence, but then later you say that you cannot tell any difference with the original?

When you say that being able to change the psychoacoustic settings allows "discovering new sounds masked before". What do you mean by "before"? Do you mean in the original WAV? Or the mp3 with default Lame settings? Do you think it is the purpose of an mp3 encoder to do some kind of EQ filtering on the original to make the music more vivid or to remove noise?

If you want to check yourself, I can send you in private the "unleashed lame" with settings, the .wav and the .mp3. The .wav is ripped from an original CD. You know, the copyright policy of TOS.

But you are encoding at 320kbps CBR. Using default LAME settings at 320kbps, you will not be able to tell the difference between the original wav and the mp3. At this maximum bitrate, you can probably change quite a lot of the LAME psychoacoustic settings and the output will still be transparent. That may very well also be the case when using your settings, but I think it can only make things worse. It can't improve on transparency.

If you would like to PM me your files and script, I will be happy to have a listen and try to ABX.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-18 15:28:34
Sent priv message.

Feel free to tell me your opinion.

Maybe the boost is because the .wav is originally encoded at 44100 Hz 16bit and the resulting .mp3 is encoded at 48000 Hz 24bit and I used interchannel masking ratio: 0.0002. Lowering the psy masking seems to be some kind of denoise.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-18 17:30:53
Sent priv message.

Clips under 30 seconds, which do not violate copyright laws in most countries, are allowed under ToS.  However, if you want people to take your samples seriously, you should first demonstrate that they improve something.  So far, all you have done is suggest that they make things worse.  

Maybe the boost is because the .wav is originally encoded at 44100 Hz 16bit and the resulting .mp3 is encoded at 48000 Hz 24bit

Resampling files is a bad idea, but if you want to experiment with that, you should resample the PCM first, and then do the comparison between the lossless and lossy resampled files.  Otherwise it is extremely difficult to do fair comparisons between files of different sampling rates.  
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: A_Man_Eating_Duck on 2018-10-18 18:06:24
@BrilliantBob

You sound like a person who wants the best quality music files so is there any reason you're not ripping your music in to FLAC or another lossless audio format? If you went down this path you can use an EQ to tweak the sound to your preference. If you upgrade your gear in the future all you need to do is redo the EQ settings to suit and not have to rerip and reencode your music again in to further "tweaked" mp3s.

Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-18 18:30:35
Resampling files is a bad idea, but if you want to experiment with that, you should resample the PCM first, and then do the comparison between the lossless and lossy resampled files.  Otherwise it is extremely difficult to do fair comparisons between files of different sampling rates.
Good point, I did not think about it before. I will proceed accordingly.

Clips under 30 seconds, which do not violate copyright laws in most countries, are allowed under ToS.  However, if you want people to take your samples seriously, you should first demonstrate that they improve something.
I will make the 30 sec new samples sets to post them in forum. The main comparison will be between the default .mp3 lame encoding and my personalized encoding and also between the original resampled WAV and my personalized HQ .mp3 encoding.

I think I was misunderstood... Excuse my french, but I am not a native english speaker. The improvement of the .mp3 encoded with the modified psy extended settings must be compared with the .mp3 encoded with the default settings (filters ON, no other psy settings only the default,...). Those default psy settings and filters I think are good for the low to medium-level quality of the encoding and are unchanged for years. Times changed, now there are new standards for HI-FI encodings, 48,000 Hz, 24bit depth, and so on and the new PC hardware can manage. My goal is to tweak the lame settings, psy included, to obtain a mp3 file as close as possible with the original WAV, so that they can not feel any difference in ABX tests.

Thank for suggestions.

You sound like a person who wants the best quality music files so is there any reason you're not ripping your music in to FLAC or another lossless audio format? If you went down this path you can use an EQ to tweak the sound to your preference.
Indeed, I rip music with EAC directly to FLAC and I keep it in this format. My experiment is to test the extreme quality limits of the lame encoder. I can keep thousands of high quality mp3's in my android, to listen them anytime, anywhere. The WAV or FLAC formats are too large for this.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-18 18:56:15
I think I was misunderstood... Excuse my french, but I am not a native english speaker. The improvement of the .mp3 encoded with the modified psy extended settings must be compared with the .mp3 encoded with the default settings (filters ON, no other psy settings only the default,...).

At the bitrates you are using it won't be possible to have an improvement generally, so that won't work.  Instead, you start with a sample where you can reliably detect a difference and then make adjustments until you cannot.  Then you compare the encode you make to the original and try to show that it is now transparent.

My goal is to tweak the lame settings, psy included, to obtain a mp3 file as close as possible with the original WAV, so that they can not feel any difference in ABX tests.

At the bitrates you are using it is very unlikely you'll find many files with a difference that is detectable.  Do you actually have one? 
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: greynol on 2018-10-18 19:22:13
If you upgrade your gear in the future all you need to do is redo the EQ settings to suit and not have to rerip and reencode your music again in to further "tweaked" mp3s.
You can't save EQ settings as metadata?
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-18 21:01:33
At the bitrates you are using it won't be possible to have an improvement generally, so that won't work.  Instead, you start with a sample where you can reliably detect a difference and then make adjustments until you cannot.  Then you compare the encode you make to the original and try to show that it is now transparent.
I hope to obtain good results with all filters OFF and with the psy fine tuning (interchannel masking ratio and sticking around with the psy masking values). The default settings output something crappy and the differences are obvious for any real Hi-FI audio system. The increment of the psy masking values is +/-0.25 dB, added/subtracted to the default psy values. The sfb21 is treble dependent and, along with the low pass filter, cuts the high frequency sounds brutally. Working in progress.

At the bitrates you are using it is very unlikely you'll find many files with a difference that is detectable.  Do you actually have one? 
With the settings I used in lame, I saw in spectrograms some kind of denoise, but the music sounds apparently identical, from the subwoofer bumps to cymbals. I tested >30 samples. Now I have to prove there are improvements based on the psy fine tuning and concludent ABX tests.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-18 21:46:12
I hope to obtain good results with all filters OFF and with the psy fine tuning (interchannel masking ratio and sticking around with the psy masking values). The default settings output something crappy and the differences are obvious for any real Hi-FI audio system.

Default 320kbps audio, of almost any format, is generally transparent.  If you don't already realize this, you should stop what you are doing and try it out. 

With the settings I used in lame, I saw in spectrograms some kind of denoise, but the music sounds apparently identical, from the subwoofer bumps to cymbals.

Spectrograms are meaningless.  Do not even waste your time with them.

Now I have to prove there are improvements based on the psy fine tuning and concludent ABX tests.

Maybe this is a language barrier, but logically to improve something you must first find a problem.  If you don't find any problems, then how are you expecting to improve anything?  You are not making a lot of sense. 
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: greynol on 2018-10-18 21:58:27
With the settings I used in lame, I saw in spectrograms some kind of denoise, but the music sounds apparently identical, from the subwoofer bumps to cymbals. I tested >30 samples. Now I have to prove there are improvements based on the psy fine tuning and concludent ABX tests.
Proof based on psy fine tuning?  No.

Concludent [sic] ABX tests?  Yes.  Where are they?

So far you've done nothing to justify your hijacking this topic.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: A_Man_Eating_Duck on 2018-10-19 00:15:21
If you upgrade your gear in the future all you need to do is redo the EQ settings to suit and not have to rerip and reencode your music again in to further "tweaked" mp3s.
You can't save EQ settings as metadata?
The EQ would be set up for his current setup, with different speakers\headphones or even device the EQ might need to be changed to suit. still far less painful then manipulating the sound of the mp3s.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: forestasia on 2018-10-19 08:23:47
I hope to obtain good results with all filters OFF and with the psy fine tuning (interchannel masking ratio and sticking around with the psy masking values). The default settings output something crappy and the differences are obvious for any real Hi-FI audio system. The increment of the psy masking values is +/-0.25 dB, added/subtracted to the default psy values. The sfb21 is treble dependent and, along with the low pass filter, cuts the high frequency sounds brutally. Working in progress.

High frequency content (>16kHz) is difficult to encode, this is why the low-pass filter removes them. As you say yourself, you cannot hear any difference. Only the spectrogram shows the filter, but having nice spectrograms should not be the aim. (If it is, forget mp3 altogether and just save a png of the original spectrogram :) ) 

When you disable the low pass filter, LAME starts wasting bits on encoding the high frequency content (which you cannot hear), and then it has less bits to encode the low and mid frequency information, so it will sound worse.

Thank you for sending me the samples. I cannot ABX any difference between the wav and your mp3, but that is also the case with the LAME default settings. And the default settings preserve the original 44.1kHz sampling rate. Resampling to 48kHz will not improve quality.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-19 12:03:11

If spectograms do not mean anything, I wonder why there are still exist.

At a glance, it can be seen some denoise in both encoded samples, especially at high frequencies which anyway bring only annoying HF hiss in ears.

I lowered the maskers of bass, alto and treble to not lose any particular sound from the original sample, which may be covered by stronger maskers.

The original sample (44,100 Hz 16bit WAV) was resampled to 48,000 Hz 24bit and the encoded samples to (48,000 Hz 24bit MP3) and look in spectograms almost identical and sounds almost identical, even on the whatever Hi FI audio system.

I put sfb21=4 to cut any noise >20,000 Hz and to save bits for a better quality encoding at lower frequencies. My goal is to make good quality mp3's for my android. The 4.8X WAV/mp3 dimension ratio it's pretty OK.

The best settings I tested so far:

lame.exe -mj --ns-bass -0.5 --ns-alto -0.25 --ns-treble -0.25 --ns-sfb21 +3.75 --short --verbose -q0 -b320 --cbr --resample 48 --highpass 0.001 --lowpass -1 --clipdetect aaa.wav encoded1.mp3 --bitwidth 24 --interch 0.0002 --scale 1.5

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Now, the samples, the spectograms and the ABX test.

-original.wav

-encoded1.mp3 (this sample was encoded with the above mentioned psy settings)
lame.exe -mj --ns-bass -0.5 --ns-alto -0.25 --ns-treble -0.25 --ns-sfb21 +3.75 --short --verbose -q0 -b320 --cbr --resample 48 --highpass 0.001 --lowpass -1 --clipdetect aaa.wav original.wav --bitwidth 24 --interch 0.0002
[--ns-bass -1.0 --ns-alto -0.5 --ns-treble -0.275 --ns-sfb21 -4 --interch 0.0002]

-encoded2.mp3 (this sample was encoded with the default psy settings)
lame.exe -mj --short --verbose -q0 -b320 --cbr --resample 48 --highpass 0.001 --lowpass -1 --clipdetect original.wav encoded2.mp3 --bitwidth 24
[--ns-bass -0.5 --ns-alto -0.25 --ns-treble -0.025 --ns-sfb21 -0.5 --interch 0.0000]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Conclusion:

I did not find significant differences in spectograms or audition, and ABX tests demonstrate that there is uncertainty in both situations (original.wav vs encoded1.mp3 / original.wav vs encoded2.mp3).

The psy settings --ns-bass, --ns-alto, and --ns-treble appears to have very little impact. Maybe --ns-sfb21 and --interch may be a game changer, I dunno.

(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_bf11b0e03fcfb31450f42637be598a78;topic=116217)

(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_b9c01caeea0b1d37f08d88e28504d2ca;topic=116217)

(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_4ab91ff58a106b71f24eccf5dd5c5c8d;topic=116217)

(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_9909555ec5f6b534de6768f7161f781f;topic=116217)

(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_4d3514a6d15cdf90622023d50f7429d2;topic=116217)
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-19 15:07:24
Spectrograms are useful for looking at analog equipment, but for a perceptual encoder they can't tell you anything. The "denoise" you see is just your imagination. If you were making changes based on that, then your changes are random. That is a bad way to do things.

If you couldn't ABX the original file then what you are doing is pointless; you can't improve on something that doesn't have any audible flaws. You need to find something that can be improved first.

If you want to learn about audio codecs, I suggest starting at lower bitrates, maybe 100 kbps, and then finding files where you can hear a problem. Then you can try tuning. However, this is going to be immensely more difficult then you're assuming, and will require you to have a much deeper understanding of how perceptual encoders actually work.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: greynol on 2018-10-19 15:57:32
I feel like I should bin all this "eyes are for listening" nonsense.  It is in no way advancing the original discussion, or even worth having in the first place.

It cannot be helped if BrilliantBob is unwilling to accept the fact that he is misguided.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-20 08:36:43
I feel like I should bin all this "eyes are for listening" nonsense.  It is in no way advancing the original discussion, or even worth having in the first place.
It cannot be helped if BrilliantBob is unwilling to accept the fact that he is misguided.

LAME v3.100 64bit. ATH: using type: 5 (what is it?)

I experimented many types of settings in LAME to obtain a quality .mp3, as transparent as possible related to the original .wav. I disabled Y using VBR. Now the encoding speed is double. I used this batch file for faster bulk encoding (a possible solution too for dnewhous who started this topic)
Code: [Select]
@echo off
@setlocal
color 1E
echo  ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ
echo  Ý                                          ÚÄÄÄ¿Þ
echo  Ý         LAME v3.100 64bit unleashed      ³ û ³Þ
echo  Ý                                          ÀÄÄÄÙÞ
echo. ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
echo.

:: this batch is very fast for bulk encoding. drag-and-drop the .wav in the batch window or write it with quotes ("FileName.wav")
:: the encoded .mp3 is as transparent as possible related to the .wav source
:: double encoding speed compared with 320 CBR
:: highpass filter disabled. polyphase lowpass filter disabled.
:: Y disabled * VBR 0 enforced to 320 kbps 48,000 Hz 24bit
:: ATH: using type: 5 (what is it?)
:: interchannel masking ratio: 0.0002
:: using LR stereo
::      for access to dev settings (--help dev) put "#define _ALLOW_INTERNAL_OPTIONS 1" in parse.c and compile
:: default lame psychoacustic tuning:                        --ns-bass -0.5 --ns-alto -0.25 --ns-treble -0.025 --ns-sfb21 0.5
:: adjusted psy masking: --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 (psychoacoustic disabled?)


echo ---------------------------
Set /P _infile=drag/enter source:
echo ---------------------------
set _outfile=%_infile:~0,-5%"

lame.exe -ms --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 --interch 0.0002 --verbose -V0 -b256 -B320 -F --resample 48 --bitwidth 24^
 --lowpass -1 --highpass 0.001 --clipdetect %_infile% %_outfile%.mp3 --scale 1
ECHO 

:reload
echo ---------------
Set /P _scale=new scale:
echo ---------------
lame.exe -ms --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 --interch 0.0002 --verbose -V0 -b256 -B320 -F --resample 48 --bitwidth 24^
 --lowpass -1 --highpass 0.001 --clipdetect %_infile% %_outfile%.mp3 --scale %_scale%
ECHO 

echo ----------------------------
     Set /P _abort=exit? (y, *):
echo ----------------------------
If /i "%_abort%"=="Y" goto terminate
goto reload
:terminate
pause

LAME returned these messages and I saw ATH: using type: 5
Code: [Select]
Warning: highpass filter disabled.  highpass frequency too small
LAME 3.100 64bits (http://lame.sf.net)
Resampling:  input 44.1 kHz  output 48 kHz
polyphase lowpass filter disabled
Encoding E:\music\09-metallica-of_wolf_and_man.wav
      to E:\music\09-metallica-of_wolf_and_man.mp3
Encoding as 48 kHz stereo MPEG-1 Layer III VBR(q=0)

misc:

        scaling: 1
        ch0 (left) scaling: 1
        ch1 (right) scaling: 1
        huffman search: best (outside loop)
        experimental Y=0
        ...

stream format:

        MPEG-1 Layer 3
        2 channel - stereo
        padding: all
        variable bitrate - VBR mtrh (default)
        using LAME Tag
        ...

psychoacoustic:

        using short blocks: channel coupled
        subblock gain: 1
        adjust masking: -6.8 dB
        adjust masking short: -6.8 dB
        quantization comparison: 9
         ^ comparison short blocks: 9
        noise shaping: 1
         ^ amplification: 2
         ^ stopping: 1
        ATH: using
         ^ type: 5
         ^ shape: 1 (only for type 4)
         ^ level adjustement: -7.1 dB
         ^ adjust type: 3
         ^ adjust sensitivity power: 1.000000
        experimental psy tunings by Naoki Shibata
           adjust masking bass=-8.5 dB, alto=-8.25 dB, treble=-8.025 dB, sfb21=-
15.5 dB
        using temporal masking effect: no
        interchannel masking ratio: 0.0002
        ...

    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
 10695/10695 (100%)|    0:43/    0:43|    0:44/    0:44|   5.8555x|    0:00
256 [   20] %
320 [10675] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-------------------------------------------------------------------------------
   kbps        LR  %     long switch short %
  319.9      100.0        93.7   3.6   2.6
Writing LAME Tag...done
ReplayGain: -5.9dB
WARNING: clipping occurs at the current gain. Set your decoder to decrease
         the  gain  by  at least 0.7dB or encode again using  --scale 0.92
         or less (the value under --scale is approximate).

---------------
new scale:

Never heard before about ATH type 5. I don't post spectrograms to not make people angry, but now, the encoded .mp3 looks like the original .wav. And sounds identical.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: sven_Bent on 2018-10-20 10:41:03
but now, the encoded .mp3 looks like the original .wav. And sounds identical.

Please Follow the TOS especially #8

Atm anything you have said ant be considering of any value much above a drunken mans tale.
You have completely lacked the ability to prove any of your statements  even though you have been asked for several times.

The only thing you have proven so far is a complete lack of understand on any of the tools you have used
- Resampling
- ABX testing
- Spectrograms

Not understading the usage of the tools and not listening to any advice on how to do things correctly is not helping your case.

Even if we regard the clear lack of understanding of tools and lack of evidence. the entire synopsis of your case is outright wrong.
You start by some made up belief that something is wrong and just goes out to say it fixed now. Not even analyzing if your initial issue is present or not.

If you want your case to be taken any kind of serious you need to seriously understand how the basis of proving by evidence works.
All advice I would be able to give you has already been mentioned by others. Try listening to them.


Quote of TOS #8
TOS 8. All members that put forth a statement concerning subjective sound quality, must -- to the best of their ability -- provide objective support for their claims.  Acceptable means of support are double blind listening tests (ABX or ABC/HR) demonstrating that the member can discern a difference perceptually, together with a test sample to allow others to reproduce their findings.  Graphs, non-blind listening tests, waveform difference comparisons, and so on, are TOS not acceptable means of providing support.

For that alone you post should be deleted as the inane rambling it appears to be.
You have been giving plenty of leeway to try to adhere to this, but have rejected any and all of them.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-20 11:22:49
Please Follow the TOS especially #8
 
 

I asked what is "ATH: using type: 5"

Samples and ABX tests for my settings will follow, working in progress, but I want to know first about this ATH type. Can you explain me about ATH type 5 please?

(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_c49ee58a3a623d9b69cd5c0ad2fb8b06;topic=116217)(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_3414e906268f794cf460e27de97656f0;topic=116217)(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_9e244865d2efe3fc230f6f168534f0ee;topic=116217)
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-20 16:51:15
Quoting the mod telling you to stop violating ToS and replying with the same nonsense you're in trouble for is not only disrespectful to the community, it is very foolish.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: butrus on 2018-10-20 18:15:27
best mp3 encoder with something better than a command line interface

Well, it's a matter of taste, for me there isn't *anything* better than command line - which is more ergonomic, more accurate, quicker to use...
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Deathcrow on 2018-10-20 21:28:07
Samples and ABX tests for my settings will follow, working in progress, but I want to know first about this ATH type. Can you explain me about ATH type 5 please?


That's a pretty meaningless ABX test. You don't need to prove that you can't distinguish a encoded file from the source.

What you should be doing: Post an ABX where you successfully distinguish the (in your opinion) inferior Mp3 with default encoder settings and same bitrate from lossless source. Then you should do ABC/HR tests to show that you can distinguish the two Mp3s from each other and that you consistently rate the one with your snakeoil commandline settings as higher fidelity.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-21 00:23:34
That's a pretty meaningless ABX test. You don't need to prove that you can't distinguish a encoded file from the source.

What you should be doing: Post an ABX where you successfully distinguish the (in your opinion) inferior Mp3 with default encoder settings and same bitrate from lossless source. Then you should do ABC/HR tests to show that you can distinguish the two Mp3s from each other and that you consistently rate the one with your snakeoil commandline settings as higher fidelity.
I apologize if someone felt embarrassed by my posts. It was not on purpose. I'm new to this forum and I do not know the procedures very well. Others have posted spectrograms and have not been admonished for it. They are only indicative, OK, they do not have scientific value. But as you can see from the posts of others, nobody knows all. I thought the forums were for questions, discussion and exchange of ideas, I do not think they are canonical churches with rigid rules like "forget it and stick with the default settings."

I'm trying to find a combination of settings in LAME to get a .mp3 as transparent as possible, regardless of size. For storage on android. Maybe it's silly what I do, I do not know, but it's worth trying. I'll complete the analysis with the evidence suggested by Deathcrow, which I thank, and let you draw the conclusions. Thanks for understanding and patience.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Deathcrow on 2018-10-21 00:46:01
I thought the forums were for questions, discussion and exchange of ideas, I do not think they are canonical churches with rigid rules like "forget it and stick with the default settings."

It's not forbidden to ask questions. People are just pointing out to you that it is extremely unlikely that you found some secret 'magic' settings for lame that are better than the default settings. LAME is a very mature codec, that has been worked on for many many years by people much more experienced than you in psychoaccustics.

It comes across very arrogant and exposes the Dunning-Kruger-Effect if you think you can improve general applicability by tweaking some command line settings.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: greynol on 2018-10-21 05:37:57
R3mix? dibrom?

You haven't the faintest clue how this forum started.

We aren't angry, we simply know that you have no idea what you're doing, yet you insist that you do. Please, stop wasting our time. I would say your endeavors are useless, however, they will prove useful if you come away from this learning why what you're doing is the wrong way round.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-21 22:25:42
It's not forbidden to ask questions. People are just pointing out to you that it is extremely unlikely that you found some secret 'magic' settings for lame that are better than the default settings.
You haven't the faintest clue how this forum started.
Certain extended LAME settings outsmart the default settings and preserves the original quality.

The original.wav sample was extracted from the "Alan Parsons Project - I Robot (1977) - 10 - Genesis Ch.1. V.32.wav" as you can hear in any original CD.

original.wav  = the sample extracted from the original CD file
MyEnc.mp3      = the sample encoded with my extended settings of LAME.
DefaultEnc.mp3 = the sample encoded with the default LAME settings.
Code: [Select]
1. The default settings
================================
lame original.wav DefaultEnc.mp3
================================
2. My settings
=======================================================================================================================================================================
lame.exe -ms --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 --interch 0.0002 --verbose -V0 -b256 -B320 -F --lowpass -1 --highpass 0.001 original.wav MyEnc.mp3
=======================================================================================================================================================================
C:\>lame original.wav DefaultEnc.mp3
LAME 3.100 64bits (http://lame.sf.net)
Using polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz
Encoding original.wav to DefaultEnc.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III (11x) 128 kbps qval=3
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  1169/1169  (100%)|    0:02/    0:02|    0:02/    0:02|   10.469x|    0:00
-------------------------------------------------------------------------------
   kbps        LR    MS  %     long switch short %
  128.0        1.0  99.0        96.6   1.8   1.6
Writing LAME Tag...done
ReplayGain: -8.0dB
............................................................................................
C:\>lame.exe -ms --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 --interch 0.0002 --
verbose -V0 -b256 -B320 -F --lowpass -1 --highpass 0.001 original.wav MyEnc.mp3
Warning: highpass filter disabled.  highpass frequency too small
LAME 3.100 64bits (http://lame.sf.net)
polyphase lowpass filter disabled
Encoding original.wav to MyEnc.mp3
Encoding as 44.1 kHz stereo MPEG-1 Layer III VBR(q=0)

misc:

        scaling: 1
        ch0 (left) scaling: 1
        ch1 (right) scaling: 1
        huffman search: best (outside loop)
        experimental Y=0
        ...

stream format:

        MPEG-1 Layer 3
        2 channel - stereo
        padding: all
        variable bitrate - VBR mtrh (default)
        using LAME Tag
        ...

psychoacoustic:

        using short blocks: channel coupled
        subblock gain: 1
        adjust masking: -6.8 dB
        adjust masking short: -6.8 dB
        quantization comparison: 9
         ^ comparison short blocks: 9
        noise shaping: 1
         ^ amplification: 2
         ^ stopping: 1
        ATH: using
         ^ type: 5
         ^ shape: 1 (only for type 4)
         ^ level adjustement: -7.1 dB
         ^ adjust type: 3
         ^ adjust sensitivity power: 1.000000
        experimental psy tunings by Naoki Shibata
           adjust masking bass=-8.5 dB, alto=-8.25 dB, treble=-8.025 dB, sfb21=-15.5 dB
        using temporal masking effect: no
        interchannel masking ratio: 0.0002
        ...

    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  1169/1169  (100%)|    0:03/    0:03|    0:03/    0:03|   7.6477x|    0:00
256 [   0]
320 [1169] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-------------------------------------------------------------------------------
   kbps        LR  %     long switch short %
  320.0      100.0        95.5   2.3   2.2
Writing LAME Tag...done
ReplayGain: -8.5dB

C:\>

The Results:

MyEnc.mp3 is almost identical with the original.wav and is clearly different than DefaultEnc.mp3, as you see in the ABX tests.

The BASS area in the DefaultEnc.mp3 is boosted (sounds more loud) probably due to the [ATH type 4] and/or the psychoacoustic default settings.

MyEnc.mp3 was encoded with my experimental LAME settings (including the dev settings ON), with [ATH type 5] and the psychoacoustic settings lowered to minimum. And sounds almost identical with the original.wav (no BASS boost). According with the LAME developers from 2001, the ATH type 5 is based on collected data. The other LAME ATH curves are simply based on experimental data. https://sourceforge.net/p/lame/mailman/message/4770856/

The HF 16,000 Hz-20,000 Hz area wiped out by the LAME default settings is irrelevant for people who can't hear anything in this range. Maybe the youngers may feel any differences. Not my case.

It's up to you to judge if my LAME settings are snakeoil or not. Feel free to comment.
(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_7bb8c58953aa979d0ef01aa8b9418d55;topic=116217)     (https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_5ba9cd6b30cd49d725eef39305aa3eac;topic=116217)     (https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_baebbc8faba6fde6e1f94812f974431b;topic=116217)

(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_d631fa6e86da313200771470cfd2d58d;topic=116217)     (https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_4d101ef76249511be7fccb1b5603f420;topic=116217)
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-21 23:38:32
MyEnc.mp3 is almost identical with the original.wav and is clearly different than DefaultEnc.mp3, as you see in the ABX tests.

Two problems here:

1)  You are comparing a 128k mp3 to a 320k mp3.  Most people will assume that the higher bitrate file will be at least as good as the lower bitrate file, so this is not a good comparison.

2)  In spite of the comparison presumably favoring the higher bitrate file, you failed to show that it is better.

So we have a comparison that is not useful and then a failure to get a result.   Why even post those results?
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-21 23:59:23
Two problems here:
1)  You are comparing a 128k mp3 to a 320k mp3.  Most people will assume that the higher bitrate file will be at least as good as the lower bitrate file, so this is not a good comparison.
2)  In spite of the comparison presumably favoring the higher bitrate file, you failed to show that it is better.
So we have a comparison that is not useful and then a failure to get a result.   Why even post those results?
Oops, I will test again by re-encoding the default.mp3 with the "--preset insane" included to see if the <bass boost> is still there.

So, <lame --preset insane original.wav DefaultEnc.mp3>
against
<lame.exe -ms --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 --interch 0.0002 --verbose -V0 -b256 -B320 -F --lowpass -1 --highpass 0.001 original.wav MyEnc.mp3>
is it OK?
What other tests to make?
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-22 00:16:05
What other tests to make?

https://hydrogenaud.io/index.php/topic,116217.msg963803.html#msg963803
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-22 04:37:27
https://hydrogenaud.io/index.php/topic,116217.msg963803.html#msg963803
lame --preset insane --verbose original.wav DefaultEnc.mp3
vs
lame.exe -ms --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 --interch 0.0002 --verbose -V0 -b256 -B320 -F --lowpass -1 --highpass 0.001 original.wav MyEnc.mp3
Code: [Select]
C:\>lame --preset insane --verbose original.wav DefaultEnc.mp3
LAME 3.100 64bits (http://lame.sf.net)
Using polyphase lowpass filter, transition band: 20094 Hz - 20627 Hz
Encoding original.wav to DefaultEnc.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III (4.4x) 320 kbps qval=3

misc:

        scaling: 1
        ch0 (left) scaling: 1
        ch1 (right) scaling: 1
        huffman search: best (outside loop)
        experimental Y=0
        ...

stream format:

        MPEG-1 Layer 3
        2 channel - joint stereo
        padding: off
        constant bitrate - CBR
        using LAME Tag
        ...

psychoacoustic:

        using short blocks: channel coupled
        subblock gain: 1
        adjust masking: -10 dB
        adjust masking short: -11 dB
        quantization comparison: 9
         ^ comparison short blocks: 9
        noise shaping: 1
         ^ amplification: 1
         ^ stopping: 1
        ATH: using
         ^ type: 4
         ^ shape: 0 (only for type 4)
         ^ level adjustement: -12 dB
         ^ adjust type: 3
         ^ adjust sensitivity power: 1.000000
        experimental psy tunings by Naoki Shibata
           adjust masking bass=-0.5 dB, alto=-0.25 dB, treble=-0.025 dB, sfb21=0.5 dB
        using temporal masking effect: yes
        interchannel masking ratio: 0
        ...

    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  1169/1169  (100%)|    0:03/    0:03|    0:03/    0:03|   9.1483x|    0:00
-------------------------------------------------------------------------------
   kbps        LR    MS  %     long switch short %
  320.0       88.0  12.0        95.9   2.1   1.9
Writing LAME Tag...done
ReplayGain: -8.5dB

...

C:\>lame.exe -ms --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 --interch 0.0002 --
verbose -V0 -b256 -B320 -F --lowpass -1 --highpass 0.001 original.wav MyEnc.mp3
Warning: highpass filter disabled.  highpass frequency too small
LAME 3.100 64bits (http://lame.sf.net)
polyphase lowpass filter disabled
Encoding original.wav to MyEnc.mp3
Encoding as 44.1 kHz stereo MPEG-1 Layer III VBR(q=0)

misc:

        scaling: 1
        ch0 (left) scaling: 1
        ch1 (right) scaling: 1
        huffman search: best (outside loop)
        experimental Y=0
        ...

stream format:

        MPEG-1 Layer 3
        2 channel - stereo
        padding: all
        variable bitrate - VBR mtrh (default)
        using LAME Tag
        ...

psychoacoustic:

        using short blocks: channel coupled
        subblock gain: 1
        adjust masking: -6.8 dB
        adjust masking short: -6.8 dB
        quantization comparison: 9
         ^ comparison short blocks: 9
        noise shaping: 1
         ^ amplification: 2
         ^ stopping: 1
        ATH: using
         ^ type: 5
         ^ shape: 1 (only for type 4)
         ^ level adjustement: -7.1 dB
         ^ adjust type: 3
         ^ adjust sensitivity power: 1.000000
        experimental psy tunings by Naoki Shibata
           adjust masking bass=-8.5 dB, alto=-8.25 dB, treble=-8.025 dB, sfb21=-15.5 dB
        using temporal masking effect: no
        interchannel masking ratio: 0.0002
        ...

    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  1169/1169  (100%)|    0:04/    0:04|    0:04/    0:04|   7.4718x|    0:00
256 [   0]
320 [1169] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-------------------------------------------------------------------------------
   kbps        LR  %     long switch short %
  320.0      100.0        95.5   2.3   2.2
Writing LAME Tag...done
ReplayGain: -8.5dB

C:\>
I put all the result files in archive. I can't process all results files with this abc/hr java thing. The ABX results: 18/18 positive.
(https://hydrogenaud.io/index.php?action=dlattach;sa=tmpattach;attach=post_tmp_128523_f7b7c54a5373842b071e1297d1d9f486;topic=116217)
You can process files again by restoring the archived ABC/HR session, config and results. There is my ABX test result.

My conclusion is my settings are better than the default settings, even at 320 kbps encodings. MyEnc.mp3 sounds like original.wav(flac) and sounds different than DefaultEnc.mp3. In this particular case, the HF distortions of the MyEnc.mp3 and original.wav(flac) sound identical, but the HF distortions of DefaultEnc.mp3 are different.

The differences are not very significant or annoying, I think a normal ear with a normal audio system can't hear the differences.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-22 05:38:49
Quote
ABX Results:
E:\abchr-java-0.5b\abchr-java\MyEnc.mp3 vs E:\abchr-java-0.5b\abchr-java\DefaultEnc.mp3

Do I understand correctly that you did the test wrong for the third time?
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: BrilliantBob on 2018-10-22 05:49:34
Quote
ABX Results:
E:\abchr-java-0.5b\abchr-java\MyEnc.mp3 vs E:\abchr-java-0.5b\abchr-java\DefaultEnc.mp3

Do I understand correctly that you did the test wrong for the third time?
Both samples have same bitrate

DefaultEnc.mp3    = mp3, 320 kbps, 44100 Hz, 2 channels, encoded with LAME default settings:
                      lame --preset insane --verbose original.wav DefaultEnc.mp3
                                using ATH type 4 with default psy tuning settings

MyEnc.mp3   = mp3, 320 kbps, 44100 Hz, 2 channels, encoded with extended LAME settings:
                      lame.exe -ms --ns-bass -8 --ns-alto -8 --ns-treble -8 --ns-sfb21 -16 --interch 0.0002 --verbose -V0 -b256 -B320 -F --lowpass -1 --highpass 0.001 original.wav MyEnc.mp3
                                using ATH type 5 with minimal/(or none?) psy tuning settings

What's wrong?
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: [JAZ] on 2018-10-22 20:42:44
I see you've moved from using CBR (in the first page of this thread) to using VBR with a constrained minimum bitrate so that it doesn't go lower than 256.

That simple thing is, in fact, making the encoder work with a different engine and it is, by itself alone, known to produce different results than the CBR engine.

Also, if I understand it correctly, what you are doing with that usage of the -ns-xxx settings is to increase the margin in dBs of adjacent frequencies before considering that it is masked by the stronger of both. As such, that tells the encoder to take more part of the signal as important.
The problem is... what will the encoder do when it doesn't have enough bits? Since you're making everything important, you might be pushing it to cause dropouts, a much more annoying problem.

Btw.. the "--interch" setting currently does nothing. You simply have to check the code searching for "interch". You'll see where it is read from the console, where it is defined in the presets, where it is set to the engine and... where it is completely ignore right now by the engine.
The documentation in html also says:
Quote
--interch x     Currently unused
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: saratoga on 2018-10-22 21:12:55
What's wrong?

You took two MP3 files and did an ABX of them.  That isn't useful, it just tells you that you can hear a difference between the two MP3 files, but you don't care about that. 

You said you were trying to figure out which settings are better for that one specific sample.  Is that still the case?  Then you need to do the test suggested here:

https://hydrogenaud.io/index.php/topic,116217.msg963803.html#msg963803

I suggest doing them in order too, since if the first fails the second will fail too. 
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: polemon on 2018-10-31 23:50:46
What's wrong?

Example:
You have your lossless source, let's assume it's music.flac.

You take that file and encode it twice, once with the default settings (let's call that one default.mp3), and once with your settings you wanna prove are better (call that one custom.mp3).

Now you do two ABX tests:
Now those results would be significant.

What you did instead, was ABX-ing default.mp3 vs. custom.mp3. Your result just means there is some difference between those files, which you find to be subjectively preferable over the other. It doesn't prove your settings are in any way better (or worse) than the defaults.
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: includemeout on 2018-11-02 15:08:43
Ok, being another Professor Frink claiming you found a new approach to how LAME can be "improved" - (sigh!) via spectral analysis - is kinda part of life in this community - I'd go as far as saying there is a steady annual provision of those (usually new) members!

But, throwing out of the windows the 20+ years of know-how its developers (as well other members here) have put into it and completely ignoring the great advice that's being generously given to you is just plain childish pigheadedness!
Title: Re: best mp3 encoder with something better than a command line interface?
Post by: Makaki on 2018-11-04 07:32:59
Ok, being another Professor Frink claiming you found a new approach to how LAME can be "improved" - (sigh!) via spectral analysis - is kinda part of life in this community - I'd go as far as saying there is a steady annual provision of those (usually new) members!

But, throwing out of the windows the 20+ years of know-how its developers (as well other members here) have put into it and completely ignoring the great advice that's being generously given to you is just plain childish pigheadedness!

We should convert the bits of images/photos to audio, and then compress them acoustically. /rant