IPB

Welcome Guest ( Log In | Register )

5 Pages V   1 2 3 > »   
Reply to this topicStart new topic
EAC/iTunes full integration, Let EAC rip, let iTunes compress and tag
Otto42
post Jun 14 2004, 02:02
Post #1





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



Edit: Improved scripts and/or executables to accomplish this can be found towards the bottom of the thread. I recommend using the executable version now instead of the script. It's less of a memory hog than scripting will be.

Direct link to EXE: http://otto.homedns.org:8888/iTunes/iTunesEncode.zip
Improved version for iTunes 4.6 and up only: http://otto.homedns.org:8888/iTunes/iTunesEncode46.zip

----
All this scripting being posted here lately got me working on the problem, and here's the solution.

This script will allow you to have EAC use iTunes as the External Compression program. iTunes 4.5 and up required.

How it works:
-EAC rips to a wav file
-EAC calls the script with the proper tags and everything
-The script tells iTunes to compress the file
-The script passes the tags to iTunes, one at a time, which tags the file
-The script copies the resulting file to wherever EAC wants it
-EAC is happy.

There are two modifications to the script that you can make. Both are at the top of the script and easy to understand.
- You can have the script copy the file to where EAC wants it to be (defaults to true)
- You can have the script remove the file from iTunes' library after iTunes finishes encoding (defaults to false)

