Copy-pasting ALAC MP4 tags also copies their durations

I normally work with MP3 and FLAC, and everything is fine there, but today I was working with some MP4 ALAC files. I simply copied (ctrl+C) the tags from a relatively short song, and pasted them (ctrl+V) onto a longer song.

The longer song ended up showing up in foobar2000 as having the same short duration as the first file, and when played, it just cut off at that point. I had to remove the tags using Mp3tag in order to get the durations to be correct again; removing the tags from within foobar2000 did not help.

So it seems Mp3tag is copying the duration info in error, in this type of file.

This is with Mp3tag 3.14. Let me know if you need more info or files to test with.

Is there any length-related tag field when you inspect the tags of those files via the extended tag dialog at Alt+T?

Nope. Here's a couple of files to test with: ([link now removed]). Try copying track 8's tags onto track 7.

I think it's related to the ITUNSMPB field that seems to be used by foobar2000. Can you remove this and reload the tags in foobar2000 to see if the length is reported correctly then.

The ITUNSMPB field is file-specific (it also includes the sample count), so it might be good to remove this if you're copying tags between non-identical files.

Yep, that worked.

As far as what Mp3tag should do, I'd expect this info to be treated the same way as the gapless-playback data in MP3 LAME tags: don't touch it when modifying tags.

For example, I see in the foobar2000: Change Log that the default behavior when removing tags is to ignore this info:

  • "Remove Tags" now retains Apple gapless (iTunSMPB) information on MP3 files.
    Rationale: tag manipulation should not cause the file to decode differently.
    Opt-out of this behavior in Advancd Preferences.
1 Like