Vorbis custom tag feature for mp3

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Millzey
Posts: 169
Joined: 07 Oct 2011 15:10

Vorbis custom tag feature for mp3

Post by Millzey »

Wow the new custom tag support for FLAC is fantastic, many thanks.

Is there a mess of complexity with ID3 tags that made this easy to implement for FLAC and not mp3, or is it already supported? With a mixed library of flac/mp3 it sort of becomes useless without mp3 custom tags also. I use a custom tag with mp3 and flac for rating. I tried using #mp3.btm_rating but it didnt work.

Thanks

admin
Site Admin
Posts: 66720
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Vorbis custom tag feature for mp3

Post by admin »

I was not aware that ID3v2 supports custom tags! Can you send me a such a file (or a link to one)?

Millzey
Posts: 169
Joined: 07 Oct 2011 15:10

Re: Vorbis custom tag feature for mp3

Post by Millzey »

Most players support reading custom tags, and foobar2000 is the only one I know of that supports writing custom tags. However with that said fb2k is king of music management with the right modifications and is among the most popular.

I'll try to link you to a free mp3 with some custom tags, or if anyone else has one handy please offer. If you open the properties window of a mp3 in foobar2000, right click and choose add field will add a new tag.

JLoftus
Posts: 600
Joined: 22 Jan 2014 14:58

Re: Vorbis custom tag feature for mp3

Post by JLoftus »

This works fine for custom tags in FLAC files, but does not seem to work for custom tags in MP3 files. When I add this custom column I see the custom tag info for FLAC files but not for MP3 files. I've tried using flac;mp3 for the item filter, as well as {:Audio} and even leaving the item filter blank. All result in the custom tag showing for FLAC but not MP3.

Using the script logic you demonstrated here: viewtopic.php?p=141871#p141871
CustomColumnSource.png
CustomTagProps.png
Here is a small MP3 file with such custom tags: https://drive.google.com/open?id=1jH51- ... WgpgVa-Yxn

Is this a bug, something else I am doing wrong, or something not possible at this time in XY?

Thanks
To see the attached files, you need to log into the forum.

highend
Posts: 15004
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Vorbis custom tag feature for mp3

Post by highend »

Haven't read the full thread you've linked but as it is about flac tags I assume that
custom tags were only added for them, not for .mp3s (maybe it should be tested with
.ogg (if .ogg supports custom tags) to confirm that)...
One of my scripts helped you out? Please donate via Paypal

jupe
Posts: 3478
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Vorbis custom tag feature for mp3

Post by jupe »

Current abilities according to the help file:
Audio Tags. Supported tag formats: ID3 tags (MP3 files), Vorbis Comments (FLAC and OGG files).
#tag.album = Tag Album
#tag.artist = Tag Artist
#tag.Comments = Tag Comments
#tag.Composer = Tag Composer
#tag.genre = Tag Genre
#tag.title = Tag Title
#tag.track = Tag Track
#tag.year = Tag Year

Vorbis Comments (FLAC and OGG files) are freely definable: You can pass whatever tag you want. If the tag is actually in the file you will get the value in return. Examples:
#tag.performer or #tag.PERFORMER (functionally identical)
#tag.encoder
#tag.whateveryouwant
only those tags listed are supported by MP3, FLAC and OGG being freely definable though.

you can paste the following into the XY address bar for more information if you are interested:

Code: Select all

::help "idh_scripting_comref.htm#idh_sc_property";

JLoftus
Posts: 600
Joined: 22 Jan 2014 14:58

Re: Vorbis custom tag feature for mp3

Post by JLoftus »

Right then, it seems custom tags are not supported by MP3. I guess this will likely never be something we can do? :(

highend
Posts: 15004
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Vorbis custom tag feature for mp3

Post by highend »

Create a feature wish and we'll see if Don is able to support it for .mp3 files as well...
One of my scripts helped you out? Please donate via Paypal

jupe
Posts: 3478
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Vorbis custom tag feature for mp3

Post by jupe »

In the meantime JLoftus if you are interested you could probably use something like this if you don't mind using command line MediaInfo.exe, it works on the file you attached, my script code could be cleaner but it is just an example.

Code: Select all

 if ("<cc_ext>" LikeI "flac") {$value = property("#tag.source", <cc_item>); }
 if ("<cc_ext>" LikeI "mp3") {$value = trim(runret("""%APPDATA%\Mediainfo.exe"" ""--Inform=General;%Media Type%"" ""<cc_item>"""), <crlf>);}
 return $value;

JLoftus
Posts: 600
Joined: 22 Jan 2014 14:58

Re: Vorbis custom tag feature for mp3

Post by JLoftus »

Thanks very much. I installed MediaInfo and modified the script slightly to account for the path ("""%PROGRAMFILES%\MediaInfo\Mediainfo.exe"") but it doesn't appear to be working for me. The FLAC files still show the tag, so the "if" portion of the script there is still working.

I'll keep stabbing at it, if you have any ideas, I'd appreciate it. Thanks!

jupe
Posts: 3478
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Vorbis custom tag feature for mp3

Post by jupe »

It could be that %PROGRAMFILES% needs to be %PROGRAMW6432%, I only tested that one file that you posted, does it work on that file?

JLoftus
Posts: 600
Joined: 22 Jan 2014 14:58

Re: Vorbis custom tag feature for mp3

Post by JLoftus »

Also curious, why MediaInfo shows my custom tag named "Source" as "Media Type". Nevertheless, I tried both and I am not returning any value.

jupe
Posts: 3478
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Vorbis custom tag feature for mp3

Post by jupe »

Are you definitely using the command line (CLi) version of Media Info?

https://mediaarea.net/en/MediaInfo/Download/Windows

If you are, with a mp3 file selected does this work from the XY address bar:

Code: Select all

text runret("""%PROGRAMFILES%\MediaInfo\Mediainfo.exe"" ""<curitem>""");
Or this:

Code: Select all

text runret("""%PROGRAMW6432%\MediaInfo\Mediainfo.exe"" ""<curitem>""");

highend
Posts: 15004
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Vorbis custom tag feature for mp3

Post by highend »

Also curious, why MediaInfo shows my custom tag named "Source" as "Media Type
Probably it's mapped to that tag type
One of my scripts helped you out? Please donate via Paypal

JLoftus
Posts: 600
Joined: 22 Jan 2014 14:58

Re: Vorbis custom tag feature for mp3

Post by JLoftus »

OK, got it working.... for some reason, I had to explicitly spell out "C:\Program Files\" rather than using %PROGRAMFILES%, not sure why.

Before you had responded, I dug back into that other FLAC thread and saw the comment from Highend about gettags, so I tried that, and this works also:
if ("<cc_ext>" LikeI "mp3") {$value = runret("""c:\util\gettags_mingw.exe"" -e TMED ""<cc_item>""");}
return replace($value, "<crlf>");

There too, my custom tag named "Source" was mapped to "TMED" (took some fiddling to figure that out after also getting no return, verbose listing shows:
TMED Soundboard
TALB 20020825 Las Vegas, NV
TYER 2002
TXXX Quality
TIT2 We Have Heaven
TPE1 Yes
TRCK 105

So, using either utility (MediaInfo or gettags) I must use the "Media Type" tag, although I'm still not clear why my custom tag is getting mapped to that. Windows Explorer and XY both show my tag name as "Source".

In any event, I remain hopeful the wish for native MP3 custom tag handling is something Don can someday do!

Thank you again for your help. Using external binaries [IMO] is kludgy, but for now it works.

Post Reply