<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank for the replay Brian.</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
My intent is to remove a “custom” tag that inadvertently ended up with a with the space in it’s name (Song Rating) and replace it with a tag with no space (SongRating).</div>
<div style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
My working file is WorkingMan.flac</div>
<div style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If I run the metaflac command:</div>
<div style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
metaflac --show-tag="Song Rating" --show-tag=SongRating WorkingMan.flac</div>
<div style="margin: 0in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I see the following:</div>
<div class="elementToProof" style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Note there is a duplicate tag (one with a value and one with no value). Case explained to me that a duplicate tag is not necessarily unwanted.</div>
<div class="elementToProof" style="margin: 0.25in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<img size="18178" contenttype="image/png" style="max-width: 582px;" data-outlook-trace="F:1|T:1" src="cid:fc74d701-df5b-496d-b73b-ce2db2ce3ba6"></div>
<div class="elementToProof" style="margin: 0.25in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 From within dBpoweramp I deleted the SONG RATING tag (2nd from the bottom)</div>
<div class="elementToProof" style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 <img size="89255" contenttype="image/png" style="max-width: 473px;" data-outlook-trace="F:1|T:1" src="cid:424e371a-639e-4044-9fc7-b8fc7db2c69a"></div>
<div style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="margin: 0in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Then re-run the same metaflac command</div>
<div style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
metaflac --show-tag="Song Rating" --show-tag=SongRating WorkingMan.flac</div>
<div class="elementToProof" style="margin: 0in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I now see:</div>
<div class="elementToProof" style="margin: 0in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<img size="14664" contenttype="image/png" style="max-width: 582px;" data-outlook-trace="F:1|T:1" src="cid:32e3247e-e942-4359-9e8c-0756866324dc"></div>
<div class="elementToProof" style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
 </div>
<div style="margin: 0in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That not only removed the tag that I actually wanted to delete, it also removed the duplicated tag that had no value.</div>
<div style="margin: 0in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
…I must say I am confused.</div>
<div class="elementToProof" style="margin: 0.25in 0in 4pt; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
So now the question begs to be asked.  If there are 2 tags, or more,  with the same name.  One with a value and one without, or for that matter they both have values and you want to remove a specific one. How would I do that.  If I use the metaflac command:</div>
<div class="elementToProof" style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
metaflac --remove-tag=SongRating WorkingMan_Copy.flac</div>
<div class="elementToProof" style="margin: 0in; font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
it removes both.</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<img size="39686" contenttype="image/png" style="max-width: 582px;" data-outlook-trace="F:1|T:1" src="cid:c8bed3b0-23ca-4576-87c3-2e6c6d96d839"></div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It seems the deep I go the more confused I am getting.</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dave</div>
<div id="appendonsend"></div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> brianw <brianw@audiobanshee.com><br>
<b>Sent:</b> Sunday, January 19, 2025 2:44 PM<br>
<b>To:</b> Dave B <daveb30@hotmail.com><br>
<b>Cc:</b> flac@xiph.org <flac@xiph.org><br>
<b>Subject:</b> Re: [Flac] Duplicate Tag</span>
<div> </div>
</div>
<div style="font-size: 11pt;">Hi Dave,<br>
<br>
I haven't reviewed metaflac to see whether its algorithm might incorrectly show a tag twice. It's possible that dBpoweramp appended a tag that already existed. I imagine that if metaflac says there's an occurrence of the tag with no value, and another with
 a value, then that's probably accurate. Can you show the output of metaflac? That might help verify.<br>
<br>
You could use other tools, like "hexdump -C path/filename" although it seems that you're on Windows, so you might not have that. Anyway, hexdump would show the raw file data, and then you could search for the 4-character tag to see whether it actually appears
 once or twice in the file.<br>
<br>
I'd be tempted to write a simple tool that only shows FLAC chunks as tag and size, but it's probably quicker to review metaflac to see whether it is correct.<br>
<br>
Brian<br>
<br>
<br>
On Jan 19, 2025, at 11:30 AM, Dave B. wrote:<br>
> If I run the metaflac command, "metaflac --show-all-tags path\filename".  There is a tag that is listed twice.  Only one of the tags has a value.  This seems to be the case for all of my flac files.  I ripped these with dBpoweramp and this tag was added/defined
 as a "custom" tag.<br>
><br>
> I can run the same command using exiftool, "exiftool --tag-all path\filename" and I only see the single tag, the one that has a value is the one listed.  If I look that this same file with MP3Tag "Extended Tags" I also only see it listed once, the one with
 the value.<br>
><br>
> Does anyone know why it might be listed twice using metaflac.  I thought metaflac would be the better tool since it is the "official" tool, at least I assume it is.  Exiftool will read flac files but will not write to them, so I wonder if I am getting a complete
 list from it.  And MP3Tag has me wondering, because of the name.  I dont care — OR WANT — mp3 tags.  I only want FLAC tags.<br>
><br>
> Can anyone shed some light on me.<br>
><br>
> Thanks<br>
> Dave<br>
<br>
</div>
</body>
</html>