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 Documentation errors and suggestions (Read 15481 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

LAME Documentation errors and suggestions

Reply #25
JAZ, that looks very nice.

Maybe someone can explain the following, or clarify:

Code: [Select]
-b number       Specify a minimum allowed bitrate. default 32 kbps
-F              Strictly enforce the -b option, for use with players that do not support low bitrate mp3


I don't understand the need to 'strictly enforce' -b, at least by the wording. If you set a minimum _allowed_ bitrate with -b, why isn't that sufficient?

Code: [Select]
-T              Enable and force writing LAME Tag


I thought the LAME tag was written by default.

Code: [Select]
-t               Disable VBR informational tag

If -t is used (disable wav header), LAME will output raw pcm in native endian format (use -x to swap bytes).


Do I understand correctly that -t has two completely different uses, depending on whether you're encoding or decoding?

Code: [Select]
-t Disable VBR tag or disable WAV header

When encoding to VBR, this setting enables writing the VBR Tag.


This seems to be saying opposite things.

Code: [Select]
--ignore-tag-errors
Put it before any tag setting.


I never knew (or thought) that would be necessary.




LAME Documentation errors and suggestions

Reply #26
Maybe someone can explain the following, or clarify:

Code: [Select]
-b number       Specify a minimum allowed bitrate. default 32 kbps
-F              Strictly enforce the -b option, for use with players that do not support low bitrate mp3


I don't understand the need to 'strictly enforce' -b, at least by the wording. If you set a minimum _allowed_ bitrate with -b, why isn't that sufficient?

Without -F, LAME will still use 32 Kbps for digital silence. MP3 files encoded this way are still considered CBR by most players, but -F causes LAME to use the -b bitrate even for digital silence in case you have a player that is really strict about CBR MP3 files being 100% CBR. Perhaps a short note to this effect should be included for the -F switch? i.e. :

Code: [Select]
-F          Strictly enforce the -b option even for passages of digital silence, for use with players that do not support low-bitrate MP3.

...or something.

LAME Documentation errors and suggestions

Reply #27
How about:

Code: [Select]
-b number    Specify a minimum allowed bitrate, in kbps, for non-silent frames. Default: 32
-F           Enforce -b option for silent frames, rather than encoding them at 8 or 32 kbps.


The detailed info can be used to explain that -F is for decoders that don't support low bitrates. (what decoders are those?)

LAME Documentation errors and suggestions

Reply #28
in detailed.html:

flexability -> flexibility
Set the byte endiannes to big -> Set the byte order to big-endian.
birtrate -> bitrate
preffer -> prefer
Set the byte endiannes to little.-> Set the byte order to little-endian.
commandline -> command-line
samplerate -> sample rate
samplerates -> sample rates
preced -> precede
huffman encoding -> Huffman coding
Dont -> Don't
undesiderable -> undesirable (occurs twice)
complience -> compliance

LAME Documentation errors and suggestions

Reply #29
thanks JJZolx, Aleron Ives and mjb2006.

I've added the spelling fixes and better description of the -b, -F and -t settings (yes, -t setting has two different meanings. It's explained in the long detail).

About the --ignore-tag-errors, it is explained also in the long detail why it is needed (by default, encoding fails if you have an error in the tag).

the -T setting is a bit more complicated to explain. It says in the long detail that overrides the user of the -t setting (so -t -T equals -T), but I believe it also is needed for low bitrate CBR, where LAME does not write it because the LAME tag is bigger than the smaller CBR frames.
Can anyone confirm this?

Also, can anyone confirm that if using the -t setting with a CBR file, the LAME tag is not written?  (that would put three meanings to the -t setting )

LAME Documentation errors and suggestions

Reply #30
I was aware of the --ignore-tag-errors option and have actually used it, but this is the first time I've ever seen it said that it needs to be the first option.

Are the 'LAME tag' and the 'VBR informational tag' the same thing?

LAME Documentation errors and suggestions

Reply #31
Are the 'LAME tag' and the 'VBR informational tag' the same thing?

I don't know w.r.t. the tag-disabling options in LAME, but here's what I wrote in the MP3 article in the wiki:

Quote
MP3 files often begin with a single frame of silence which contains an extra header that, when supported by decoders, results in the entire frame being treated as informational instead of being played. The extra header is in the frame's data section, before the actual silent audio data, and was originally intended to help with the playback of VBR files. Among other things, this header specifies a table of seek points which help players jump to approximate points in the file.

Xing and Fraunhofer each developed their own formats for this header. The Xing-format header is just called the Xing header or XING header. The Fraunhofer-format header is called the VBRI or VBR Info header. In addition to the seek-point table, the Fraunhofer format contains a combined encoder delay & padding value (measured in samples), which can assist gapless playback.

