 |
hymn Hear Your Music aNywhere
|
| View previous topic :: View next topic |
| Author |
Message |
MossPile
Joined: 19 Nov 2007 Posts: 16777215
|
Posted: Tue Jan 01, 2008 11:47 pm Post subject: FFH: m4p to m4a for OS X |
|
|
Update: v2.0 is linked and described later on in the thread.
--------------------------------
With some help from a friend who would prefer to remain anonymous for the time being, I have a full M4P decoder for OS X called "ffh" (Flaky Fairplay Hack). It'll losslessly (and quickly) decrypt music files to M4A.
Quick notes:
- Requires OS X. Probably Leopard-only, although I haven't done testing with Tiger.
- Source-only distribution - developer tools must be installed.
- Metadata is currently not preserved
Extended release notes are included in the archive.
It's currently hosted at Rapidshare (link below). Hopefully the Hymn folks can rehost it locally.
Links removed. -iTIE
Last edited by MossPile on Tue Feb 19, 2008 2:47 am; edited 1 time in total |
|
| Back to top |
|
 |
TunesRus90

Joined: 08 Jul 2007 Posts: 27
|
Posted: Wed Jan 02, 2008 12:47 am Post subject: |
|
|
| Damn, I just installed Leopard, but I didn't install the developer tools yet. I'll have to get those installed. Thanks though. Looking forward to testing this app, and I'll probably try to work out some sort of applescript to transfer metadata and update playlists with the unprotected files. |
|
| Back to top |
|
 |
Annath

Joined: 22 Jul 2006 Posts: 325
|
Posted: Wed Jan 02, 2008 12:48 am Post subject: |
|
|
Woo! Does it use basically the same concept as QTFU? _________________ I'll try being nicer if you'll try being smarter. |
|
| Back to top |
|
 |
TunesRus90

Joined: 08 Jul 2007 Posts: 27
|
Posted: Wed Jan 02, 2008 1:32 am Post subject: |
|
|
Well I just tested, and it said:
44503262.50% - wrote -3560261 bytes too much data somehow?! Oops.
But the resulting file seems to play okay. |
|
| Back to top |
|
 |
MossPile
Joined: 19 Nov 2007 Posts: 16777215
|
Posted: Wed Jan 02, 2008 5:13 am Post subject: |
|
|
| TunesRus90 wrote: | | I'll probably try to work out some sort of applescript to transfer metadata and update playlists with the unprotected files. |
Please don't try to mess with metadata through Applescript - that way lies madness. I'd much rather come up with a solution that transfers everything at once, including stuff that Applescript won't touch (like the copyright information and purchaser name). It shouldn't be particularly difficult once I've gotten libmp4v2 figured out (or found an alternative).
| TunesRus90 wrote: | Well I just tested, and it said:
44503262.50% - wrote -3560261 bytes too much data somehow?! Oops.
But the resulting file seems to play okay. |
Yikes! You're on an x86 (Intel) Mac, right? I haven't tested that configuration yet, so I suspect there's just something silly I've overlooked. Good to hear it still does the job, though. I'll release an update as soon as I can get my hands on a machine to do testing on.
| Annath wrote: | | Woo! Does it use basically the same concept as QTFU? |
Sort of. FFH uses a slightly different technique (mach_override), and uses the Quicktime library instead of messing around with iTunes itself. |
|
| Back to top |
|
 |
iTunesIsEvil Moderator
Joined: 08 Nov 2004 Posts: 999 Location: In Ur Base
|
Posted: Wed Jan 02, 2008 2:32 pm Post subject: |
|
|
When I get home tonight I'll attempt to compile and test this and see if we can't get a binary up by the end of the evening. _________________ "Hooray! I'm Helping!" - Dr. Zoidberg while being held Hostage. |
|
| Back to top |
|
 |
slycrel
Joined: 02 Jan 2008 Posts: 6
|
Posted: Wed Jan 02, 2008 10:26 pm Post subject: |
|
|
Hi there.
Using my own authorized files on an authorized machine I get the following error:
Trap initialization error: machErr #f8000001
I added "-arch_only ppc" to LDFLAGS in the makefile as well with no change. (I'm running this on an x86 machine) This may not be the right place for the arch flag though. I'm rusty using makefiles.
Running under Leopard 10.5.1, build 9B18.
I'll also try to throw together an xcode project and see if I can get it to work. Interesting idea.
edit:
After doing some poking around, I figured out what the trap error is. Unfortunately I don't really know how to fix it on the x86 machine, I am assuming that the mach_override code needs to change for that.
Additionally, I changed it to PPC and unfortunately I'm not cool enough to know how to properly link in the libmp4v2.a library so that it's happy in xcode. And I'm not willing to spend the time right now to get that building itself in xcode. So it won't link properly. Too bad, debugging would be helpful to speed this process up a bit. =)
I did build and run this on a G5 PPC tower and got a separate error. It looks like it started, but I got this:
"0.00% - uh-oh, 3618476 bytes seem to have gotten lost"
Trying to even preview the m4a file to play it without itunes crashes the finder. Which makes sense since the resulting file is 4k, probably empty or some header garbage, but obviously an incomplete file.
I've got to move on for now, but I'll be keeping tabs on this, and may work on this some later. Thanks for the work you do -- hopefully it works better for others than for me. |
|
| Back to top |
|
 |
