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: foo_pod - Foobar2000 meets the iPod (Read 1306344 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

foo_pod - Foobar2000 meets the iPod

Reply #25
Quote
Addition: iTunes doesn't modify the songs before copying them to the iPod. It may modify them when you add them to the iTunes library itself or when you change the tags using iTunes, but the process of synching the iPod just copies the files over in their current state. It's the iTunesDB that controls the rest.

This does not make sense. I have an MP3 file tagged with APEv2 and ID3v1. I then transfer it to the iPod using iTunes - I did not enter any tag editing facility in iTunes or anything. When I double click on the file on the iPod disk drive (Not using foo_pod), it now only has the ID3v1 tag intact.

foo_pod - Foobar2000 meets the iPod

Reply #26
Quote
Quote
Addition: iTunes doesn't modify the songs before copying them to the iPod. It may modify them when you add them to the iTunes library itself or when you change the tags using iTunes, but the process of synching the iPod just copies the files over in their current state. It's the iTunesDB that controls the rest.

This does not make sense. I have an MP3 file tagged with APEv2 and ID3v1. I then transfer it to the iPod using iTunes - I did not enter any tag editing facility in iTunes or anything. When I double click on the file on the iPod disk drive (Not using foo_pod), it now only has the ID3v1 tag intact.

iTunes might strip off the APEv2 tags that it can't handle, but that doesn't really affect foo_pod or anything else (other than a good reason not to use iTunes...).

I think the point that Otto42 and others are trying to make is that the iPod itself does not read tags (of any format) - the only metadata that the iPod knows about is what is in iTunesDB.  It is the responsibility of the transfer program to build this database file, so it reads in whatever metadata that it understands from the audio files.  Since foo_pod is built on top of Foobar, it will be able to handle any metadata format that Foobar can read.  And it definitely will not modify the songs!

foo_pod - Foobar2000 meets the iPod

Reply #27
This just occured to me just as i was reading about the tag handling...


I listen to alot of electronica and i have many albums that are compliations mixed by a single DJ. This makes it kinda hard to browse my ipod. If we could make custom iTunesDB, could we also make it so that the ipod browses via custom metafields?


Example:
Artist: Chicane
Title : Don't Give Up
Track: 1 of 20
Disc: 1 of 2
Album: Ministry of Sound: Trance Nation 3
Mixed by Ferry Corsten

etc.

If i load this on the Ipod, the track lists under Artist Chicane, and the album, Ministry of Sound... then Track 1, Don't give up.

I think it would be much easier for me if i could browse like this:
CD_Artist: Ferry Corsten -> Album: Ministry of Trance 3 -> Disc 1 -> Track 1, then on the now playing screen you would be a nice filled data:

Don't Give Up
Chicane
Ministry of Sound Trance Nation 3
<<bar>>

instead of the bloated set i have now....

Chicane - Don't Give Up
Ferry Corsten
Ministry of Sound ....
<< BAR >>


Just an idea. Im not sure how creative you can get in the database.

foo_pod - Foobar2000 meets the iPod

Reply #28
Quote
I listen to alot of electronica and i have many albums that are compliations mixed by a single DJ. This makes it kinda hard to browse my ipod. If we could make custom iTunesDB, could we also make it so that the ipod browses via custom metafields?

One thing that I plan on adding to foo_pod is support for scripting (probably Lua). 

So you could likely script what you are looking to do.  For example, in your script, if the song is in Playlist "Electronica", then build the artist metadata from these fields.

Something like:

if pod_GetPlaylist() == "Electronica" then
  pod_SetTitleFormat("%artist% - %title%")
  pod_SetArtistFormat("%comment%")
  pod_SetAlbumFormat("%album%")
end


I'm not sure if I'm understanding exactly how you want your data formatted, and this is just an example, but hopefully you see what I'm getting at.

foo_pod - Foobar2000 meets the iPod

Reply #29
Ya something like that.

I was just wondering, since everything is controlled via database, we could just relabel everything that the ipod displays.


So, instead of browsing the normal ipod way

Artist -> Album -> Track

we could do something like

CD Aritst / Artist - > Album -> Tracks


ALSO! We can finally organize the bloody lists alphabetically, not by tracknumber!

foo_pod - Foobar2000 meets the iPod

Reply #30
Quote
I was just wondering, since everything is controlled via database, we could just relabel everything that the ipod displays.


So, instead of browsing the normal ipod way

Artist -> Album -> Track

we could do something like

CD Aritst / Artist - > Album -> Tracks

Well, you can't change the basic labels that the iPod displays, but if you mean Browse->Artists, then display the "artists" as CD Artist / Artists, then yes, that should be easy to do.  All the iPod is doing is going through its list of songs and building an unique list of "artists".  Since we can send whatever string we want for the "artist" (or "album", "title", "genre", "composer", etc.), it will be possible to format the data as you want - not just as how it is in the file.


Quote
ALSO! We can finally organize the bloody lists alphabetically, not by tracknumber!

I'm not sure how the iPod internally sorts the songs, but if it does order them based on tracknumber and since the tracknumber is just another bit of data that we can control, it will be possible to make fake tracknumbers so that the songs end up sorted alphabetically.

foo_pod with scripting is definitely going to be a power user/control freak's interface, while most of the other programs I have seen (iTunes, Anapod, XPlay, and to a lesser extent, Ephpod) try to make the transfer process as simple and non-customizable as possible.

foo_pod - Foobar2000 meets the iPod

Reply #31
Man this will be so sweet.

I'm going to change the title formatting to %tracknumber%. %title%. It will be schweet.

Aero, stop wasting your time posting here and spooning danZ, and get to work on this component stat! 

foo_pod - Foobar2000 meets the iPod

Reply #32
Quote
Quote
Addition: iTunes doesn't modify the songs before copying them to the iPod. It may modify them when you add them to the iTunes library itself or when you change the tags using iTunes, but the process of synching the iPod just copies the files over in their current state. It's the iTunesDB that controls the rest.

This does not make sense. I have an MP3 file tagged with APEv2 and ID3v1. I then transfer it to the iPod using iTunes - I did not enter any tag editing facility in iTunes or anything. When I double click on the file on the iPod disk drive (Not using foo_pod), it now only has the ID3v1 tag intact.

Then you've discovered something I can't reproduce.. When I was using MP3Gain, the gain got saved in an APEv2 tag, if I'm not mistaken. When I checked the files on the iPod, they never were any different from files on the main hard drive.

To the best of my knowledge, you've got to be mistaken.

Edit: iTunes may very well remove the APEv2 tag when you add it to the iTunes library though. I've not tested that.

foo_pod - Foobar2000 meets the iPod

Reply #33
Quote
I'm not sure how the iPod internally sorts the songs, but if it does order them based on tracknumber and since the tracknumber is just another bit of data that we can control, it will be possible to make fake tracknumbers so that the songs end up sorted alphabetically.

Actually, if you simply leave the track numbers blank in the iTunesDB (set both tracknum and totaltracks to zero), I believe that it will sort alphabetically by track title. I may be mistaken though.

Also, it does indeed use the CD number as well when ordering. So if you have proper tracknumber and a multi CD set with the CD num as 1, 2, etc, then you get all the tracks from CD1, in order, followed by all the tracks from CD2. Very nice for multi disc sets where you care about order.

foo_pod - Foobar2000 meets the iPod

Reply #34
Ya, it defaults to alphabetical when theres are no track numbers present.


You know, I wish those fat cats at Apple released a SDK for the damn ipod. That would be sick.

foo_pod - Foobar2000 meets the iPod

Reply #35
Okay, I added a whole lot of stuff to the iPodDB classes. Hopefully this stuff will make it easier for one to build an iTunesDB from scratch or at least easier to modify an existing one. Bunch of functions relating to tracklists, playlists, tracks, strings in tracks, etc, etc. I've emailed them to Aero for comment and revision and such, but if anyone else wants to take a gander and offer some input, the classes are here. Same place as before: http://otto.homedns.org:8888/iTunes/iPodDB.zip .

These classes are rapidly becoming very complicated. I think that's a good sign.

I'm going to start working on adding classes for the Play Counts file, in order to allow some kind of support for that functionality in foo_pod, and also a class to support the new On The Go playlist download feature of the latest iPod firmware (2.1).

Edit: Hmm. Well, that was surprisingly easy to add. Took about an hour, after I had some breakfast. Okay, now it supports reading the Play Counts file, and reading/writing the OTGPlaylist file. Not that you'd ever need to write an OTGPlaylist file though. Dunno if it would use it even if you did. Oh well.

I'm kinda out of stuff to add to iPodDB now.  Maybe I'll go experiment with that soundcheck field some more.

foo_pod - Foobar2000 meets the iPod

Reply #36
Otto42 thats some great news. I think now that we have a SDK sorta thing going, a database GUI needs to be build just like on the ipod, which would make it extremely easy to load stuff on the ipod.

So we built a foundation, lets build a house. 

foo_pod - Foobar2000 meets the iPod

Reply #37
Quote
Otto42 thats some great news. I think now that we have a SDK sorta thing going, a database GUI needs to be build just like on the ipod, which would make it extremely easy to load stuff on the ipod.

So we built a foundation, lets build a house. 

Well, possibly the easiest metaphor is the one of playlists. It's a big list of tracks. The iPod makes this into kind of an extreme case, as every song on the iPod *must* be in a playlist, and to accomplish this, it makes one default "hidden" playlist which contains every single track in the track list. Any playlists you add yourself come after this one.

So it'd be possible to make a playlist called "iPod", for example, and when you synced, everything in that playlist would be sent to the iPod. If there was some way to have playlists contain other playlists, this could be used to put other playlists on the iPod. Or something. I don't fully know the extent of foobar's metaphors and structures in this regard, so I'm not really qualified to talk about it. I tried to read the foobar SDK, but it gave me a headache.

In any case, I'm going to try to decipher smart playlists on the iTunes/iPod now. With that, maybe some method of scripting that foobar has for building automatic playlists (does it have such a thing?) can be adapted to produce smart playlists that actually work on the iPod as well. And it'll give me something that'll take a few days to figure out.

foo_pod - Foobar2000 meets the iPod

Reply #38
Ya i understand the ipod playlist action. But it still works from a database, and works best with iTunes. iTunes is entirely a databased driven program. I am interested in this kind of implementation for both the ipod plugin and Foobar. Plus, it would also be nice too see who what would browsing would be like on the ipod before loading up like 18 gigs worth of songs; you know, making sure all the tags are consistent. Cuz it seperates very distinctly, like DJ Tiesto, and DJ Tiësto are different artists.

=/

foo_pod - Foobar2000 meets the iPod

Reply #39
Quote
Ya i understand the ipod playlist action. But it still works from a database, and works best with iTunes. iTunes is entirely a databased driven program. I am interested in this kind of implementation for both the ipod plugin and Foobar. Plus, it would also be nice too see who what would browsing would be like on the ipod before loading up like 18 gigs worth of songs; you know, making sure all the tags are consistent. Cuz it seperates very distinctly, like DJ Tiesto, and DJ Tiësto are different artists.

I doubt that foo_pod is ever going to be a full featured as iTunes.  Ultimately, it will probably just be an easy way to sync a playlist, and maybe allow for some scripting control of the process. 

If you need to review your music tags before syncing, you might want to consider the quite excellent ID3-TagIt.  Otherwise, Foobar's playlist display and MassTagger are pretty good as well.

foo_pod - Foobar2000 meets the iPod

Reply #40
So far the best part about foo_pod is simply the fact that it allows me to convert all my iTunes Music Store purchases to flac, mp3, etc.  Before, I had to burn a CD-RW of my purchases within iTunes, then rip to flac or whatever.  Now I can just use the diskwriter......extremely cool......
-gandalf44

foo_pod - Foobar2000 meets the iPod

Reply #41
Got the barest beginnings of smart playlist support in there. It can read smart playlists into memory and parse them, but I still don't know what half of the values in there mean. But that's just a matter of trial and error with iTunes. It can't write changes to the thing yet though, because I haven't done enough testing to start that portion of it.

But at least it'll be able to read the rules for creating smart playlists. Whether or not that can be translated into something foobar can use is another matter.

Got more smartlist stuff added. What a major PITA smart playlists are. Very powerful, that much I can see, but still, yikes.

foo_pod - Foobar2000 meets the iPod

Reply #42
Quote
So far the best part about foo_pod is simply the fact that it allows me to convert all my iTunes Music Store purchases to flac, mp3, etc.  Before, I had to burn a CD-RW of my purchases within iTunes, then rip to flac or whatever.  Now I can just use the diskwriter......extremely cool......

Hey, that's a really good idea!  I hadn't thought of using Diskwriter - in fact, I recently transcoded some .m4p files myself, but I played them in iTunes and captured the audio live from the mixer.  You made my day knowing that I played a tiny little part in sticking it to The Man


Quick status update on foo_pod:  Otto42 and I (mostly Otto42) have been working hard at getting the iPodDB library complete and ready to use.  Last night, I was able to add a song to the database, write it out, and read it back in again.  So basically, I have everything I need to be able to transfer a playlist from Foobar2000 to the iPod.  Hopefully I can have it ready for widespread testing within a day or two.,

foo_pod - Foobar2000 meets the iPod

Reply #43
I was curious about something......how is foo_pod actually able to play the iTunes Music store m4p files?  I thought that's why you need the iTunes applications, because you were allowed up to 3 computers (or 3 different instances of iTunes app on different machines) to play the files?

Not that I am complaining, for I am thrilled that I can use my purchased music in something else besides iTunes, especially for transcoding thru diskwriter (and eventually writing back to to Ipod). 

I was just curious how it works....
-gandalf44

foo_pod - Foobar2000 meets the iPod

Reply #44
DRM support was added to MP4FF some time before the 0.8 release. foo_input_std will decode M4P files on the system they were licensed for.

foo_pod - Foobar2000 meets the iPod

Reply #45
Ahhh....I see.  Without telling me to look at the source code :-D, can you explain in layman's terms how that was accomplished?  Does foo_input_std look at the actual M4P file? 

If you know of a pointer where this has alreadt been explained let me know....just curious.
-gandalf44

foo_pod - Foobar2000 meets the iPod

Reply #46
Quote
Ahhh....I see.  Without telling me to look at the source code :-D, can you explain in layman's terms how that was accomplished?  Does foo_input_std look at the actual M4P file? 

If you know of a pointer where this has alreadt been explained let me know....just curious.

I explained how it could be done somewhere around here, but I can't find the post.

Short version:
- The M4P files are encrypted. To decrypt them, you need the key.
- iTunes gets the key when it "authorizes" and stores it in a file on the hard drive.
- But iTunes encrypts that file using info already on your machine, like the Windows Product Key and such.
- But DVD-Jon (the norweigan hacker who cracked CSS and got sued for it) also worked out how to decrypt that file and get the key and released how to do it as open source.
- And now several programs, including foobar, realplayer 10, etc... can get that key directly from iTunes storage location and decrypt the file and play it, and some can even create an unencrypted MP4/M4A from it (look on Google for a program called M4P2MP4.EXE... I'd post a direct link or link to more info, but doing so would violate rule 9 of these forums).

foo_pod - Foobar2000 meets the iPod

Reply #47
Any progress on the Soundcheck/RG implimentation? 

Also, what are you looking at the database with?  My hexeditor doesn't seem to make much sense of it.

foo_pod - Foobar2000 meets the iPod

Reply #48
Quote
Any progress on the Soundcheck/RG implimentation?

Haven't had the time to look seriously at it. Understand that I'm currently in the process of getting a new job, getting a new apartment, planning the move, and I'm also taking a 10 day vacation at the beach this next week. Been busy.

Quote
Also, what are you looking at the database with?  My hexeditor doesn't seem to make much sense of it.

Generally, I look at it with a hex editor. Of course, it's a lot like looking at the Matrix... I've gotten to where I don't even see the hex anymore...

Start here if you want to understand the format of the file: http://otto.homedns.org:8888/itunes/iTunesDB.html . However, my entire site will go down for at least 3 weeks beginning on the 11th, so I'd check it out soon and possibly make a copy of anything you want to keep.

foo_pod - Foobar2000 meets the iPod

Reply #49
Another quick status update:  tonight, I was able to transfer a complete Foobar playlist of songs to my iPod.  Currently, the sync is really just a replace - so there is still work to be done, but the hardest part is already implemented.

On the first major test, I was able to transfer 501 songs (2.45GB) in 224 seconds.  That is approximately 11.2MB/sec, which is phenomenal since the same machine only transfers at  9-9.5MB/sec with EphPod.      The final product will be slower, since it will need to detect duplicate songs and everything else that sync'ing implies, but I was really impressed with this first trial.

Next up will be to add code to detect duplicate songs, as well as the ability to delete files from the iPod when they aren't in the current playlist in Foobar.  I am also considering a better way to transfer files from the iPod, and organizing them into a directory tree.  Then I'll add Lua scripting support, along with some more unusual ideas I have been coming up with.  Like an iPod to iPod sync - this would be a quick way to duplicate one iPod to another, or copy missing files so that both iPods would have the same set of songs.