Log in

View Full Version : Tool to copy iTunes tags between MP4 files?


zambelli
3rd January 2022, 10:54
Is there a tool (command line, preferably) that can copy all iTunes-style tags from one MP4 file to another MP4 file without skipping unknown tags?

Every tool I've tried so far either requires unknown tags to be explicitly defined ahead of time (which isn't feasible in batch processing) or fails to copy tags it doesn't recognize.

The unknown tags in this case are actually tags inserted by Foobar2000, stuff like DISCOGS_RELEASE_ID, replaygain_album_gain, etc. so not actually particularly obscure.

Here are some methods I've tried so far, all without success:

FFmpeg with -map_metadata
MP4box with -itags
MP4box with -udta (after -udta-dump)
ExifTool with -tagsfromfile and -iTunes:all


Here is an example of some iTunes tags (XML dump courtesy of mp4box -disox) that have been problematic:

<iTunesSpecificBox Size="93" Type="----" Specification="apple" Container="ilst data" >
<iTunesMean Size="28" Type="mean" Specification="unknown" Container="unknown" value="com.apple.iTunes">
</iTunesMean>
<iTunesName Size="33" Type="name" Specification="unknown" Container="unknown" value="replaygain_album_gain">
</iTunesName>
<data Size="24" Type="data" Version="0" Flags="1" Specification="apple" Container="ilst *" >
</data>
</iTunesSpecificBox>
<iTunesSpecificBox Size="81" Type="----" Specification="apple" Container="ilst data" >
<iTunesMean Size="28" Type="mean" Specification="unknown" Container="unknown" value="com.apple.iTunes">
</iTunesMean>
<iTunesName Size="21" Type="name" Specification="unknown" Container="unknown" value="PUBLISHER">
</iTunesName>
<data Size="24" Type="data" Version="0" Flags="1" Specification="apple" Container="ilst *" >
</data>
</iTunesSpecificBox>
<iTunesSpecificBox Size="84" Type="----" Specification="apple" Container="ilst data" >
<iTunesMean Size="28" Type="mean" Specification="unknown" Container="unknown" value="com.apple.iTunes">
</iTunesMean>
<iTunesName Size="28" Type="name" Specification="unknown" Container="unknown" value="DISCOGS_RELEASED">
</iTunesName>
<data Size="20" Type="data" Version="0" Flags="1" Specification="apple" Container="ilst *" >
</data>
</iTunesSpecificBox>

Thundik81
3rd January 2022, 18:58
Mp3tag (https://www.mp3tag.de/en/download.html)?

zambelli
3rd January 2022, 20:44
Mp3tag (https://www.mp3tag.de/en/download.html)?
I can view extended tags (alt+T) in Mp3tag, but I don't see any way to export them. Export function only seems to include a predefined list of standard tags. I actually don't see any way to import tags either. :confused:

Edit: Looks like it's possible to copy tags from one file to another by doing a simple Ctrl+C and Ctrl+V in the GUI, and it seems to work well (it copies all the tags, not just standard ones) - but I don't see any way to do it in bulk for 1000 files. :(