How to set it all up:
First, get the script from here: http://otto.homedns.org:8888/iTunes/encodeAAC.txt
(I'd appreciate somebody else mirroring it, this is my own box and it goes up and down from time to time)

Second, save the script somewhere and rename it to encodeAAC.js.

Third, set up EAC as follows. In the Compression Options dialog, External Compression Tab:
-Enable "Use external program..."
-Set Parameter passing scheme to "User Defined Encoder"
-Set file extension to ".m4a"
-Make sure that "Add ID3 tag" is disabled.
-Set program to "c:\windows\system32\cscript.exe"
-Set additional command line options to:
"c:\path_to_file\encodeAAC.js" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n %s %d
Change the "path_to_file" with the complete path to wherever you saved the script. Note that quote marks are *VERY IMPORTANT* and must be exactly as I put them in the above line. I had a devil of a time figuring this stuff out, as EAC is a bit weird in some respects.

Finally, in iTunes, go to the preferences and set it to AAC encoder and change the parameters (like bitrate) to be what you want it to use.

And there you go. Enjoy. biggrin.gif

Edit: Note that if you have antivirus software like Norton, it may pop up a warning towards the end of the script, when the script attempts to copy the compressed file around. There is no possible way to get around this. Either disable your anti-virus or tell it that the script is safe (Norton will let you do this and can remember that this script is safe to run).

This post has been edited by Otto42: Jan 31 2005, 17:53


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
Busemann
post Jun 14 2004, 02:15
Post #2





Group: Members
Posts: 730
Joined: 5-January 04
Member No.: 10970



By doing this, iTunes won't be storing the disc properties so it can retrieve CDDB tags later though...
Go to the top of the page
+Quote Post
ShowsOn
post Jun 14 2004, 04:01
Post #3





Group: Members (Donating)
Posts: 369
Joined: 28-June 02
From: South Australia, AUSTRALIA
Member No.: 2421



Thanks for the script.

Does it require iTunes 4.5 or higher? I'm still using 4.2.


--------------------
www.petitiononline.com/RHCPWBCD/petition.html
Go to the top of the page
+Quote Post
Dr. TaaDow
post Jun 14 2004, 04:04
Post #4





Group: Members
Posts: 41
Joined: 13-February 03
From: Plastic City America
Member No.: 4989



QUOTE (ShowsOn @ Jun 13 2004, 07:01 PM)
Thanks for the script.

Does it require iTunes 4.5 or higher? I'm still using 4.2.

from the top post:

This script will allow you to have EAC use iTunes as the External Compression program. iTunes 4.5 and up required.
Go to the top of the page
+Quote Post
Otto42
post Jun 14 2004, 04:37
Post #5





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



QUOTE (Busemann @ Jun 13 2004, 05:15 PM)
By doing this, iTunes won't be storing the disc properties so it can retrieve CDDB tags later though...

True, but frankly, who cares? EAC is just a better ripper, and I prefer it. I don't much care if iTunes' CDDB lookups don't work.

Anyway, this method looks up the CDDB (FreeDB) tags in EAC and transfers them to iTunes and they get tagged right then and there. Why would you need to tag them again later?


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
Otto42
post Jun 14 2004, 04:39
Post #6





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



QUOTE (ShowsOn @ Jun 13 2004, 07:01 PM)
Thanks for the script.

Does it require iTunes 4.5 or higher? I'm still using 4.2.

Of course you have to have 4.5. 4.2 didn't have scripting capabilities. Although if it's the weird audio thing, there's a method somewhere on these forums to keep the old quicktime codec without the problem but still use iTunes 4.5 (or 4.6, now). That will work fine.


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
ShowsOn
post Jun 14 2004, 04:52
Post #7





Group: Members (Donating)
Posts: 369
Joined: 28-June 02
From: South Australia, AUSTRALIA
Member No.: 2421



OK sorry for not reading the first post correctly! I should wake up before I post to HA.org forums.


--------------------
www.petitiononline.com/RHCPWBCD/petition.html
Go to the top of the page
+Quote Post
Sebastian Mares
post Jun 14 2004, 07:24
Post #8





Group: Members
Posts: 3629
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



The file is now also hosted here:

http://vbspot.sourceforge.net/file_manager...s/encodeAAC.txt

This post has been edited by Sebastian Mares: Jul 13 2004, 17:53


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
jMc777
post Jun 29 2004, 14:18
Post #9





Group: Members
Posts: 15
Joined: 28-January 04
Member No.: 11580



Great stuff Otto42! Is there any way of getting this to tell iTunes to encode the files passed from EAC into Apple Lossless?


--------------------
http://www.whatreallyhappened.com
Go to the top of the page
+Quote Post
Jack Comics
post Jun 29 2004, 16:36
Post #10





Group: Members (Donating)
Posts: 76
Joined: 16-December 03
From: Pennsylvania, U.S.A.
Member No.: 10488



Beautiful, man. Absolutely beautiful. Thank you! smile.gif
Go to the top of the page
+Quote Post
ezra2323
post Jun 29 2004, 19:35
Post #11





Group: Members
Posts: 586
Joined: 17-July 02
Member No.: 2631



Very cool!!! Except, I'm "that person" who can't seem to get it to work.

I follwed the instructions exactly. I re-named the text program with a .js extension. I then placed it in my Exact Audio Copy folder, under an iTunes sub-folder. I set the path in additional command line options to : c:\program files\Exact Audio Copy\iTunes\encodeAAC.js" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n %s %d

Id3 is disabled and I have the program set to c:\windows\system32\cscript.exe

Any ideas?

I have iTunes 4.6

This post has been edited by ezra2323: Jun 29 2004, 19:37
Go to the top of the page
+Quote Post
jMc777
post Jun 29 2004, 19:43
Post #12





Group: Members
Posts: 15
Joined: 28-January 04
Member No.: 11580



QUOTE (ezra2323 @ Jun 29 2004, 10:35 AM)
Very cool!!! Except, I'm "that person" who can't seem to get it to work.

I set the path in additional command line options to : c:\program files\Exact Audio Copy\iTunes\encodeAAC.js" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n %s %d


You need to change;

c:\program files\Exact Audio Copy\iTunes\encodeAAC.js" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n %s %d

to

"c:\program files\Exact Audio Copy\iTunes\encodeAAC.js" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n %s %d

Note the missing " at the beginning of your original command line.

This post has been edited by jMc777: Jun 29 2004, 19:44


--------------------
http://www.whatreallyhappened.com
Go to the top of the page
+Quote Post
ezra2323
post Jun 29 2004, 23:09
Post #13





Group: Members
Posts: 586
Joined: 17-July 02
Member No.: 2631



QUOTE
Note the missing " at the beginning of your original command line


Me=dumb. biggrin.gif
Go to the top of the page
+Quote Post
Digga
post Jun 29 2004, 23:53
Post #14





Group: Members
Posts: 1047
Joined: 28-June 03
From: on the dock of the bay
Member No.: 7423



QUOTE (ezra2323 @ Jun 29 2004, 11:09 PM)
Me=dumb.  biggrin.gif

but at least smart enough to _know_ that your'e dumb tongue.gif wink.gif


--------------------
Nothing but a Heartache - Since I found my Baby ;)
Go to the top of the page
+Quote Post
G-Force
post Jul 9 2004, 03:40
Post #15





