Convert replaygain to iTunes/iPod volume?, Can this be done & does it make sense? |
This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).
![]() ![]() |
Convert replaygain to iTunes/iPod volume?, Can this be done & does it make sense? |
Jun 7 2006, 00:55
Post
#26
|
|
![]() Group: Members (Donating) Posts: 391 Joined: 2-March 04 Member No.: 12414 |
It's just a comment frame with the description iTunNORM, nothing weird about that.
Mp3tag can add "dummy" iTunNORM comment fields, but it must be done in a certain way. In can't be done in foobar because it doesn't support ID3v2 comment frame descriptions. |
|
|
|
Aug 18 2006, 21:14
Post
#27
|
|
|
Group: Members Posts: 177 Joined: 13-December 02 From: USA Member No.: 4068 |
What's this certain way of adding the dummy tag using Mp3tag? I don't want iTunes to rewrite my tags...
|
|
|
|
Aug 18 2006, 22:09
Post
#28
|
|
![]() Group: Members (Donating) Posts: 391 Joined: 2-March 04 Member No.: 12414 |
Ok, some time has passed and it has become a bit easier now, but you need the version 2.36d from http://developer.mp3tag.de/
1. Select your files and press ALT+T 2. Create a new field with the name COMMENT ITUNNORM 3. Fill in a fake soundcheck value like: " 00000F0A 000003E2 000054FF 00003C89 00008AFA 00006158 0000842C 000084CF 0002FF0A 0001DDC1" (without the " signs) Note: There is a space at the beginning of the value! |
|
|
|
Sep 21 2006, 05:21
Post
#29
|
|
![]() Group: Members Posts: 10 Joined: 10-September 06 From: Seattle, WA, US Member No.: 35012 |
For those who use linux, or have cygwin installed, I wrote a nice script for ipodrg (using album replaygain):
CODE #!/bin/bash find -regex '^.*\.mp3$' > file_list for i in $(seq 1 $(wc file_list | awk '{print $1}')); do FILE=$(head -n${i} file_list | tail -n1) ipodrg "${FILE}" a done rm file_list Just put your ipodrg executable in /usr/local/bin. Many thanks to Johan! Now I just have to figure out how to get rid of those squares at the end of tags in iTunes, when the tags were written in foobar. I had my fingers crossed that iTunes 7 would fix this, but I was let down. Mark |
|
|
|
Sep 25 2006, 17:06
Post
#30
|
|
|
Group: Members Posts: 3 Joined: 19-September 06 Member No.: 35368 |
Ok, some time has passed and it has become a bit easier now, but you need the version 2.36d from http://developer.mp3tag.de/ 1. Select your files and press ALT+T 2. Create a new field with the name COMMENT ITUNNORM 3. Fill in a fake soundcheck value like: " 00000F0A 000003E2 000054FF 00003C89 00008AFA 00006158 0000842C 000084CF 0002FF0A 0001DDC1" (without the " signs) Note: There is a space at the beginning of the value! OK, dano & I recently worked out that this only works in mp3tag if you use the iso option for ID3 v2.3 Tag. UTF 16 & UTF 8 will create the field & value but ipodrg.exe couldn't recognize that as an itunesNorm tag, you'll get an error message, soundcheck tag missing or similar. I have still one problem: Johan's command line only works in the cmd windows FOR /R %1 IN (*.mp3) DO ipodrg.exe "%1" a >> "C:\Replaylog.txt" If I put this code into a batch file like this it doesn't work for syntactical reason => (*.mp3) doesn't work at this point for syntactic reasons. Do you have a tip that it will work in a batch file? Thanks Wolfgang Batch (the path ipodrg.exe is already set in the environment) del "C:\Replaylog.txt" c: cd "\1980" FOR /R %1 IN (*.mp3) DO ipodrg.exe "%1" a >> "C:\Replaylog.txt" This post has been edited by W.A.B.: Sep 25 2006, 17:09 |
|
|
|
Dec 9 2006, 00:21
Post
#31
|
|
|
RealNetworks Sr. Codec Engineer Group: Developer (Donating) Posts: 89 Joined: 12-June 03 From: Seattle Member No.: 7151 |
It's too bad ipodrg does not work with MPEG4 tags
This post has been edited by karl_lillevold: Dec 9 2006, 00:29 -------------------- Sr. Codec Engineer (video) | RealNetworks Codec Group | helixcommunity.org
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion. |
|
|
|
Dec 20 2006, 15:22
Post
#32
|
|
![]() Group: Members (Donating) Posts: 391 Joined: 2-March 04 Member No.: 12414 |
It's now also possible to use only Mp3tag for the job (v2.37c required). Works also for AAC in mp4 container.
If you have added RG-tags with foobar2000, you can get the sound check values with the new $rg2sc() function: $rg2sc(%REPLAYGAIN_TRACK_GAIN%) $rg2sc(%REPLAYGAIN_ALBUM_GAIN%) |
|
|
|
Dec 20 2006, 15:55
Post
#33
|
|
![]() Group: Members Posts: 241 Joined: 16-October 03 Member No.: 9335 |
It's now also possible to use only Mp3tag for the job (v2.37c required). Works also for AAC in mp4 container. If you have added RG-tags with foobar2000, you can get the sound check values with the new $rg2sc() function: $rg2sc(%REPLAYGAIN_TRACK_GAIN%) $rg2sc(%REPLAYGAIN_ALBUM_GAIN%) Sounds great :-) What's the preferred working order to prevent iTunes from touching any of the tags? Should SoundCheck be enabled before or after the values are converted in Mp3tag? |
|
|
|
Jan 1 2007, 22:16
Post
#34
|
|
|
RealNetworks Sr. Codec Engineer Group: Developer (Donating) Posts: 89 Joined: 12-June 03 From: Seattle Member No.: 7151 |
It's now also possible to use only Mp3tag for the job (v2.37c required). Works also for AAC in mp4 container. Pretty nice. Seems to work as expected. However, interaction with iTunes is problematic: 1) iTunes does not re-read the tag after it's been modified with mp3tag, probably since iTunes keeps the tag info in its own database. 2) If deleting the files from the iTunes database, then re-importing the songs, iTunes recalculates and overwrites the ITUNNORM tag. Thus, back to square one... -------------------- Sr. Codec Engineer (video) | RealNetworks Codec Group | helixcommunity.org
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion. |
|
|
|
Jan 2 2007, 00:26
Post
#35
|
|
![]() Group: Members (Donating) Posts: 391 Joined: 2-March 04 Member No.: 12414 |
I currently have iTunes 7.0.2.16
1) It reads the tag again if I do right click > Information or if I just play the file it uses the new volume. 2) Also negative here. No recalculation is done. Note: For mp3 you must use iso-8859-1 tag encoding in Mp3tag at the moment and AAC files should have m4a extension. |
|
|
|
Jan 2 2007, 00:52
Post
#36
|
|
|
RealNetworks Sr. Codec Engineer Group: Developer (Donating) Posts: 89 Joined: 12-June 03 From: Seattle Member No.: 7151 |
dano: I think my "Replace with regular expression" function is not set up correctly in mp3tag... After I run it, ITUNNORM changes to 000003E8 000003E8 ... ... ... no matter what the RG album gain is. Could you please indicate how you are using the function in mp3tag?
-------------------- Sr. Codec Engineer (video) | RealNetworks Codec Group | helixcommunity.org
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion. |
|
|
|
Jan 2 2007, 01:43
Post
#37
|
|
![]() Group: Members (Donating) Posts: 391 Joined: 2-March 04 Member No.: 12414 |
|
|
|
|
Jan 2 2007, 01:53
Post
#38
|
|
|
RealNetworks Sr. Codec Engineer Group: Developer (Donating) Posts: 89 Joined: 12-June 03 From: Seattle Member No.: 7151 |
Excellent. Everything works fine now. Thanks!
-------------------- Sr. Codec Engineer (video) | RealNetworks Codec Group | helixcommunity.org
This information is provided "AS IS" with no warranties, grants no rights, and reflects my personal opinion. |
|
|
|
Jan 7 2007, 10:31
Post
#39
|
|
|
Group: Members (Donating) Posts: 90 Joined: 30-July 03 From: New Zealand Member No.: 8083 |
So let's say I wanted to do the following:
1. Run ReplayGain calculation (in either Album or Track mode - specifiable) and write the relevant values to ID3 or APE tags. 2. Read the tags just created and write the COMMENT ITUNNORM tag (based on the RG to SC formula). And I wanted to do it in Windows, via a batch file or preferably, VBScript. I'm not opposed to writing something myself if such a mechanism doesn't already exist, but I'm keen to leverage what I can. Any suggestions? |
|
|
|
Feb 13 2007, 20:23
Post
#40
|
|
|
Group: Members Posts: 1 Joined: 13-February 07 Member No.: 40593 |
An extra tip, you should place the directory location of ipodrg.exe in the PATH environment variable. Then it can be executed easily from every directory. -change the path permanently in System Properties, Advanced, Environment variable -or type: CODE set PATH=%PATH%;c:\utils in the Command Promptand place ipodrg.exe in c:\utils Hi. Im trying to make batch file for ipodrg.exe whole day, but it is still not working... Can you please, send me full example of batch file and settings? (i thought it would be easy, but i cant figure it out...) thanks --- And one more question: does replaygain and soundcheck save to same id3 field? Or if I add replaygain info and iTunes rewrites my mp3s soundcheck info, I can get it back by running ipodrg batch again? This post has been edited by riffmaker: Feb 13 2007, 22:35 |
|
|
|
Apr 18 2007, 04:24
Post
#41
|
|
|
Group: Members Posts: 3 Joined: 29-January 06 Member No.: 27406 |
An extra tip, you should place the directory location of ipodrg.exe in the PATH environment variable. Then it can be executed easily from every directory. -change the path permanently in System Properties, Advanced, Environment variable -or type: CODE set PATH=%PATH%;c:\utils in the Command Promptand place ipodrg.exe in c:\utils Hi. Im trying to make batch file for ipodrg.exe whole day, but it is still not working... Can you please, send me full example of batch file and settings? (i thought it would be easy, but i cant figure it out...) thanks --- And one more question: does replaygain and soundcheck save to same id3 field? Or if I add replaygain info and iTunes rewrites my mp3s soundcheck info, I can get it back by running ipodrg batch again? If you just want to do it from the command line, I use: for %f in (*.mp3) do path\to\ipodrg.exe "%f" t Example: for %f in (*.mp3) do d:\util\ipodrg.exe "%f" t If you want to use the above line in a batch file, you need to use double % for the variable like as follows: for %%f in (*.mp3) do d:\util\ipodrg.exe "%%f" t QUOTE It's now also possible to use only Mp3tag for the job (v2.37c required). Works also for AAC in mp4 container. I have tried using Mp3tag (v2.37j) to create SoundCheck tags and for some reason the files that were attached weren't doing it for me, so I made an Action (Convert -> Actions) that seems to do the trick. No pre-scanning with iTunes required. Under actions, create a new group. (RG to SoundCheck or something similar) Create a new action and choose 'Format Value'. In the field, enter COMMENT ITUNNORM And the format string $rg2sc(%REPLAYGAIN_TRACK_GAIN%) And you're done. Run the action on any file with replaygain tags (from foobar or whatever) and the SoundCheck comment will be added if it doesn't exist or changed to match the replaygain value. |
|
|
|
Jan 11 2008, 12:12
Post
#42
|
|
|
Group: Members Posts: 2 Joined: 6-January 07 Member No.: 39358 |
I was having trouble running ipodrg from the command line until I used the example given by swyn to come up with:
FOR /R %f IN (*.mp3) DO c:\utils\ipodrg.exe "%f" a and FOR /R %f IN (*.mp3) DO c:\utils\ipodrg.exe "%f" a >> "c:\utils\log.txt" However, I am not able to generate a report using the rgsc utility, presumably the usage is: rgsc iTunesDB But that evidently assumes I know more than I do, because I am not able to get any results using the rgsc utility. I either get an error: "ERROR: Could not open input file!" (when I literally used "iTunesDB"), or I get a "0" result when I used "rgsc iTunes Library.itl" from the directory in which the file is located - C:\Documents and Settings\David\My Documents\My Music\iTunes The result: "Amount of tracks: 0" So, I am doing something very wrong. When I ran the ipodrg utility to create "log.txt" (second cmd line, above), a text file with all my mp3 songs was created with both the values, for example: Filename: D:\Music\Carole King\Tapestry\02 - So Far Away - Carole King - Tapestry.mp3 Album Gain: -4.750000 Sound Check: 00000BA9 Lots and lots of tracks with both album gain and sound check values. So please advise how to properly write the cmd line to use the rgsc utility. Thanks. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th May 2013 - 03:30 |