Certain .m4b files to not be recognized in mp3tag

Foobar tells that the m4b file "John Scalzi - The Dispatcher #1 - The Dispatcher" has an invalid format.
And you are right: MP3tag does not load that file.
So unless the file is in a valid format I doubt that a lot can be done.

I removed the .mp4 right after uploading - that was my doing just messing around with the file. Both of these files were converted from aax format to m4b. I then created a copy to put in my library, which is managed by Readarr.

Is the one managed by Readarr the longer file name with the extra details? Seems that is the file with issues. I cannot get into it even if I remove both of the extensions. Whatever created this file did not format a proper header section.

Yeah, I got the same error. No idea what could have caused this.

Error: Unsupported format or corrupted file (attempting to read past end of atom)

It plays fine in windows media player, as well as in the web-based AudiobookShelf web player.

Can Readarr even change the headers?

To answer your question - yes, that is the file managed by Readarr.

I can only suggest at this point to follow up with Readarr to see if there is a fix for this issue from them. The original file works as expected, so the error is in whatever manipulation is done there.

Thanks guys. Made some progress figuring this out. I fear that I've lost quite a few audiobooks. Time to go back and see how well I backup my data...

At least now I know exactly which files are corrupted. Foobar2000 is new to me, but I'm a fan already.

I used an exiftool command line to remove all tags from "John Scalzi - The Dispatcher #1 - The Dispatcher.m4b.mp4", like this:
exiftool -all:all= "John Scalzi - The Dispatcher #1 - The Dispatcher.m4b.mp4"

The modified file can now be loaded into Mp3tag. Of course, this means any tag information is lost.

I believe that exiftool does not alter a file's content, only its metadata.
Therefore, it seems the problem is with the tag, and probably not with the encoding or integrity of the file.

exiftool could be used to record any desired metadata.
The data could then be used to re-tag the new file.

You are a genius! I think you saved close to 100 of my books. Thank you!

exiftool definitely has a bit of a learning curve but I was able to make some progress comparing the 2 files and it seems that there is an [iTunes] group with a few tags that exists on the bad file and not the good one. Unfortunately, I don't know that the group or tags can be deleted directly, but I think I found a way (I'm sure not the best way) to accomplish it.

If I copy the file then erase the tags from that copied file (only family group 1)

exiftool -all= 'new-copied-file.m4b'

I can then copy over the tags from the bad file, excluding the iTunes group.

exiftool -tagsfromfile 'bad-file.m4b' -all --iTunes:all 'new-copied-file.m4b'

The file is still visible in mp3tag.

If you have any suggestions on how to make this more efficient, I'm all ears. If I was better with PowerShell, I could make this work pretty easily, even as an inefficient method...

Nice work! And yes, exiftool has a steep learning curve.

But it can be done in one command, like this:
exiftool -all= -tagsfromfile @ -all --iTunes:all "original(bad).m4b"

I believe options are normally applied from left to right.
@, when used with -tagsfromfile, allows the file being processed to be the source file and the destination file.

Now "original(bad).m4b" will be readable by Mp3tag and contain the desired tags.

Other options may increase efficiency, depending on your workflow.

  • the -r option will recurse through every sub-directory if a directory is specified as an argument instead of a file.
  • the -ext option will restrict processing to files with the specified extension.
  • the -@ option can be used to specify the path to a file containing a list of files to be processed.
  • the -if option can be used to restrict processing to files that meet a specified condition or that contain a specific tag.

When you are satisfied with any command, you can add the -overwrite_original option so that the backup file that exiftool automatically creates will be deleted.
I'd be careful before using that option as it cannot be undone.
Also the -m option can be used to suppress the minor warning that may not be important to you.

So you could end up with a command like this:
exiftool -m -ext m4b -r -all= -tagsfromfile @ -all --iTunes:all -overwrite_original "W:\Path to\top folder\containing books"

It seems that Mp3tag was the messenger here, not the culprit!
If we continue this discussion, it should probably be done in the "Off-Topic" section of the forum.

Thank you so much!! Headed out with the family to an amusement park all day today, but I'll give this a shot later.

Agreed on the off topic comment.

Not surprised, but this looks like it will work perfectly!

Took me a while to realize these commands will not work as-is in PowerShell. Not sure how to escape the the "@", but works fine in cmd, so not worth fussing with it. Thank you again for your help!