# Saving tags in Picard appears to alter the audio stream?

**URL:** https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674
**Category:** MusicBrainz Picard
**Tags:** duration
**Created:** [February 7, 2023, 10:47am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674 "2023-02-07T10:47:08Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Kilu](https://community.metabrainz.org/user_avatar/community.metabrainz.org/kilu/32/2237_2.png) [@Kilu](https://community.metabrainz.org/u/Kilu)
#### Post date: [February 7, 2023, 10:47am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/1 "2023-02-07T10:47:08Z")

</div>

So this is a weird one and I’m not exactly sure what’s happening so the topic subject may be wrong.

I have this m4a I converted from a flac, the flac and the m4a have a duration of 3:57.920 (10 492 272 samples) as reported by foobar2000. Plopping that m4a to picard and saving the tags on it alters the duration to 3:57.981 (10 494 976 samples). That’s obviously not a big difference, but whatever it’s doing is breaking the gapless playback between this and the next track.

And I would also think that tagging the file should not alter the audio duration at all. So it seems a bit odd.

[correct duration](https://drive.google.com/file/d/1tzBIx7YtZCWHixaztErdGxESjQWFnfLR/view?usp=share_link)  
[incorrect duration](https://drive.google.com/file/d/1_Vn3lfcbggzogneUTCsNjq5IJKiK0iop/view?usp=share_link)

---

<div class="post-metadata">

### Author: ![outsidecontext](https://community.metabrainz.org/user_avatar/community.metabrainz.org/outsidecontext/32/90_2.png) [@outsidecontext](https://community.metabrainz.org/u/outsidecontext)
#### Post date: [February 7, 2023, 11:07am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/2 "2023-02-07T11:07:46Z")

</div>

Is this really a M4A file (that’s a MP4 container supposed to contain audio only) or is it a raw AAC file? What does the info dialog in Picard show for this file?

---

<div class="post-metadata">

### Author: ![InvisibleMan78](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/i/c67d28/32.png) [@InvisibleMan78](https://community.metabrainz.org/u/InvisibleMan78)
#### Post date: [February 7, 2023, 11:50am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/3 "2023-02-07T11:50:49Z")

</div>

The main difference in the metadata seems to be that Picard removes some iTunes metadata (green boxes) and rewrite the MusicBrainz tag names slightly different (orange boxes):

 ![image](https://community.metabrainz.org/uploads/default/original/3X/b/5/b579a7ecda65d26f78f8c35891ab96231d140182.png)

But this should not be related to the audio stream itself, AFAIK.

---

<div class="post-metadata">

### Author: ![Kilu](https://community.metabrainz.org/user_avatar/community.metabrainz.org/kilu/32/2237_2.png) [@Kilu](https://community.metabrainz.org/u/Kilu)
#### Post date: [February 7, 2023, 11:55am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/4 "2023-02-07T11:55:58Z")

</div>

It most certainly should be a m4a. Picard says the format is MPEG-4 Audio (AAC LC). I used qaac (which uses the apple encoder) for flac to m4a conversion.

I should note that saving the tags in mp3tag for example is fine. But after picard does whatever it does, it doesn’t seem to be possible to revert the process.

---

<div class="post-metadata">

### Author: ![Kilu](https://community.metabrainz.org/user_avatar/community.metabrainz.org/kilu/32/2237_2.png) [@Kilu](https://community.metabrainz.org/u/Kilu)
#### Post date: [February 7, 2023, 12:38pm UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/5 "2023-02-07T12:38:35Z")

</div>

Oh, seems I figured it out, removing the itunsmpb tag is what’s causing it. Adding it to the preserved tag list, refreshing the album and saving will keep the duration the same and retain gapless playback. Good shout @InvisibleMan78 about the itunes metadata.

Quick googling seems to suggest that the itunsmpb tag is indeed used for gapless. This might be a good tag to preserve by default I think.

---

<div class="post-metadata">

### Author: ![aerozol](https://community.metabrainz.org/user_avatar/community.metabrainz.org/aerozol/32/116_2.png) [@aerozol](https://community.metabrainz.org/u/aerozol)
#### Post date: [February 7, 2023, 8:38pm UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/6 "2023-02-07T20:38:40Z")

</div>

> [@Kilu](#):
>
> This might be a good tag to preserve by default

I’m not familiar with/don’t use m4a, but please do [open a ticket](https://tickets.metabrainz.org/) if you think this would be a improvement!

---

<div class="post-metadata">

### Author: ![yindesu](https://community.metabrainz.org/letter_avatar_proxy/v4/letter/y/b77776/32.png) [@yindesu](https://community.metabrainz.org/u/yindesu)
#### Post date: [February 8, 2023, 2:58am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/7 "2023-02-08T02:58:52Z")

</div>

Are you using an outdated version of Picard?

> <https://tickets.metabrainz.org/browse/PICARD-2261>

---

<div class="post-metadata">

### Author: ![Kilu](https://community.metabrainz.org/user_avatar/community.metabrainz.org/kilu/32/2237_2.png) [@Kilu](https://community.metabrainz.org/u/Kilu)
#### Post date: [February 8, 2023, 8:50am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/8 "2023-02-08T08:50:40Z")

</div>

I’m not too too familiar with it either and I’m also not entirely sure if the tag is m4a specific, but I made a ticket anyway, so we’ll see what happens.

---

<div class="post-metadata">

### Author: ![Kilu](https://community.metabrainz.org/user_avatar/community.metabrainz.org/kilu/32/2237_2.png) [@Kilu](https://community.metabrainz.org/u/Kilu)
#### Post date: [February 8, 2023, 8:51am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/9 "2023-02-08T08:51:36Z")

</div>

Nope, and as far as I can see this has nothing to do with tagger script.

---

<div class="post-metadata">

### Author: ![outsidecontext](https://community.metabrainz.org/user_avatar/community.metabrainz.org/outsidecontext/32/90_2.png) [@outsidecontext](https://community.metabrainz.org/u/outsidecontext)
#### Post date: [February 8, 2023, 9:26am UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/10 "2023-02-08T09:26:46Z")

</div>

But “Clear existing tags” is most likely activated, hence the tag removal.

---

<div class="post-metadata">

### Author: ![Kilu](https://community.metabrainz.org/user_avatar/community.metabrainz.org/kilu/32/2237_2.png) [@Kilu](https://community.metabrainz.org/u/Kilu)
#### Post date: [February 8, 2023, 3:14pm UTC](https://community.metabrainz.org/t/saving-tags-in-picard-appears-to-alter-the-audio-stream/622674/11 "2023-02-08T15:14:50Z")

</div>

I’m not at home right now to confirm but very likely yes. Does clear existing tags also remove mp3 gapless info tag? I don’t remember encountering this there so I guess no? I’d propose treating this the same way, considering how destructive its removal can potentially be.
