Hi, I am a new user of Mp3Tag. I am an macOS 14.8.7 Sonoma user. My issue is as follows: I moved a .m4b audiobook file to the Mp3Tag main window. The program showed all original metadata for the file as expected. I then used the sidebar to change the .m4b metadata (the Artist field), then clicked in the Mp3Tag main window, to verify the changes occurred. The error message "Cannot write tags to file xxx.mp4" error popped. The Retry button did not fix the issue. What I have done to troubleshoot: I downloaded new copies of the file into Mp3Tag. The new copies produced the same error message repeatedly. Prior to dragging the file into Mp3Tag, I opened my .m4b using FooBar 2000 and ran an integrity test. The file generated no errors. After the error is generated in Mp3Tag, all of my tag information is deleted (except for Filename and Path info). I then moved the damaged file into FooBar 2000 again, and the Integrity Test generated errors indicating the file was damaged. I looked at the OSX file permissions associated with the .m4b file and its enclosing folder, and changed read and write permissions for the .m4b to "everyone". Ran the process again. Error message the same. Can anyone suggest any next steps for me? As this is my first support request, if I have left out any useful info let me know. I can also provide the file itself for analysis when needed.
Do you have the original before you tried to edit the file? If so, can you reproduce the issue?
Hi Florian, I have the original unmodified/unedited file. The original file's .m4b tag data is always viewable in Mp3tag upon import. The file only becomes corrupted (all tags deleted) after I attempt to make a change to any of the sidebar metadata fields, then attempt to view the changes in the main window. The error message is reproducible.
That's great! I just sent you a private upload link via personal message. It would be most helpful if I could have a look at the file and analyze the issue.
Many thanks for the example file. I've analyzed it and couldn't find anything obviously malformed or otherwise problematic.
However, I also tried playing the file in foobar2000, and it showed more than 140,000 chapters. Given that the file actually contains only three chapters, something is clearly wrong.
The file can be repaired using ffmpeg from the command line in Terminal.app with the following command, where input.m4b is the problematic file and output.m4b is the fixed copy:
ffmpeg -i input.m4b -c copy output.m4b
I've just also released Mp3tag for Mac v1.13.4 which adds some further precautions and also supports the previously problematic file now.
Thanks again for reporting and for providing the example file. I'm very glad you still had the original and didn't loose any data.