Group: Members
Posts: 56
Joined: 8-June 03
From: Gainesville, FL
Member No.: 7068



Otto, is there any way to have this script rip to Apple Lossless instead of the AAC encoder?

I tried changing one line of the script to the following
CODE
var    encoder=encoderCollection.ItemByName("Apple Lossless Encoder")


But that didn't work so obviously there is more to it than that ohmy.gif

Do you have any advice?? Many thanks!
Go to the top of the page
+Quote Post
Otto42
post Jul 9 2004, 05:42
Post #16





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



QUOTE (G-Force @ Jul 8 2004, 08:40 PM)
Otto, is there any way to have this script rip to Apple Lossless instead of the AAC encoder?

I tried changing one line of the script to the following
CODE
var    encoder=encoderCollection.ItemByName("Apple Lossless Encoder")


But that didn't work so obviously there is more to it than that  ohmy.gif

Do you have any advice?? Many thanks!
*

Heh. Yeah, you were on the right track..

Possible encoder values are:
AAC Encoder
AIFF Encoder
Lossless Encoder
MP3 Encoder
WAV Encoder

I retrieved these from iTunes using this little script:
CODE
var    iTunesApp = WScript.CreateObject("iTunes.Application");
var    i;
var fso, tf;
fso = new ActiveXObject("Scripting.FileSystemObject");
tf = fso.CreateTextFile("encoders.txt", true);
var    encoderCollection = iTunesApp.Encoders;
var  count = encoderCollection.Count;
for (i = 1; i <= count; i++)
{
    var    encoder=encoderCollection.Item(i);
    tf.WriteLine(encoder.Name);
}
tf.Close();


So anyway, changing that line you gave to "Lossless Encoder" should do the trick.


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
jMc777
post Jul 9 2004, 13:04
Post #17





Group: Members
Posts: 15
Joined: 28-January 04
Member No.: 11580



QUOTE (Otto42 @ Jul 8 2004, 08:42 PM)
So anyway, changing that line you gave to "Lossless Encoder" should do the trick.


Superb - thanks Otto42! cool.gif


--------------------
http://www.whatreallyhappened.com
Go to the top of the page
+Quote Post
keiths
post Jul 9 2004, 22:17
Post #18





Group: Members
Posts: 42
Joined: 28-October 03
Member No.: 9493



Works great! Great work. Thank you very much.
Go to the top of the page
+Quote Post
Domain
post Jul 11 2004, 04:36
Post #19





Group: Members
Posts: 46
Joined: 14-June 04
Member No.: 14664



QUOTE (Otto42 @ Jun 13 2004, 05:02 PM)
All this scripting being posted here lately got me working on the problem, and here's the solution.

This script will allow you to have EAC use iTunes as the External Compression program. iTunes 4.5 and up required.

Otto42, I hope you don't mind, but I took the liberty of making a few modifications to this script to make it foobar2000 diskwriter friendly (if it wasn't already). I belive it should still work in EAC, though don't quote me on that since I'm stuck on my laptop and didn't feel like testing it against 2.0x extraction speeds.

Comments about usage are included, and it does require foobar2000 to have foo_clienc installed.

Grab it here:
iTunes.js.txt

This is the first time i've actually used JScript, so hopefully I didn't do anything too boneheaded, but if so feel free to let me know. laugh.gif

Anyway, Otto42 thank you again for the great script biggrin.gif

-----
Domain
Go to the top of the page
+Quote Post
Otto42
post Jul 11 2004, 08:12
Post #20





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



Domain: Cool with me. I was working on an EXE version of the script, because some people were having problems with virus checkers and such.

Here you go: http://otto.homedns.org:8888/iTunes/iTunesEncode.zip

