HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: DJ Graco on 2024-02-16 09:51:42

Title: Foobar does not report the LAME version in some MP3 files
Post by: DJ Graco on 2024-02-16 09:51:42
Hi,
I noticed that when I encode an MP3 file from the command line, the foobar in selection properties will correctly report the LAME version. However, for other MP3 files, foobar does not do this, while Media Info does.
Attached are two audio files, one with the LAME version visible, the other only via Media Info.
Title: Re: Foobar does not report the LAME version in some MP3 files
Post by: Peter on 2024-02-19 08:46:27
Thanks for the problem report.
sample2.mp3 appears to have been altered by another tool after encoding; MP3 payload does not start with a valid LAME header frame.
It is possible to recover LAME version info, but doing so requires inspecting more of file content, which is what MediaInfo seems to be doing.
Title: Re: Foobar does not report the LAME version in some MP3 files
Post by: DJ Graco on 2024-02-21 09:57:55
Sample1 file was encoded with lame.exe from wav. Sample2 is the result of cutting the file in MP3 direct cut, but the original file also does not show the LAME version. If you want, I can send you the original file from which the sample2 cut comes.
Some programs, e.g. Gold Wave, save files like sample2 in this way.
Title: Re: Foobar does not report the LAME version in some MP3 files
Post by: Peter on 2024-02-21 14:57:33
Please share short unmodified sample from LAME, and exact commandline used to create it.
Thanks.
Title: Re: Foobar does not report the LAME version in some MP3 files
Post by: DJ Graco on 2024-02-21 15:23:41
sample1.mp3 was encoded in commandline with:
Code: [Select]
-b 320 "path\to\sample1.wav"
The file from which I cut sample2 comes from this website.
https://promodj.com/denis-first-vladlen-reznikov/remixes/6422087/Deepend_feat_Graham_Candy_Waiting_For_The_Summer_Denis_First_Radio_Remix

However, I could encode such a file from a wav using, for example, GoldWave. This is just one example, as there are more programs that encode files this way. A file encoded with GoldWave does not report the LAME version in foobar2000, MediaInfo says the LAME version is 3.99.5.
I attached  two files, one is the source WAV for sample1, two is an unmodified file encoded with GoldWave.
Title: Re: Foobar does not report the LAME version in some MP3 files
Post by: Peter on 2024-02-29 12:24:52
I tried encoding sample1.wav with various LAME builds, using -b 320 commandline; foobar2000 can always read LAME version info from the resulting MP3.
Offending files where foobar2000 can't determine version info are all missing LAME tag - an extra header packed into MP3 frame that LAME writes by default.

What exact LAME build are you using? Are you sure you're not using "-t" option which disables LAME header writing?

Determining LAME info from files without LAME tag is possible but requires reading further into the file, which I'm reluctant to do.
Title: Re: Foobar does not report the LAME version in some MP3 files
Post by: DJ Graco on 2024-03-02 09:24:06
I am using LAME v3.100.1.
However, as I have already written, files generated by this version are correctly reported by foobar2000. I was curious why fb2k doesn't report the LAME version in some files. Now I know that some encoders, e.g. LAME in GoldWave (3.99.5), do not save the LAME version in the initial frames of the MP3 file.
Now I know that to recover the LAME version from such encoded files, I need to read them more deeply.
Peter, you will do what you think is right.