Skip to main content

Topic: metamp3 - command line tool (Read 144343 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • gsa999
  • [*][*][*]
metamp3 - command line tool
Reply #75
(note that some command line options has changed, and are not backward compatible).


Can you advise which commands are NOT backward compatible. With beta 5 REACT2 does not seem to work properly. I think it might be related to the pict command

  • Nik
  • [*][*][*]
metamp3 - command line tool
Reply #76
2. It does both when specifying multiple input files, e.g. *.mp3, just like mp3gain. Only track gain when specifying one input file.

But it cannot apply both!
I understand that it calculates and writhes both in tags, but only one can be applied in global gain field, so non-ReplayGain aware players can play files with adjusted gain.

  • steve3386
  • [*]
metamp3 - command line tool
Reply #77
Quote
In addition to the features already available, I'd like to add it to automatically write SoundCheck tag values for the iPod, when it computes and writes replaygain id3tags. A useful link is here, but I must know exactly how to convert the replaygain value to a SoundCheck value in order to do that.


Tycho, the following thread has info on this.  Look at the posts from 2006-2007.  There are two programs there that copy the RG values to the soundcheck tags.  You may be able to use these in metamp3, or incorporate them into REACT2.  It sure would be great to write the RG album value to the soundcheck tag when ripping (or at least while RG tagging) so that it is all done at once.
Link

  • davelasker
  • [*][*][*]
metamp3 - command line tool
Reply #78
Quote
In addition to the features already available, I'd like to add it to automatically write SoundCheck tag values for the iPod, when it computes and writes replaygain id3tags. A useful link is here, but I must know exactly how to convert the replaygain value to a SoundCheck value in order to do that.

Also, take a look at this page. Towards the bottom you will find some perl code which converts a replaygain volume adjustment (i.e. a signed number of dB) into the hexadecimal values found in the iTunNORM tag.

The formula for converting replaygain adjustment to a soundcheck adjustment in iTunNORM is:

Code: [Select]
sc = pow(10, -rg/10) * base,

where:
rg = replaygain adjustment, in +/- dB
base = 1000 for the 1st and 2nd numbers in iTunNORM tag, and
          2500 for the 3rd and 4th numbers in iTunNORM tag
sc = value of the 1st 4 numbers in iTunNORM using the above base.

I did some experiments that indicate this is correct:
1) I manually set 1st 4 hex numbers in iTunNORM tag using the above formula and verified that iTunes's Get Info command shows the same dB adjustment.
2) I used MP3Gain to alter the volume of a track, removed its iTunNORM tag, reimported it into iTunes to generate a new iTunNORM tag, and used the inverse of the above formula
Code: [Select]
rg = -10 * log10(sc/base)
to verify that 1st 4 numbers of iTunNORM tag changed by the same amount as the MP3Gain adjustment.

Hope that helps...

Dave
  • Last Edit: 22 April, 2007, 06:26:44 PM by davelasker

  • tycho
  • [*][*][*][*]
metamp3 - command line tool
Reply #79
Thanks folks. I hope I find a few hours to implement this soon. Actually, I'd like to add an option to take the track replay gain value from the lame header and copy it to a regular id3v2 RG tag. (metamp3 is already capable to read the replaygain value created by lame in the lametag). How is then the formula to compute the album RG from a set of mp3 files with precomputed track RGs? I guess it is some kind of avaraging?

With this, we could write album RG, track RG, and SoundCheck tags, without doing any file scanning at all!

  • davelasker
  • [*][*][*]
metamp3 - command line tool
Reply #80
How is then the formula to compute the album RG from a set of mp3 files with precomputed track RGs? I guess it is some kind of avaraging?

Sorry but I don't think this is possible. To compute the album gain, you need to playback all of the album's tracks, and feed their pcm values to the replaygain algorithm. The album gain calculation essentially treats all the album's tracks as a single track, and computes that track's track gain.

You might get a rough approximation by averaging the track gain values, but it won't be the same as computing it via playback.

Dave

  • tycho
  • [*][*][*][*]
metamp3 - command line tool
Reply #81

How is then the formula to compute the album RG from a set of mp3 files with precomputed track RGs? I guess it is some kind of avaraging?

Sorry but I don't think this is possible. To compute the album gain, you need to playback all of the album's tracks, and feed their pcm values to the replaygain algorithm. The album gain calculation essentially treats all the album's tracks as a single track, and computes that track's track gain.

You might get a rough approximation by averaging the track gain values, but it won't be the same as computing it via playback.

Dave

Yep, I think you're right. I still suppose that track gains weighted with number of seconds divided on total number of seconds for the album should be pretty close, but I won't try it.