The LAME encoder further extended the Xing format to work for CBR and to include encoder settings and separate delay & padding values. This version of the Xing header is called the LAME header or LAME tag. It has an explicit specification, but the Xing and Fraunhofer formats can only be inferred from the C code the companies provided to read the headers.


However if you look at the LAME tag spec...more precisely, the LAME tag is a specific portion ("Zone C") of the LAME version of the Xing header; it's the LAME-specific info aside from 1. the LAME version string and 2. the "Info" instead of "Xing" string near the beginning in Zone A.

LAME Documentation errors and suggestions

Reply #32
Sorry for my bad English. Some questions...

Quote
Hydrogenaudio recommended settings
Best quality, "archiving": -b 320


Why do you say "archiving" while it implies lossless compression?

Also statement about best quality isn't entirely true. To be true we must said that best possible quality can be achieved with additional -q 0 switch
I know that most people can't tell the difference between tracks encoded with/without this switch, but I think we must be honest with users


add:

Maybe I'm wrong, but:

Quote
-Y Ignore noise in sbf21, like CBR mode does

Allows -V2, -V1 and -V0 to not to encode the highest frequencies accurately, if doing so causes disproportional increases in bitrate. This is the same that CBR and ABR modes do.
Due to the design of the MP3 format, to keep precision in the last scalefactor band, an encoder needs to increase the precision in all the bands (not only in this one).
The consequence is an increase of bitrate (+60kbps in some cases) compared to not keeping that precision. Generally, this band should allow for distortions, so using it shouldn't cause harm.


Are you sure that 3.98.4 in CBR mode ignores the noise in sbf21?

lame -b 320:


lame -V0:


lame -V0 -Y:
🇺🇦 Glory to Ukraine!

LAME Documentation errors and suggestions

Reply #33
The "scalefac_scale" feature is an entirely different beast.

LAME Documentation errors and suggestions

Reply #34
Are you sure that 3.98.4 in CBR mode ignores the noise in sbf21?


Scalefac_scale is a flag switching the band quantization step size on a per-block basis (unless EncSpot uses some sort of its own terminology). It is not related to global gain, which can be used to control the band 21 representation precision.

The simplified mp3 requantization formula is something like this:

y = x*2**(0.25*(global_gain-210))*2**-(scalefac_scale*band_scalefactor)

global_gain may take values from 0 to 255, scalefac_scale is either 0.5 or 1, and band_scalefactor may be 0 to 15 (0 to 7 for higher frequencies). For band 21 band_scalefactor is always 0, so scalefac_scale should not affect it either.

So, the use of scalefac_scale does not indicate that the sfb21 adjustment was performed. I'm not sure why specifying -Y with -V0 results in scalefac_scale not being used though.


LAME Documentation errors and suggestions

Reply #35
Thanks, sorry for confusing
🇺🇦 Glory to Ukraine!

LAME Documentation errors and suggestions

Reply #36
I for myself know how it could be meant. I never saw someone qualifiying mp3 encoding capabilities by these terms, so it may be irritating.

Edit: and yes, greynol. This user MNT seems to find mp3 encoding problems regulary on this hard to encode metal alike music afaik. This music isn´t meant to be listened "quiet" by nature


It's a that the start of Spill The Blood by Slayer is a problem with LAME, due to the harpicord intro.

I also listen to older Electronic music such as Kraftwerk and Skinny Puppy aswell, which produces worse artifacts then any metal music. I even ABXed some New Wave tracks from Devo and Gary Numan at V2, due to horrid drum smearing, which are lot more quiter then Slayer.
"I never thought I'd see this much candy in one mission!"

LAME Documentation errors and suggestions

Reply #37
Quote
...in VBR mode, the -q switch does ABSOLUTELY NOTHING from -q 0 to -q 4...nothing


Is there some scaling down information from this point, -q 5, that can be documented?

Also for a suggestion for the docs, have the 'exact' command line equivalent of the presets.
True that the vast majority of users would not need or want to know these, but for the few.

LAME Documentation errors and suggestions

Reply #38
Do you mean the table in the wiki?

http://wiki.hydrogenaudio.org/index.php?ti...ate.29_settings.


And I don't know what you mean with "some scaling" on -q 5. If you mean to know what internal variables does the -q setting affect, I believe that's not something that should be in a user manual.
If you simply mean which other -q settings have an effect when using VBR, it just has two settings:  -q 0 to q 4, and -q 5 to -q9




 

LAME Documentation errors and suggestions

Reply #42
Can someone upload the LAME documentation to HA?
🇺🇦 Glory to Ukraine!