MossPile
Joined: 19 Nov 2007 Posts: 16777215
|
Posted: Thu Jan 03, 2008 12:48 am Post subject: |
|
|
I've been looking at the x86 issues with a friend, and I have a pretty good idea of what the problem is. (memcpy is kind of weird on Leopard x86.) I don't have a solution quite yet, but at least I know what the problem is.
I don't know what's going on with your G5, though. Just as a sanity check, are you authorized to play the file in question on that machine? (If not, open it up in iTunes and authorize yourself first.) Failing that, try changing the usleep(10000) on line 155 to usleep(20000). If that still doesn't work, I'm kind of at a loss.
Incidentally, linking in libmp4v2.a is probably easier than you expect. Just build that file externally, then drag it into the project.  |
|
| Back to top |
|
 |
TunesRus90

Joined: 08 Jul 2007 Posts: 27
|
Posted: Thu Jan 03, 2008 3:59 am Post subject: |
|
|
Okay, well I've done a few more tests, and so far unable to replicate the original error. Also, I am on PowerPC, so it wasn't an x86 problem, but whatever, as long as it doesn't happen anymore I'm fine with that.
About the applescript thing, don't get me wrong, it would be great to have FFH preserve meta data (although, for security reasons, it might be a good idea to leave all of the purchased info excluded from the new file), but I already have most of the code needed to update the data by applescript. I just combined a few snipets from scripts that I already had, updated some of my older code, and I now have a script that runs your app on the selected song in iTunes, adds the newly decrypted song back to iTunes, transfers all id3 info, and changes all references to the protected song in playlists to the new, unprotected song. However, it still can't handle multiple files at once. I can have a fully working version up within a few days, if there is interest, but if you plan on updating this app soon to preserve meta data I'll just wait to post anything.
Once again, thanks for all of your work MossPile, and thanks also to the anonymous code-submitter. It really is great to finally have a lossless mac solution. |
|
| Back to top |
|
 |
slycrel
Joined: 02 Jan 2008 Posts: 6
|
Posted: Thu Jan 03, 2008 6:15 am Post subject: |
|
|
| MossPile wrote: | I've been looking at the x86 issues with a friend, and I have a pretty good idea of what the problem is. (memcpy is kind of weird on Leopard x86.) I don't have a solution quite yet, but at least I know what the problem is.
I don't know what's going on with your G5, though. Just as a sanity check, are you authorized to play the file in question on that machine? (If not, open it up in iTunes and authorize yourself first.) Failing that, try changing the usleep(10000) on line 155 to usleep(20000). If that still doesn't work, I'm kind of at a loss.
Incidentally, linking in libmp4v2.a is probably easier than you expect. Just build that file externally, then drag it into the project.  |
I should be authorized to play the file on that other machine. Though thinking about it I'm not sure I've re-authorized that machine since my leopard install, I'll have to double-check that tomorrow. I'm now preparing myself to feel stupid. I'll let you know. =)
As far as linking that file... I did what you're suggesting originally and it still didn't link properly. First I built it as x86, that was silly since I set things up to be PPC... so I had to re-build it on the G5. I am guessing the mangling or somesuch with the command line is slightly different than what xcode is using by default as it couldn't see a few key functions, though it did seem to clean up some of the link errors. Maybe if I get ambitious I'll do some more tinkering with that and see what I can come up with, it was a relatively easy test.
Also FYI I tried to compile this with the 10.4 SDK and it didn't build properly, I'm guessing that unless you tweaked the code it'll be leopard only.
Again, thanks to you and your friend for your work with this. |
|
| Back to top |
|
 |
slycrel
Joined: 02 Jan 2008 Posts: 6
|
Posted: Thu Jan 03, 2008 4:33 pm Post subject: |
|
|
Okay, it was an authorization issue on my G5. My bad. It works fine there.
This evening I may take a crack at adding support for multiple file conversions. I have ulterior motives, I'm getting a new mp3 player in the mail tomorrow and this would be nice to have for that. =) |
|
| Back to top |
|
 |
DrmBytes Moderator
Joined: 16 May 2004 Posts: 2999
|
Posted: Thu Jan 03, 2008 4:40 pm Post subject: |
|
|
Post has been stickied and will be added to the FAQ for Mac solutions later. Also, when the kinks are worked out we'll host it on the site and give it an info thread in the Start Here forum. _________________ READ THE FAQ |
|
| Back to top |
|
 |
iTunesIsEvil Moderator
Joined: 08 Nov 2004 Posts: 999 Location: In Ur Base
|
Posted: Thu Jan 03, 2008 6:50 pm Post subject: |
|
|
| DrmBytes wrote: | | Post has been stickied and will be added to the FAQ for Mac solutions later. Also, when the kinks are worked out we'll host it on the site and give it an info thread in the Start Here forum. |
Indeedy. I've been swamped lately so I didn't even get around to doing a quick build and test last night.  _________________ "Hooray! I'm Helping!" - Dr. Zoidberg while being held Hostage. |
|
| Back to top |
|
 |
DrmBytes Moderator
Joined: 16 May 2004 Posts: 2999
|
Posted: Thu Jan 03, 2008 7:08 pm Post subject: |
|
|
Work has been killing me this week. I did manage to add something to the FAQ about this thread so curious people will find it. We'll get it hosted soon. _________________ READ THE FAQ |
|
| Back to top |
|
 |
colivigan
Joined: 26 Oct 2005 Posts: 290
|
Posted: Thu Jan 03, 2008 7:14 pm Post subject: |
|
|
How fast is it? The original post says "quickly". Is it as fast as QTFairUse/MyFairTunes?
Thanks, MossPile and friend for the hard work. This is awesome!
Great idea using the Quicktime APIs instead of hooking iTunes itself - it's so much cleaner this way. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|