metamp3 - command line tool
Reply #82
synching / fixing soundcheck and mp3gain /metamp3  gains would be great.

I have run into problems appplying mp3 gain to soundchecked files only to find them doubley alterd when played back with soundcheck on.

when tis is ready ( the soundcheck part.
I will use tis progeam to celanup all my gain tags/levels.
for a simple radio ( track gain)  that will acutally work no matter where I play it.

  • steve3386
  • [*]
metamp3 - command line tool
Reply #83
That would be great if we could write the RG values to the soundcheck tags.  The program would be most flexible if you could choose thorugh a command line switch which RG value (track or album) to write to the soundcheck tag.  Then, for those like me that do not scale their tracks using RG track values, they could use the RG album value as the soundcheck tag.  Just my two cents.

  • gsa999
  • [*][*][*]
metamp3 - command line tool
Reply #84
I'm sure this is a really dumb question but how can I get metamp3 to work recursively through all my folders. I want it to replaygain all my mp3's

Rgds

  • tycho
  • [*][*][*][*]
metamp3 - command line tool
Reply #85
I'm sure this is a really dumb question but how can I get metamp3 to work recursively through all my folders. I want it to replaygain all my mp3's

Rgds

You can do it with a dos command batch script. But it's much simpler and faster to use foobar2000 for this  - especially when you have a dual core machine.

Also to convert RG tags to SoundCheck itunes tags, load the RG'd files into mp3tag and apply one of the RG to SC actions (you'll find the actions to use by searching in the forum).

  • jespers
  • [*]
metamp3 - command line tool
Reply #86
metamp3 seems like a nice tool for applying track- and album-gain to id3v2-tags. My only gripe with it is that no version is available for linux. I'd rather not use wine for such a processor-intensive task as calculating replaygain info.
Does anyone know of a similar tool for linux, or a port of metamp3 somewhere?

  • noorotic
  • [*]
metamp3 - command line tool
Reply #87
-tycho:  Thank You very much for this tool.. it is what I've been looking for.  I have been using ID3 but have been unable to figure out the syntax (if it is even possible) for it to write 'undefined' tags, such as Venue, etc.

I have some questions regarding correctly using metamp3 as far as when and where to use ID3v2 defined tags for things like composer, and when to define a tag within the TXXX frame (if I am even using the correct terminology).

My application is writing tags for recordings of live concerts, etc... non-commercial recordings.

Any suggestions anyone, for a forum or thread where I might find such assistance?

Thanks,

Bob 

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
metamp3 - command line tool
Reply #88
I'm certainly no expert in this field, but I would always consider the ID3v2 specs, and use the defined frames where possible (e.g.: TCOM for composer).  If you wish to store information that is not covered by any of the defined frames then, and only then, revert to using a TXXX frame.

I have referenced the 2.3 spec, as metamp3 currently writes 2.3 tags.

Edit: As another point of reference, it may be useful to take a look at the foobar2000 ID3 tag mapping.
  • Last Edit: 25 November, 2007, 02:21:16 PM by Synthetic Soul
I'm on a horse.

  • noorotic
  • [*]
metamp3 - command line tool
Reply #89
Synthetic Soul, I'd say you are about as close to expert-level as anyone.    I am using Tag for everything but ID3, including (at the moment) reading and parsing existing tags.  I do not necessarily need to be totally compatibile with Foobar2000, as I personally am using the ID3v2.3 'compatibility' setting.

I am to a point now of allowing people to add their own custom fields.  I may pre-design any of the standard fields in, but much of what might be included would be for example, taping details, who initially distributed the recording and when, etc.  These would not likely be recognized by many players, but they are more for archival purposes, and would probably be in FLAC files.  Some method of retrieving outside of a player software would be needed.  Still, I would like as much to be compatible with portable players, etc, as possible.

I appreciate your suggestions, I've read much of ID3.org.

I am very grateful to tycho.  I see many requests online for this, it would be nice if more easily found, probably.


Bob

  • bilbo
  • [*][*][*]
metamp3 - command line tool
Reply #90
Thanks folks. I hope I find a few hours to implement this soon. Actually, I'd like to add an option to take the track replay gain value from the lame header and copy it to a regular id3v2 RG tag. (metamp3 is already capable to read the replaygain value created by lame in the lametag). How is then the formula to compute the album RG from a set of mp3 files with precomputed track RGs? I guess it is some kind of avaraging?

With this, we could write album RG, track RG, and SoundCheck tags, without doing any file scanning at all!


Has this ever been implemented in metamp3?
Glass half full!

