Tagging M4A Files with Multiple Artists Fields

Started by zack, August 05, 2023, 07:02:01 PM

Previous topic - Next topic

zack

Hello, I have an M4A file that contains 2 artist fields. However, when I use exiftool to update them, it ends up with only one artist field. Which option should I use to keep both fields while updating the values? Also, is there any way I can insert a third artist without modifying the first 2?

ARTIST=Name 1
ARTIST=Name 2
ARTIST=...

Many thanks for the help!

Phil Harvey

I don't know if I've ever seen a video with mulitiple Artists like this.  Could you upload a sample file so I can see how this was done?  You can mail me the link directly if you want (philharvey66 at gmail.com).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

zack

Hi Phil,

I have just sent a sample audio to your email. It's actually an audio file - AAC within an MP4 container.

Thank you for looking into this :)

Phil Harvey

I got the sample, thanks.

The multiple artists are stored as duplicate ItemList "©ART" tags in this file.  This is new to me.  It will take some work but I should be able to add the ability to write duplicate ItemList tags, hopefully in the next release.

But first I need to do some research to see if this is correct according to the standard, and try to determine what tags other than Artist this affects.

If anyone knows anything about this it could be helpful.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

At first look, it doesn't seem as if the specification supports multiple different Artist tags:

QuoteData Ordering

Multiple values for the same tag represent multiple representations of the same information, differing either by language or storage type or by the size or nature of the data. For example, an artist name may be supplied in three ways:

as a large JPEG of their signature
as a smaller 'thumbnail' JPEG of their signature
as text
An application may then choose the variation of the the artist name to display based on the size it needs.

Data must be ordered in each item from the most-specific data to the most general. An application may, if it wishes, stop 'searching' for a value once it finds a value that it can display (it has an acceptable locale and type).

According to this, the first acceptable Artist tag should be used, and the others should be ignored.

But more research is needed.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

zack

I know that in other music file formats, it's pretty common to have duplicate field names in tags, e.g., FLAC, Ogg Vorbis, etc. However, for MP4/M4A, it's quite unusual. That said, seems like tools like MediaInfo can correctly parse and display the 2 artists. I also have other M4A files purchased from an online music store, and some of them have 2 genre in duplicate fields.

Phil Harvey

I've looked into implementing this, and it will be difficult and it will be very easy to introduce bugs into the existing features, so I won't be able to implement this in 12.65 but I won't shelve it indefinitely.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

zack


struwwelpeter

I have a related problem with duplicate field names - although I just want to delete the duplicate entries, leaving only a single instance of each.  Is there currently a way to do this with ExifTool?

Cheers!

Phil Harvey

#9
The "NoDups" helper function is designed for this purpose.  Assuming this is the "Artist" tag, the command would be:

exiftool -sep ## "-artist<${artist;NoDups}" FILE

The "NoDups" is case sensitive, but the tag names aren't.

FAQ 17 explains why the -sep option is necessary.

- Phil

Edit:  I forgot about the API NoDups option.  I think this is a better way to do it:

exiftool -api nodups "-artist<artist" FILE
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

struwwelpeter


struwwelpeter

One hopefully final question: if I want to apply NoDups to all fields within the metadata, not just Artist, is that possible?  (These are either MP3 or AAC/M4A files, if that matters).

Many, many thanks.

StarGeek

It only works with tag that are list type tags (see FAQ #17, List-type tags).  And there are tags that some programs treat as lists, but are not.

Also, exiftool cannot edit MP3 files.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

struwwelpeter

Quote from: StarGeek on April 16, 2024, 02:42:45 PMIt only works with tag that are list type tags (see FAQ #17, List-type tags).  And there are tags that some programs treat as lists, but are not.

I'm sorry I don't understand.  Could you show me how to do it for all list-type tags?  I tried -all:all but I don't think it worked.  I've read the FAQ several times and searched the forum, but am unfortunately no wiser.

Phil Harvey

I think the best way to do this is to add the tags separately on the command line.  There probably aren't too many list-type tags that you need to fix.  "Subject" is one that comes to mind, but you'll have to add the rest yourself.  The command would go like this:

exiftool -api nodups "-artist<artist" "-subject<subject" ... FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).