LAME Tag Reader, command line utility |
- No over 30 sec clips of copyrighted music.
- No copyrighted software without permission.
- Click here for complete Hydrogenaudio Terms of Service
![]() ![]() |
LAME Tag Reader, command line utility |
Sep 29 2003, 22:28
Post
#1
|
|
![]() Group: Members (Donating) Posts: 345 Joined: 26-February 03 From: Norwich, UK Member No.: 5189 |
I have created LameTag.exe, a little command line application that displays the values from the LAME tag for an mp3 file. The first beta version, 0.1.0, is attached.
This was inspired by John33's new compile of LAME 3.90.3 that now writes the preset used into a field in the LAME tag (see this thread). Encspot doesn't show this field when it displays the LAME tag, so I wrote this to provide a way it can be viewed. This is my first attempt at programming anything to do with audio files so it may have its faults. Please feel free to pass on any comments or bug reports via this thread. Hope you like it. EDIT: now hosted at http://phwip.wordpress.com This post has been edited by phwip: May 15 2007, 23:42 |
|
|
|
Sep 29 2003, 23:09
Post
#2
|
|
![]() Group: Members Posts: 480 Joined: 1-December 02 Member No.: 3949 |
just tested it, works flawlessly on win xp.
thanks, man |
|
|
|
Sep 29 2003, 23:51
Post
#3
|
|
|
Group: Members Posts: 84 Joined: 1-December 02 Member No.: 3951 |
would you share the sourcecode? i would compile or port it to linux if possible.
BadHorsie |
|
|
|
Sep 29 2003, 23:57
Post
#4
|
|
![]() xcLame and OggDropXPd Developer Group: Developer Posts: 3419 Joined: 30-September 01 From: Bracknell, UK Member No.: 111 |
Works fine here too!!
-------------------- John
---------------------------------------------------------------- My compiles and utilities are at http://www.rarewares.org/ |
|
|
|
Sep 30 2003, 00:18
Post
#5
|
|
![]() Group: Members (Donating) Posts: 345 Joined: 26-February 03 From: Norwich, UK Member No.: 5189 |
I'm quite happy to share the source code but it's Delphi (5), so I guess the only way to port it would be to use Kylix. I don't know much about that or whether it would transfer easily. Anyway I will attach it to this message. Also I have used a class and another routine from the open source Project Jedi JCL. Don't know if that will complicate things more. The routine (TestBit) is a one liner so I that could just be copied across. The class (TJCLFileVersionInfo) is simply used to get the Title information (description, version, compile date, etc.) from the version info resource. EDIT: now hosted at http://www.silisoftware.com/applets/LameTag (the main zip file includes the source) This post has been edited by phwip: Jan 17 2004, 11:35 |
|
|
|
Sep 30 2003, 00:53
Post
#6
|
|
|
Group: Members Posts: 84 Joined: 1-December 02 Member No.: 3951 |
thanks so far. i never touched delphi sources before but i'm shure i can destroy anything
BadHorsie |
|
|
|
Sep 30 2003, 09:09
Post
#7
|
|
![]() LAME developer Group: Developer Posts: 2950 Joined: 1-October 01 From: Nanterre, France Member No.: 138 |
Seems to work fine.
You might want to also display the ReplayGain value (stored by Lame 3.94) |
|
|
|
Sep 30 2003, 14:39
Post
#8
|
|
|
Group: Members Posts: 1356 Joined: 25-November 02 Member No.: 3873 |
QUOTE (Gabriel @ Sep 30 2003, 12:09 AM) Seems to work fine. You might want to also display the ReplayGain value (stored by Lame 3.94) is LAME 3.94 already out yet? -------------------- --alt-presets are there for a reason! These other switches DO NOT work better than it, trust me on this.
LAME + Joint Stereo doesn't destroy 'Stereo' |
|
|
|
Sep 30 2003, 16:09
Post
#9
|
|
![]() xcLame and OggDropXPd Developer Group: Developer Posts: 3419 Joined: 30-September 01 From: Bracknell, UK Member No.: 111 |
QUOTE (Jojo @ Sep 30 2003, 01:39 PM) QUOTE (Gabriel @ Sep 30 2003, 12:09 AM) Seems to work fine. You might want to also display the ReplayGain value (stored by Lame 3.94) is LAME 3.94 already out yet? Only as an alpha. -------------------- John
---------------------------------------------------------------- My compiles and utilities are at http://www.rarewares.org/ |
|
|
|
Sep 30 2003, 16:38
Post
#10
|
|
![]() Group: Members Posts: 232 Joined: 28-November 02 From: Old Europe, Germany, Trier (since 16 B.C.) Member No.: 3916 |
QUOTE (john33 @ Sep 30 2003, 07:09 AM) QUOTE (Jojo @ Sep 30 2003, 01:39 PM) is LAME 3.94 already out yet? Only as an alpha. Will there ever be a final version......................................no (guess) (Please don't react on this post. Only ignore it.) |
|
|
|
Sep 30 2003, 18:12
Post
#11
|
|
![]() Group: Members (Donating) Posts: 345 Joined: 26-February 03 From: Norwich, UK Member No.: 5189 |
QUOTE (Gabriel @ Sep 30 2003, 09:09 AM) Seems to work fine. You might want to also display the ReplayGain value (stored by Lame 3.94) No problem. I only left it out because I didn't think it was used by any implementation of ReplayGain for mp3 (the only ones I am aware of being MP3Gain and Foobar2000, both of which store values in APEv2 tags AFAIK). And I wanted to save time. I haven't used Lame 3.94 so didn't realise the field was stored in that case. I will try and create a new release in the next week or so. Should I also include the MP3Gain field from the LAME tag? This doesn't seem to be used by the current implementation of MP3Gain, and I thought it might be confusing if people had MP3Gained their files and then the LAME tag reader displayed this value as zero. |
|
|
|
Oct 1 2003, 10:05
Post
#12
|
|
![]() LAME developer Group: Developer Posts: 2950 Joined: 1-October 01 From: Nanterre, France Member No.: 138 |
QUOTE Should I also include the MP3Gain field from the LAME tag? This doesn't seem to be used by the current implementation of MP3Gain, and I thought it might be confusing if people had MP3Gained their files and then the LAME tag reader displayed this value as zero. Don't know. Perhaps you could display it with the value "not filed" instead of "0" |
|
|
|
Oct 6 2003, 00:16
Post
#13
|
|
![]() Group: Members (Donating) Posts: 345 Joined: 26-February 03 From: Norwich, UK Member No.: 5189 |
Here's the second beta release: 0.2.0, which includes the ReplayGain and MP3Gain fields from the LAME tag. This means that now all of the information that is stored in the tag is displayed.
EDIT: now hosted at http://www.silisoftware.com/applets/LameTag This post has been edited by phwip: Jan 17 2004, 11:35 |
|
|
|
Oct 6 2003, 00:30
Post
#14
|
|
![]() Group: Members (Donating) Posts: 345 Joined: 26-February 03 From: Norwich, UK Member No.: 5189 |
Here is the source for release 0.2.0 beta.
As well as adding in reading of the ReplayGain and MP3Gain fields I have made major changes to the structure of the code. This is because I wrote 0.1.0 in a bit of a rush, without expecting anybody would want to see the code, and quite frankly it was a bit of a mess. The changes should make it much easier to read. I have separated out the code into three areas. The first (BasicLameTagReader.pas) handles reading the file and returning the basic field values. The second (DescriptiveLameTagReader.pas) handles formatting the field values for display including converting internal enumerators to descriptions. The third (LameTag.dpr) contains the code for the command line application. Although the code has been largely restructured, behind the scenes it is doing the same as before. However, if you are interested in using this code I would strongly recommend you use this version instead the old one. Also, if you do want to make use of this code in any way I would appreciate if you would let me know: just add a reply to this thread. Thanks. EDIT: now hosted at http://www.silisoftware.com/applets/LameTag (the main zip file includes the source) This post has been edited by phwip: Jan 17 2004, 11:36 |
|
|
|
Oct 6 2003, 01:19
Post
#15
|
|
![]() Group: Members Posts: 480 Joined: 1-December 02 Member No.: 3949 |
@gabriel:
EDIT: removed my questions, I answered them to myself. @phwip: great work This post has been edited by amano: Oct 6 2003, 01:59 |
|
|
|
Oct 6 2003, 01:40
Post
#16
|
|
![]() Group: Members (Donating) Posts: 3452 Joined: 7-November 01 From: Strasbourg (France) Member No.: 420 |
rarewares website.
|
|
|
|
Oct 6 2003, 01:57
Post
#17
|
|
![]() Group: Members Posts: 480 Joined: 1-December 02 Member No.: 3949 |
ok, checked the lame alpha 14 on rarewares:
This is my result for lame alpha 14 --alt-preset standard -Y LameTag - Reads the LAME tag from an mp3 file Copyright © 2003 phwip Release 0.2.0 beta, compiled 2003-10-06 Quality: 57 (V4 and q3) Version string: 3.94a Tag revision: 0 Encoding method: vbr old / vbr rh Lowpass: 19.000Hz Replay Gain PSA: <not stored> RG track gain: -13.5dB (determined automatic RG album gain: <not stored> nspsytune: yes nssafejoint: yes nogap continued: no nogap continuation: no ATH type: 4 Bitrate: <unknown> Encoder delay: 576 samples Padded at end: 1.284 samples Noise shaping: 1 Stereo mode: joint Unwise settings: no Source sample freq: 44.1kHz MP3Gain change: <none> Preset: standard Surround info: none Music length: 7.037.204 bytes Music CRC: B8D8 Info tag CRC: 2E75 |
|
|
|
Oct 6 2003, 02:14
Post
#18
|
|
![]() Group: Members Posts: 480 Joined: 1-December 02 Member No.: 3949 |
now I really got interested.
now that lame obviously can calculate RG values and has a proper MP3gain tag. are there any switches to MP3gain my music? |
|
|
|
Oct 6 2003, 09:16
Post
#19
|
|
![]() Group: Members (Donating) Posts: 345 Joined: 26-February 03 From: Norwich, UK Member No.: 5189 |
No, I don't think so. From the LAME Tag specs about the MP3Gain field:
QUOTE only tools like mp3gain should use this field, as it is made for making lossless adjustments to the mp3 after encoding is finished. No need to support this in LAME or any decoder at all.
|
|
|
|
Nov 12 2003, 09:34
Post
#20
|
|
![]() Group: Members Posts: 127 Joined: 19-April 03 Member No.: 6057 |
Cooool tool - This like X-Mas in November !
It even runs on my simple php featured web server ;=) (well, C/C++ is too difficult to me...) Thank You very much! - I often use tools like Mp3Trim or EncSpot. Due to any suspicious but 'functional' MP3 header manipulation, (=> http://www.hydrogenaudio.org/forums/index....showtopic=14974 ) often the Lame tag wasn't readable any longer after cutting off some frames - till now ! Thx again & please keep this project alive! 384kbps |
|
|
|
Nov 18 2003, 10:15
Post
#21
|
|
|
Group: Members Posts: 1209 Joined: 5-October 01 Member No.: 220 |
This could be useful to expand another open source project
|
|
|
|
Nov 18 2003, 10:37
Post
#22
|
|
![]() Group: Members (Donating) Posts: 345 Joined: 26-February 03 From: Norwich, UK Member No.: 5189 |
QUOTE (westgroveg @ Nov 18 2003, 10:15 AM) This could be useful to expand another open source project Anybody is free to use the source code in any other project they wish. Unfortunately I don't know VB well enough to translate the code to it. The LAME Tag specs are simple enough and documented well enough that I would imagine it would be easier for somebody to rewrite this from scratch in VB than translate, unless somebody happens to know both VB and Delphi very well. QUOTE (384kbps @ Nov 12 2003, 09:34 AM) Thx again & please keep this project alive! Glad you are finding it useful. I am happy to make changes if any are needed. But I can't see anything else that would need doing: all information in the LAME Tag is being displayed. And I can't imagine the LAME Tag spec is likely to change. |
|
|
|
Nov 18 2003, 10:54
Post
#23
|
|
|
Group: Members Posts: 1209 Joined: 5-October 01 Member No.: 220 |
QUOTE (phwip @ Nov 18 2003, 09:37 PM) I am happy to make changes if any are needed. But I can't see anything else that would need doing: all information in the LAME Tag is being displayed. And I can't imagine the LAME Tag spec is likely to change. QUOTE It's not --nogap or any other useless hack like that, LAME 3.90 and above stores gapless playback info in LAME tag by default. Most of files encoded with recent LAME you possibly have will play gaplessly without any crossfade / guessing amount of silent samples / etc. Can this be reported? |
|
|
|
Nov 18 2003, 10:56
Post
#24
|
|
![]() LAME developer Group: Developer Posts: 2950 Joined: 1-October 01 From: Nanterre, France Member No.: 138 |
QUOTE And I can't imagine the LAME Tag spec is likely to change. It is. There is an issue with the replaygain values in the current version. |
|
|
|
Nov 18 2003, 11:12
Post
#25
|
|
![]() Group: Members (Donating) Posts: 345 Joined: 26-February 03 From: Norwich, UK Member No.: 5189 |
QUOTE (westgroveg @ Nov 18 2003, 10:54 AM) QUOTE It's not --nogap or any other useless hack like that, LAME 3.90 and above stores gapless playback info in LAME tag by default. Most of files encoded with recent LAME you possibly have will play gaplessly without any crossfade / guessing amount of silent samples / etc. Can this be reported? I am presuming (but may be wrong about this) that the gapless playback info mentioned here is referring to the two encoder delay values which are already reported by LameTag.exe as "Encoder delay" and "Padded at end". |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st November 2009 - 15:22 |