metamp3 - command line tool
Reply #91
I've noticed a weird buggy thing - I am using this to embed album art in foobar using foo_run.  I also have created a "styles" tag that is a multiple entry tag, with the entries deliminated by our pal the ';'.  Once I update the MP3 file by embedding the art, these multiple entry tags seem to be corrupted, with a tab space placed after the semicolon rather than the space which was there prior to adding the album art.

As an example, I whipped up this image - The top shows what happens once I run the tool on it, (and I just noticed it ate the ö as well.  Huh.)  The bottom shows what it should look like.  I embedded the actual tag in each example as well. 

Another odd thing is that until I actually play one of the files, these changes don't show up.  I can actually open the properties and copy the tag, then paste it back down again, and the problem goes away. 

Weird.  Any ideas?
  • Last Edit: 28 September, 2008, 04:24:55 AM by Vitriolic

  • Moonbase
  • [*]
metamp3 - command line tool
Reply #92
First, I wish to thank you, Tycho, for all your incredible efforts and for taking up suggestions and feature requests so readily! This has really become a very usable and handy tool! Also, let me thank all of the others above who helped with their testing, suggestions and requests.

I’m just playing around with metamp3 v0.92b5 and have some questions:

1. Would it be possible to completely remove a set of tag info, i.e. ID3v1?

I tried

metamp3 --1 --remove * *.mp3
and
metamp3 --1 --remove
  • *.mp3[/b]

    and it tells me about Updating ID3: <filenames> but apparently something must have been left behind:

    When doing a
    metamp3 --info *.mp3

    it tells me:
    ID3v1.1 tags:


    ID3v2.3 tags:

      TXXX: [replaygain_album_peak]: 1.180283
      TXXX: [replaygain_album_gain]: -8.79 dB
      TXXX: [replaygain_track_peak]: 1.054268
      TXXX: [replaygain_track_gain]: -8.55 dB
      TALB: Kingdom Of Rock
      TPE1: Guardian
      TBPM: 0
      TCON: Christian Rock
      TIT2: Voyager
      TRCK: 10/10
      TYER: 1996


    This can be verified with other tagging software like Mp3tag, all of these state there would be ID3v1 and ID3v2.3 tags in the file. The ID3v1 tags are nonexistant (at least not shown) after above remove, the ID3v2.3 tags still unharmed (as expected).

    What am I doing wrong?

    ---

    2. I found I was unable to remove an unknown frame SEBR from a file (list shows it).

    If it’s not my error, could you find the heart to implement something like: if doing a remove, try to find one or more tags that correspond to what the user has typed (i.e. SEBR, SE*) and, if a match was found, remove it regardless? This would allow removing non-standard tags someone left in the files.

    Of course we couldn’t add, extract, or list these (because we don’t know their structure), but being able to at least remove them would be just great and make metamp3 even more versatile!

    ---

    3. Do I understand correctly, that
    • if you use --replay-gain, only the gain is calculated and written to (ID3) tags, and nothing else is changed, and
    • if you use --apply-gain, it will do what MP3Gain does, i.e. change the audio frames?
    [/i]

    ---

    The intention of all this (for me) is, I want to do some »cleaning up«, i.e. remove ID3v1 tags completely, remove »foreign« tags like SEBR and the like, and do some album-replaygaining, all from batch files. I use ID3v2.3 with ISO-8859-1 encoding throughout, so after some research, I found your tool being »just the Good Thing«.

    Many thanks again.
  • Last Edit: 29 October, 2008, 01:53:35 AM by Moonbase
Moonbase: The Problem Solver (use link in profile)

  • tycho
  • [*][*][*][*]
metamp3 - command line tool
Reply #93
First, I wish to thank you, Tycho, for all your incredible efforts and for taking up suggestions and feature requests so readily! This has really become a very usable and handy tool! Also, let me thank all of the others above who helped with their testing, suggestions and requests.

Well, I haven't been to much help lately (for at least a year or so), but thanks anyway.

Quote
1. Would it be possible to completely remove a set of tag info, i.e. ID3v1?

Sorry, no. I think it only blanks tags in the ID3v1 block. It would have to analyse if all the tags where blanked and then remove the complete ID3v1 block. Or a specific option could do it (e.g. --remove-all-id3v1).

Quote
2. I found I was unable to remove an unknown frame SEBR from a file (list shows it).
If it’s not my error, could you find the heart to implement something like: if doing a remove, try to find one or more tags that correspond to what the user has typed (i.e. SEBR, SE*) and, if a match was found, remove it regardless? This would allow removing non-standard tags someone left in the files.

Of course we couldn’t add, extract, or list these (because we don’t know their structure), but being able to at least remove them would be just great and make metamp3 even more versatile!

