Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: iTunes Encode - New version (Read 74828 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

iTunes Encode - New version

New version is available here:
http://otto.homedns.org:8888/iTunes/iTunesEncode46.zip

Basically the only change is to fix some problems encountered when the encode is happening. See, the iTunes interface comes up and if you click around in it a bit while the encode is going on, it could send a false signal to iTunesEncode that the encode was finished. iTunes 4.6 added some functionality to the COM interface that would allow me to avoid this. What with one thing and another, I never got around to noticing until iTunes 4.7 came out.

So this version should display a progress report in a percentage form as well as not quit prematurely. I think. I haven't done a lot of testing here.

I also added a bunch of error checking. Anyway, give it a try with EAC or clienc and let me know how it works. It might not work at all, in which case let me know that too.

Edit: One known issue: If you open a modal dialog in iTunes like the Options or Preferences screen while it's encoding, iTunesEncode might still quit prematurely. I'm checking that out. There is a fix but I'm not sure it's the right way to do it yet. My suggestion is to not screw around with iTunes while it's encoding.

iTunes Encode - New version

Reply #1
Thanks Otto. I've been using the previous version for awhile and love it. Looking forward to trying the new version out!

iTunes Encode - New version

Reply #2
Otto, what do you mean error correction? I understand this concept when ripping a WAV but encoding? You think there may be errors with the encode as well? What kinds? Do these occur when just using iTunes as well?

Also, I replaced AACencode.js with iTunes.exe in both the EAC folder location and the command-line and now it does not seem to work. (so I put AACencode.js back) Everything else remained the same as before. What am I doing incorectly? Trying to follow the read-me file.

Thanks for your work on this.

iTunes Encode - New version

Reply #3
ezra: iTunes.exe or iTunesEncode.exe?

And I mean error checking, not error correction. iTunes can stop for all sorts of reasons, so iTunesEncode is checking error responses from the calls to iTunes and will spit out more useful error messages now. Also it'll return an error code and if EAC checks that error code, it'll not delete the temporary WAV, because iTunesEncode won't have been able to finish encoding it.

To set it up in EAC, go to the Compression Options:
-Use External Program for Compression is on
-User Defined Encoder
-Extension is .M4A
-Program is c:\full\path\to\iTunesEncode.exe
-Additional command line options are similar to this:
Code: [Select]
-e "AAC Encoder" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n -i %s -o %d -d

-Delete WAV after Compression is ON
-Add ID3 tag is OFF
-Check for external programs return code is ON

Current News:
-Yes, the percentage indicator doesn't work. Not sure why yet. (Edit: this is now fixed, redownload it)
-I'm also working on adding Artwork capabilities at the moment.
(Edit2: Artwork is now an option as well. Add -r "c:\full\path\to\artwork.jpg" to the command line to add artwork to the file. JPG or PNG are allowed by iTunes.)


iTunes Encode - New version

Reply #5
Yeah, great stuff!!!

Quote
Artwork is now an option as well. Add -r "c:\full\path\to\artwork.jpg" to the command line to add artwork to the file


Does this go at the end of the additional command line? After the -d???

iTunes Encode - New version

Reply #6
sounds awesome! one question though - since EAC is unable to get tags from freedb for a lot of people, is it possible to have itunesencode import the tags from itunes?

iTunes Encode - New version

Reply #7
Quote
Quote
Artwork is now an option as well. Add -r "c:\full\path\to\artwork.jpg" to the command line to add artwork to the file

Does this go at the end of the additional command line? After the -d???
[a href="index.php?act=findpost&pid=257940"][{POST_SNAPBACK}][/a]

Put it anywhere you like. The options are not order sensitive.

Quote
sounds awesome! one question though - since EAC is unable to get tags from freedb for a lot of people, is it possible to have itunesencode import the tags from itunes?
[a href="index.php?act=findpost&pid=257960"][{POST_SNAPBACK}][/a]

iTunes gets its track info from Gracenote, aka CDDB. If CDDB has it, chances are good that FreeDB has it.

But a more direct answer is no, you can't make iTunes download track info. iTunes is only capable of getting track info from Gracenote if iTunes itself rips the CD.

iTunes Encode - New version

Reply #8
Two (hopefully) quick questions:

  1) Could you add a switch for the "Grouping" field? I realize one could use the "Comment" field to store grouping data, but iTunes would not recognize that... plus I occasionally use "Comments" for, well, comments.

  2) Is there a way (yet) to directly translate FLAC comments to iTunes tags, during the encoding process? (And yes, I am adding user-defined "grouping" tags in my FLACs, as GROUPING=. Ultimately, I would like a way to go straight from FLAC to M4A, appropriately mapping the existing FLAC comments to the equivalent M4A tags.)

    - M.

iTunes Encode - New version

