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: iPod manager (Read 1847439 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: iPod manager

Reply #4175
Hi. I ran into a bit of error situation where I'm starting to feel like this might be case where a restore via iTunes is needed, but thought asking here first wouldn't hurt.

Issue: After managing content and ejecting properly, my iPod (5.5 gen, 64MB RAM, flash-modded) resumed to its main menu suspiciously quickly considering the amount of content on it (~35k songs) and previous experience of its previously taking a bit longer. And indeed, iPod shows up as having no songs on it but the storage space appropriately used. Now I've had this happen a handful of times before and in those cases just rebooting the iPod (press & hold Menu + center buttons) had sorted it out, but not this time, unfortunately.

Tried rebooting the iPod - no effect.
Plugging the iPod back to my computer works OK, gets picked up by Windows as normal. In Foobar, the 'Load library' command brings up an error message saying: Error reading iTunesDB: Invalid format; expected header marker "dbhm" got "".
I next tried 'Rewrite database', but it gives the same error. I figured it might be a case of corrupted database files and tried reverting to the backups of dopdb and iTunesDB in the iPod_Control\iTunes folder. No luck, same thing happens.

Anything else I could try, or should I just do a factory reset in iTunes and then re-add my music?
I googled for foo_dop + the error message but the only hit was a post on this very thread from back in 2013, with a slightly different error message reported (expected header marker "dbhm" got "ʴ3DI"), 'Rewrite database' suggested to be tried, but nothing else.

Any idea what I might have done wrong here, or would this be just one of those random freak occurrences that just happen sometimes?

Re: iPod manager

Reply #4176
Hi,

That sounds odd, I haven't heard of that happening before.

iTunesDB.dop.backup is indeed the previous database file renamed, so odd that it would be corrupt as well.

I'd guess the corrupt files are full of zeroes based on the error. It may be worth looking at iTunesDB.dop.backup and iTunesDB in a hex editor (such as HxD) if you're interested in investigating further. Non-corrupt iTunesDB files would start with the characters mhbd (dbhm reversed). (dopdb files would start with the bytes 6D A4 21 B6 A4 0F 37 4C A6 C2 6B 19 58 31 8D BB.)

Yes, restoring the iPod and starting again is one option. Another is the the 'File/iPod/Recover orphaned tracks' command in foobar2000 (but that would need that corrupt database file to be removed first).

Another thing I'd check is that the removal policy of the drive is set to 'Quick removal (default)' in Device Manager (see attached screenshot).

Also, just to mention in case you're still using iTunes as well, iTunes should be closed before using any commands in foobar2000 that write to the iPod, as they may conflict otherwise.
.

Re: iPod manager

Reply #4177
Hi,
Thanks for the quick reply!

I installed HxD to have a quick look at the database files (as far as I can go really, my knowledge of hex editing being non-existent... :P)
Of the iTunesDB the main one starts with an H and then nothing for the remainder of the expected 'mhbd' string. The backup however does seem to show those, but now trying that out, loading the library in Foobar brings up an error message of an unsupported or corrupt file. (I might have done something differently the first time around...)
For the dopdb files, the main one starts with the same set of bytes as you mentioned, but the backup appears to be way off. (screenshots attached)

Hmm, I guess doing a restore in iTunes and starting anew might be the easiest, though not the quickest, solution here.
But if I were to remove the corrupt database(s) and try the orphaned track recovery route, wouldn't I need to introduce the iPod to iTunes first after removing the datase files to add at least one track in order to have the library database set up again, as IIRC, foo_dop doesn't do that, only being able to work on already existing databases?

Checked to confirm - yes, I have "Quick removal (default)" set for the iPod's drive device in Windows' device manager.

While I do have iTunes installed, I've never had it open at the same time as Foobar & foo_dop, as I do my iPod managing exclusively with that. I have had the iTunesHelper.exe process running in the background though, but that should be OK though, correct?

 

Re: iPod manager

Reply #4178
I installed HxD to have a quick look at the database files (as far as I can go really, my knowledge of hex editing being non-existent... :P)

From a quick look at those:

- iTunesDB – that looks like the start of the file is somehow missing
- iTunesDB.dop.backup – the start of the file in the screenshot looks normal from what I can see (but could be something wrong elsewhere if the new error message specifically said the problem was with iTunesDB)
- dopdb – same, the start of that looks fine
- dopdb.backup – now that does indeed look like something else completely (could be audio or image data if not complete gibberish...)

Note also, there is another database at \iPod_Control\Artwork\ArtworkDB.

Hmm, I guess doing a restore in iTunes and starting anew might be the easiest, though not the quickest, solution here.
Yes, I think so to be honest as I'd be worried about whether anything else is corrupt on there from those screenshots. (Although I think a restore reinstalls the iPod software as well, so it may not be zero risk.)

Was the flash mod recent or a while ago? I think in any case you'll want to keep an eye on whether anything else gets corrupted.

But if I were to remove the corrupt database(s) and try the orphaned track recovery route, wouldn't I need to introduce the iPod to iTunes first after removing the datase files to add at least one track in order to have the library database set up again, as IIRC, foo_dop doesn't do that, only being able to work on already existing databases?
No, it should be able to initialise a clean iPod as far as I remember.

I have had the iTunesHelper.exe process running in the background though, but that should be OK though, correct?
Yes, that shouldn't be a problem.
.

Re: iPod manager

Reply #4179
Hmm, I guess doing a restore in iTunes and starting anew might be the easiest, though not the quickest, solution here.
Yes, I think so to be honest. I'd be a little worried about whether anything else is corrupt on there to be honest from those screenshots.

Was the flash mod recent or a while ago? I think in any case you'll want to keep an eye on whether anything else gets corrupted.
Alright, I'll go with that then to be sure!  8)

That flash mod I did back around June 2020, so not exactly recent nor super old (I feel); like, by comparison my 2n iPod, a stock config. 160GB 7th gen has been going without a hitch for over three years without needing restores.

Thanks again for the help!

Re: iPod manager

Reply #4180
Now this is getting even weirder. Restoring via iTunes doesn't want to work for some reason.

On starting up iTunes, it sees the plugged-in iPod, sees something's off ( throws up error message: "iTunes cannot read the contents of the iPod [iPod name]") and prompts to restore to factory settings.
Restoring then seems to go OK initially (progress bar advances & finishes, device drops out, then reappears, with Windows' auto-start prompt popping up & stuff), but on showing up again in Explorer and iTunes, the iPod hasn't been wiped, and iTunes again shows the same error message about not being able to read the contents of the iPod [iPod name], prompting to do a restore. Everything on the device seems untouched.

I then thought of how I'm having a static drive number assigned to the iPod (I have two and keeping them from not occupying the same drive letter is important for foo_dop managing), so tried reverting it back to a dynamically assigned drive letter using diskpart, just in case, to rule out a possible variable. But no luck, restoring just doesn't want to work.

Next stop: Reboot iPod in disk mode, plug it in and try restoring again. Nope. Still doesn't want to restore. Just goes through the same process resulting in iTunes saying it can't read the iPod's contents.

Guess I'll have to open up the iPod, pull out the microSDs from the iFlash adapter and do a thorough reformatting on them from the ground up to try and force and actually fresh start on it... Really odd.  :o

Re: iPod manager

Reply #4181
Alright, turns out it was that one of the three microSDs I had in the iPod had decided to fail.
Took all three cards out today and proceeded to format them with AOMEI. Two Toshibas worked properly and formatted just fine, but the single Sandisk doesn't. Gotta get that replaced then.  8)

Re: iPod manager

Reply #4182
After transferring music files to my ipod, the output lists a bunch of files that have this error message after iPod Manager was finished transferring them. ("failed to add gapless data for file: error parsing file. file may be corrupt"). I listened to these songs on my iPod and they play fine. There is no audible corruption, and they appear to have transferred without issue. Is this just a bug or something? I really could not find ANY information on these errors. Does anyone know what this means? Are the files really corrupted? They play fine.

"failed to add gapless data for file: error parsing file. file may be corrupt"

Re: iPod manager

Reply #4183
What file format are they, and what encoder was used (or where did they come from)?

The component will try to read information needed by the iPod for gapless playback from MP3s and MP4s. The error only means the component was not able to extract the required information. It would probably indicate a bug in the bit of the component that extracts that data that rather than anything else.

If the files otherwise play fine the implication would only be that there may be a very short gap (or some other artefact possibly) between affected tracks when playing them on your iPod. (Also note that some older iPods did not support gapless playback anyway.)

If you're able to send me a sample file I can double-check the reason for the error when I get some time to look at it.
.

Re: iPod manager

Reply #4184
Hello, so these are files that came from all over the place. I honestly don't even remember at this point. They are quite old. The below is a screenshot of the mediainfo specs of one of the files that is effected. I believe it should have all encoding information listed. I figured that the error just meant that for whatever reason, the file is lacking gapless data, however the error message specifically says "file may be corrupt" at the end of the full error message, I so I wanted to make sure.

https://imgur.com/a/7zLqDRT

Also, what is the best way for me to send you a sample file?

Re: iPod manager

Reply #4185
I've had a look at the sample file.

Firstly, the LAME header is missing from the file. This can be seen in the attached screenshots (showing the Details tab of the Properties window in foobar2000) comparing the sample file with a known good file. Without the ENC_DELAY and ENC_PADDING fields gapless playback isn't possible. Since your file was also encoded by LAME 3.92, I don't know any legitimate reason it would be missing.

Secondly, there is some extra data between the ID3v2 tag and the start of the first MPEG frame. This is actually what is causing the error. The iPod requires the offset of the 8th last MPEG frame, and therefore the component has to work that offset out, and it mistakes a byte sequence in this unknown data as the start of the first MPEG frame.

The extra data seems to be 583 bytes long. (The 'Utilities/Rebuild MP3 stream' tool in the context menu in foobar2000 will remove this data.)

One possibility is that some tool used on the file has overwritten the first couple of MPEG frames (including the LAME header, and the extra data that is left behind is a partial MPEG frame) with the ID3v2 tag. Comparing the file with an unmodified original copy would give a more definitive answer.
.

Re: iPod manager

Reply #4186
I've had a look at the sample file.

Firstly, the LAME header is missing from the file. This can be seen in the attached screenshots (showing the Details tab of the Properties window in foobar2000) comparing the sample file with a known good file. Without the ENC_DELAY and ENC_PADDING fields gapless playback isn't possible. Since your file was also encoded by LAME 3.92, I don't know any legitimate reason it would be missing.

Secondly, there is some extra data between the ID3v2 tag and the start of the first MPEG frame. This is actually what is causing the error. The iPod requires the offset of the 8th last MPEG frame, and therefore the component has to work that offset out, and it mistakes a byte sequence in this unknown data as the start of the first MPEG frame.

The extra data seems to be 583 bytes long. (The 'Utilities/Rebuild MP3 stream' tool in the context menu in foobar2000 will remove this data.)

One possibility is that some tool used on the file has overwritten the first couple of MPEG frames (including the LAME header, and the extra data that is left behind is a partial MPEG frame) with the ID3v2 tag. Comparing the file with an unmodified original copy would give a more definitive answer.

Thank you so much for your assistance. I am currently getting an original copy. Do you mind if I send you the original copy of that file to check to see if it has the same issues? I can also send it to you via email like I did with the first file. Thank you so much.

Re: iPod manager

Reply #4187
Additionally, now that I look further, I don't see that any of my foobar files have the ENC_DELAY or ENC_PADDING values?

EDIT: Okay so some mp3 files do, some files do not.

Re: iPod manager

Reply #4188
The original (or older) copy of the file has the same oddities. So that would suggest the problem occurred before you got that file, and there may be multiple reasons for getting that error on different files.

I'd suggest just ignoring the warnings, but if you turn off the 'Set dummy gapless data for files without gapless data...' option in iPod manager preferences they should go away (if they are all MP3s). (The 'Rebuild MP3 stream' command mentioned above will probably also get rid of them.)

Additionally, now that I look further, I don't see that any of my foobar files have the ENC_DELAY or ENC_PADDING values?

EDIT: Okay so some mp3 files do, some files do not.
It will depend on the encoder as well.
.

Re: iPod manager

Reply #4189
The original (or older) copy of the file has the same oddities. So that would suggest the problem occurred before you got that file, and there may be multiple reasons for getting that error on different files.

I'd suggest just ignoring the warnings, but if you turn off the 'Set dummy gapless data for files without gapless data...' option in iPod manager preferences they should go away (if they are all MP3s). (The 'Rebuild MP3 stream' command mentioned above will probably also get rid of them.)

Additionally, now that I look further, I don't see that any of my foobar files have the ENC_DELAY or ENC_PADDING values?

EDIT: Okay so some mp3 files do, some files do not.
It will depend on the encoder as well.

Yes, that file is from the original source and is the "original" that I got. Thank you for taking the time to look into this. Okay then, that is good to know that I did not do anything to corrupt it. Do you mind if I message you in the future with any further Foobar2000 questions? I've been using Foobar2000 for years, but there are some things that I just cannot find documentation or explanations for.

Re: iPod manager

Reply #4190
Do you mind if I message you in the future with any further Foobar2000 questions? I've been using Foobar2000 for years, but there are some things that I just cannot find documentation or explanations for.
I may not be the best person to answer those questions, so I'd recommend posting them on the forum. I usually read posts related to a component that I've developed – you can always put @musicmusic in a message to get my attention, but generally speaking, I tend to focus my time on things (bugs and problems especially) relating to components I've developed.
.

Re: iPod manager

Reply #4191
Hey, I'm not sure if this has been answered before, but searching the forum didn't turn up any results, so apologies if I missed something.

I can't encode anything through the iPod -> Send to iPod option.

Here's my options:

AAC encoder (qaac.exe):

Code: [Select]
--cvbr 96 -q 0 -o %d -

Fails with error code "Unexpected process exit code 00000002h"

MP3 encoder (lame.exe)

-S -b 320 %d

Fails with error code "Unexpected process exit code FFFFFFFFh"

Any ideas what i'm doing wrong? Latest foo_dop, latest foobar encoder pack.

Re: iPod manager

Reply #4192
Nevermind - solved it. The LAME encoder syntax should be as follows:

Code: [Select]
 -S -b 320 - %d 

Another question - is it possible to send a foobar2000 playlist to an iPod without creating duplicate files on the device?

Re: iPod manager

Reply #4193
It should reuse existing files if they haven't been modified since they were originally transferred – but it will otherwise resend files.

The main way to avoid duplicates therefore would be to use the 'Synchronise...' command.
.

Re: iPod manager

Reply #4194
It should reuse existing files if they haven't been modified since they were originally transferred – but it will otherwise resend files.

The main way to avoid duplicates therefore would be to use the 'Synchronise...' command.

What counts as "modified"? Because I just hit synchronize and was surprised to see the component decide it has to replace (and thus, re-encode) all 5002 songs in my library - seemingly because the play count changed.

Re: iPod manager

Reply #4195
For transcoded files, it's the original last modified date, original file size and a few key metadata fields (ARTIST, TITLE, ALBUM, TRACKNUMBER, DISCNUMBER).

There's an allowance for an exact different of one hour in the last modified date, because time zone confusion after the clocks going back or forwards was common depending on the file system and version of Windows. (There's also some rounding to account for differences in timestamp resolution.)

How are your play counts being stored? Is there anything unusual about where the original files are stored?
.

Re: iPod manager

Reply #4196
Um, no idea - I'm just using the default Playback Statistics component. I checked the Advanced options tab and its "automatically synchronize file tags with statistics" feature is turned off, so I'm assuming it doesn't write to the audio file itself and keeps everything in a separate db file?

Re: iPod manager

Reply #4197
Yes, then it shouldn't be related to the play counts. I'd check the last modified date on your local PC of some of the affected files to see if they've been modified recently.

The other thing I'd check is whether the files have 'yes' under 'In DopDB' if you go to File/iPod/Manage contents and click on the root item in the tree.
.