Well, I'm relying on the functionality of id3lib to remove tags, which unfortunately is a little limited.
Quote
3. Do I understand correctly, that
  • if you use --replay-gain, only the gain is calculated and written to (ID3) tags, and nothing else is changed, and
  • if you use --apply-gain, it will do what MP3Gain does, i.e. change the audio frames?
[/i]

You are correct.

Quote
The intention of all this (for me) is, I want to do some »cleaning up«, i.e. remove ID3v1 tags completely, remove »foreign« tags like SEBR and the like, and do some album-replaygaining, all from batch files. I use ID3v2.3 with ISO-8859-1 encoding throughout, so after some research, I found your tool being »just the Good Thing«.

There are severe limitations in using id3lib as basis for the tool, as it has: no multi-byte characters support - only ansi, no id3v2.4 support, and it is a little buggy. I once started to implement metamp3 using TagLib instead, but it also was somewhat buggy at the time. Taglib 1.5 may be better, and I really would like to rewrite metamp3 using that (+ it would support vorbistags, ape, and aac tags). TagLib is well-written C++ code, and is therefore much easier to use and extend with e.g. specific features that you suggest. One issue with TagLib though is that it only support writing of id3 v2.4. I will have to add support for writing id3v2.3, which is the defacto id3v2 standard.  I'll let you know if/when I get this started.
  • Last Edit: 29 October, 2008, 06:40:44 AM by tycho

  • Moonbase
  • [*]
metamp3 - command line tool
Reply #94
Or a specific option could do it (e.g. --remove-all-id3v1).

Would it be a terrible effort to put this in before something new starts?

I'll let you know if/when I get this started.

Count me in for testing (or maybe help). You might want to drop me an email then, since I’m on so many forums, I might overlook it otherwise … ;-)

Cheers for the quick answers!
Moonbase: The Problem Solver (use link in profile)

  • UberNewf
  • [*]
metamp3 - command line tool
Reply #95
Hello,

===ISSUE 1===
I want to 0-pad track numbers when making MP3s with React2\ACDIR\MetaMP3\EAC. This was asked back in 2007 but I did not see an answer to it. I am a new user and I have the same problem/request. Can anyone help, please?


===ISSUE 2===
May or may not be caused by MetaMP3 but I also want to name my files like this:

      01 - A Perfect Circle - Mer de Noms - The Hollow.mp3

I tried this in my REACT.INI (in the [UserOutputNames] section), but it causes ACDIR to actually crash!

    TrackName_SA_acdir=$N - $~A - $C - $T

Any ideas (or recommendation for the proper forum <g> if not here)?

THX,
UN

  • Moonbase
  • [*]
metamp3 - command line tool
Reply #96
I just did some testing and found that metamp3 seems to be extremely »intelligent« on updating replay gain values:

I used a command like
metamp3.exe --2 --replay-gain "file1.mp3" "file2.mp3" "file3.mp3" …
on the tracks of an album that had replaygain tags before, except that I deleted them from one file, to see what it would do.

Apparently it »detected« that one file from the album had no replaygain tags and so it would have to recalculate all files in order to find an appropriate album gain. (Which it did.)

When using exact the same command again, it would just say »Updating ID3…« and be finished much faster (without re-calculating all the gains again).

Can this really be true? Did anyone verify this?

If that is really how it works – KUDOS again to Tycho!!!

And we all will have an integration with Mp3tag to do »failsafe« correct album+track replay gains on whole collections soon, hooray! (That’s what I’m currently working on, because not everyone loves foobar2000 and it tends to choke on samplers where the single titles are scattered all over the disc, i.e., if your folder structure is artist-oriented.)
  • Last Edit: 29 October, 2008, 03:50:41 PM by Moonbase
Moonbase: The Problem Solver (use link in profile)

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
metamp3 - command line tool
Reply #97
Any ideas (or recommendation for the proper forum <g> if not here)?
I think you should post your questions to the REACT 2 thread.  Issue 2 is certainly not related to metamp3 in any way (and I'm not sure that you actually believe that it is).
I'm on a horse.

  • UberNewf
  • [*]
metamp3 - command line tool
Reply #98
Any ideas (or recommendation for the proper forum <g> if not here)?
I think you should post your questions to the REACT 2 thread.  Issue 2 is certainly not related to metamp3 in any way (and I'm not sure that you actually believe that it is).


Fair 'nuf.

  • Akkurat
  • [*][*][*][*][*]
  • Developer
metamp3 - command line tool
Reply #99
The "--list-picture-types" option which is documented in metamp3.txt and in command line help doesn't work in 0.92b5. The "--list-pict-types" from older versions works.