Reply #9
Quote
Two (hopefully) quick questions:
  1) Could you add a switch for the "Grouping" field? I realize one could use the "Comment" field to store grouping data, but iTunes would not recognize that... plus I occasionally use "Comments" for, well, comments.
  2) Is there a way (yet) to directly translate FLAC comments to iTunes tags, during the encoding process? (And yes, I am adding user-defined "grouping" tags in my FLACs, as GROUPING=. Ultimately, I would like a way to go straight from FLAC to M4A, appropriately mapping the existing FLAC comments to the equivalent M4A tags.)
[a href="index.php?act=findpost&pid=257980"][{POST_SNAPBACK}][/a]

I left off Grouping specifically because it's not stored in the file itself, I think. I'll do some testing.

As for the FLAC comments, I imagine you can do anything you like there if you use foobar and clienc to call the program. But it has to have an intermediate WAV stage, since iTunes can't read FLAC files.

iTunes Encode - New version

Reply #10
Quote
New version is available here:
http://otto.homedns.org:8888/iTunes/iTunesEncode46.zip
I also added a bunch of error checking. Anyway, give it a try with EAC or clienc and let me know how it works. It might not work at all, in which case let me know that too.

[a href="index.php?act=findpost&pid=257841"][{POST_SNAPBACK}][/a]


(posted in fb2k forum)