It's an EXE version that does the same basic sort of thing. I don't know if it'll work with foo_clienc though. You'll have to tell me what's wrong with it if it won't work. I can probably fix any issues pretty easily.

Feel free to mirror a copy somewhere else if you like (rarewares?), as my connection may go up and down, being on cable and such.

Note that the command line options for this EXE version are similar to the script version, but different, so you may want to read the readme file first. Also, this EXE version does have quite a bit of error checking in it, as opposed to the script which had next to none, but it doesn't check for everything, obviously.


Edit: Oh, I did find one thing while writing this.. If you actually do anything in iTunes while it's running (both the EXE and the script versions), it'll fail miserably. Meaning don't click on iTunes while it's converting. Doing so can cause the loop where the script is waiting on iTunes to finish to exit out early, and of course it fails at that point. I see no easy way to fix this, it's iTunes being weird.

This post has been edited by Otto42: Jul 11 2004, 08:17


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
Domain
post Jul 11 2004, 19:01
Post #21





Group: Members
Posts: 46
Joined: 14-June 04
Member No.: 14664



QUOTE (Otto42 @ Jul 10 2004, 11:12 PM)
It's an EXE version that does the same basic sort of thing. I don't know if it'll work with foo_clienc though. You'll have to tell me what's wrong with it if it won't work. I can probably fix any issues pretty easily.


Very nice biggrin.gif

I played around with this briefly and didn't find anything particularly problematic. The only issues (ones that I also ran into modifying the script) was that iTunes expects/requires something in the "Name" field, so if you don't specify this, it creates a tag based on the filename. The only problem with this is that the tag it creates automatically is based on whatever temporary file it used to do the conversion, not the final filename (so if foobar's case, you end up with something like "<filename>.m4a.fb2k.tmp". Because of this, I ended up adding the small regular expression when I modified the script to change this tag to the final output's filename.

Also for the -d option, do you expect it to actually delete the physical file from the iTunes library? The only behaviour i've seen from Delete() is removal from the library, not actual removal of the file (perhaps this is because of options in my iTunes?).

Thanks again,

-----
Domain
Go to the top of the page
+Quote Post
Sebastian Mares
post Jul 11 2004, 19:09
Post #22





Group: Members
Posts: 3629
Joined: 14-May 03
From: Bad Herrenalb
Member No.: 6613



QUOTE (Otto42 @ Jul 11 2004, 09:12 AM)
Feel free to mirror a copy somewhere else if you like (rarewares?), as my connection may go up and down, being on cable and such.
*


Available at...

http://vbspot.sourceforge.net/file_manager...TunesEncode.zip

This post has been edited by Sebastian Mares: Jul 13 2004, 17:54


--------------------
http://listening-tests.hydrogenaudio.org/sebastian/
Go to the top of the page
+Quote Post
Otto42
post Jul 11 2004, 20:12
Post #23





Group: Members
Posts: 1075
Joined: 15-October 03
From: Memphis, TN
Member No.: 9323



QUOTE (Domain @ Jul 11 2004, 01:01 PM)
Also for the -d option, do you expect it to actually delete the physical file from the iTunes library? The only behaviour i've seen from Delete() is removal from the library, not actual removal of the file (perhaps this is because of options in my iTunes?).
*

Huh. I'll be darned, you're right. Okay, I fixed that problem in the EXE version. It'll delete the file itself now too.

Sebastian: Might want to grab another copy of the file for your mirrors.

This post has been edited by Otto42: Jul 11 2004, 20:18


--------------------
http://ottodestruct.com
Go to the top of the page
+Quote Post
aSceT
post Jul 11 2004, 22:33
Post #24





Group: Members
Posts: 27
Joined: 6-January 04
Member No.: 10996



Great script! Can it be somehow used with Foobar's CliEnc?
Go to the top of the page
+Quote Post
Tomb
post Jul 11 2004, 22:41
Post #25





Group: Members (Donating)
Posts: 149
Joined: 10-August 02
Member No.: 3011



QUOTE (aSceT @ Jul 11 2004, 09:33 PM)
Great script! Can it be somehow used with Foobar's CliEnc?
*


Read Domains messages above.
Go to the top of the page
+Quote Post

5 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd July 2014 - 16:55