Add images to files? Browsing the interfaces it looks like this can be done. I would like to use iTunesEncode as BOTH an encoder and as an external tagger (since foobar currently trashes any binary tags, like cover art (COVR) or the compilation (CPIL) tags. I think those are the field names anyway.

+Reardon

iTunes Encode - New version

Reply #11
Quote
Add images to files? Browsing the interfaces it looks like this can be done. I would like to use iTunesEncode as BOTH an encoder and as an external tagger (since foobar currently trashes any binary tags, like cover art (COVR) or the compilation (CPIL) tags. I think those are the field names anyway.[a href="index.php?act=findpost&pid=258087"][{POST_SNAPBACK}][/a]

I just added the album art ability yesterday. Check out the new -r option.

But making it able to function as a tagger without also doing the encoding process poses a number of challenges. iTunes can only manipulate files that are in its "library". So you'd need to add the file to the library, do some stuff, then maybe remove it again. If the file was already in the library, you wouldn't be able to add it again, and there's some other hurdles there.

Seems to me that it'd be simpler to modify existing MP4 tagger code to add an "iTunes compatibility mode" of sorts. iTunes is pickier than it needs to be about MP4 tags, but a simple reordering of tags in the file should work, methinks.

iTunes Encode - New version

Reply #12
Great to see this handy app continue it's improvement. =)

What does the 46 in iTunesEncode46.zip stand for?

Perhaps you could implement some kind of versioning, or at least the date of compilation.

And keep up the great work!

iTunes Encode - New version

Reply #13
Quote
What does the 46 in iTunesEncode46.zip stand for?
[a href="index.php?act=findpost&pid=258165"][{POST_SNAPBACK}][/a]

iTunes 4.6 or higher is now required, and I wanted to give the zip a different name since it was just a test version sort of thing. I don't think it's necessary to actually use a version number system yet. The changes were pretty minor and there's relatively few improvements that can be added to it at this point.

iTunes Encode - New version

Reply #14
Quote
But making it able to function as a tagger without also doing the encoding process poses a number of challenges. iTunes can only manipulate files that are in its "library". So you'd need to add the file to the library, do some stuff, then maybe remove it again. If the file was already in the library, you wouldn't be able to add it again, and there's some other hurdles there.
[a href="index.php?act=findpost&pid=258091"][{POST_SNAPBACK}][/a]


Well the interfaces definitely support library manipulation. But I under it is a bit of work and not the focus of your utility.

Do you know any CLI MP4/AAC taggers?  I haven't found _any_.

+Reardon

iTunes Encode - New version

Reply #15
I just wanted to say "Thank You" as well.  This is a really nice little app.  Thanks for taking the time, Otto42.

iTunes Encode - New version

Reply #16
Quote
Do you know any CLI MP4/AAC taggers?  I haven't found _any_.[{POST_SNAPBACK}][/a]

Quick search in the AAC forum found this: [a href="http://users.rcn.com/rpritz/tgutf.zip]http://users.rcn.com/rpritz/tgutf.zip[/url]

iTunes Encode - New version

Reply #17
Otto,

Just out of curiosity, how did you end up handling COM being disabled by user interface interaction? I spent a few days without luck trying to resolve that problem, but I never found a nice solution since the event handler for COM being disabled would block the interface thread...

The final soultion I came up with was using a catch / throw system that would attempt to retry whatever command was interrupted a certain number of times, but I never found this to be very elegant.

Thanks,

Domain

iTunes Encode - New version

Reply #18
Quote
Just out of curiosity, how did you end up handling COM being disabled by user interface interaction? I spent a few days without luck trying to resolve that problem, but I never found a nice solution since the event handler for COM being disabled would block the interface thread...

The final soultion I came up with was using a catch / throw system that would attempt to retry whatever command was interrupted a certain number of times, but I never found this to be very elegant.
[{POST_SNAPBACK}][/a]

Simple answer: I didn't.

Longer answer: If you use iTunesEncode46 and screw around enough with dialogs and such while it's encoding, you can, rarely, cause iTunesEncode to quit early. As a solution, I stopped screwing around with the dialogs in iTunes while it's encoding.

I also found that the newer ConvertFile2 which gives the more useful status information about the conversion in progress doesn't seem to stop working nearly as often as the older ConvertFile did. Simply messing around with playlists and such won't stop it from working, and modal dialog boxes don't seem to impact it either, most of the time. So it's only a sometimes event, sort of thing. But basically I ignored the problem entirely unless I got enough reports to make me do something about it. I tried to solve other, more common, problems instead.

iTunesEncode46 is pretty stable now. You can still cause it to break if you try hard enough though. [a href="http://otto.homedns.org:8888/iTunes/iTunesEncode46.zip]http://otto.homedns.org:8888/iTunes/iTunesEncode46.zip[/url]


Edit: I did recently discover that "Grouping" info is indeed added to the tag of MP3 files. Don't recall how, exactly, but it's in there. So I'll be adding grouping support to iTunesEncode as soon as I get a chance.

Edit2: Done, grouping is now accessible in iTunesEncode with the -u option. (g, r, and o were already taken). Also cleaned up the help screen that prints when you run iTunesEncode without any parameters.

iTunes Encode - New version

Reply #19
i can't get your downloads to work...  is it my comp?  im running w/ firefox, and it opens a new blank window, and then after a few seconds, i get a error that says "the operation timed out when attempting to contact otto.homedns.org."  is your link broken, or is it me?

edit: typo...  lol, one letter can make a big difference...
a windows-free, linux user since 1/31/06.

iTunes Encode - New version

Reply #20
Link works OK for me, using wget and firefox.
"Facts do not cease to exist just because they are ignored."
—Aldous Huxley

iTunes Encode - New version

Reply #21
OK, I followed Otto42's suggestion for setting up EAC with the wonderful iTunesEncode as follows:
Quote
To set it up in EAC, go to the Compression Options:
-Use External Program for Compression is on
-User Defined Encoder
-Extension is .M4A
-Program is c:\full\path\to\iTunesEncode.exe
-Additional command line options are similar to this:
Code: [Select]
-e "AAC Encoder" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n -i %s -o %d -d

-Delete WAV after Compression is ON
-Add ID3 tag is OFF
-Check for external programs return code is ON

This works great but I would like to leave the AAC file in iTunes. So I removed the -o and -d options from the EAC Config string to look like this:
Code: [Select]
-e "AAC Encoder" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n -i %s

This results in the AAC file staying in iTunes like I want  but EAC no longer deletes the WAV file  Why did EAC stop deleting the WAV and what can I do to change it?  Am I missing something?

 

iTunes Encode - New version

Reply #22
Quote
This works great but I would like to leave the AAC file in iTunes. So I removed the -o and -d options from the EAC Config string to look like this:
Code: [Select]
-e "AAC Encoder" -a "%a" -l "%g" -t "%t" -g "%m" -y %y -n %n -i %s

This results in the AAC file staying in iTunes like I want  but EAC no longer deletes the WAV file  Why did EAC stop deleting the WAV and what can I do to change it?  Am I missing something?
[a href="index.php?act=findpost&pid=279260"][{POST_SNAPBACK}][/a]

EAC is passing the place where it wants the output file to be using the %d variable. When you leave that out, and thus the file isn't copied there, EAC assumes something went wrong with the encode, and doesn't delete the temporary WAV file.

What I do is to leave the -o %d option in there, so that EAC is satisfied, and then every so often I remove the excess M4A files. It's not a great solution, I admit.

iTunes Encode - New version

Reply #23
Quote
EAC is passing the place where it wants the output file to be using the %d variable. When you leave that out, and thus the file isn't copied there, EAC assumes something went wrong with the encode, and doesn't delete the temporary WAV file.

What I do is to leave the -o %d option in there, so that EAC is satisfied, and then every so often I remove the excess M4A files. It's not a great solution, I admit.
[a href="index.php?act=findpost&pid=279264"][{POST_SNAPBACK}][/a]

Thanks Otto42, I think I will go back to using the original EAC config string and just add the files back to iTunes later, that way I do not have to worry about having duplicates

iTunes Encode - New version

Reply #24
Nah, do what I do. Just leave out the -d to leave the resulting files in iTunes. When you rip a disk, always rip it to the same directory in EAC (some temp directory somewhere, like c:\temp). Every so often, just delete the contents of the temp directory. It works great.

When iTunes encodes, it puts the resulting file in iTunes library and manages the filename and such all by itself. Works pretty well, overall. So I let it do that (since I have an iPod to sync with anyway) and then just delete the dupes from the ripping+encoding process.