IPB

Welcome Guest ( Log In | Register )

m-TAGS component (foo_tags), Support for m-TAGS metadata separation
luigimercurio
post Sep 24 2012, 03:51
Post #1





Group: Developer
Posts: 74
Joined: 23-January 11
Member No.: 87562



m-TAGS (foo_tags)

I created this for my own use. I am sharing it because if I have a need for it, maybe someone else does too....

The m-TAGS format offers a simple yet powerful solution to the media-metadata separation problem, which impacts the efficience of digital music collections and media distribution services alike. An m-TAGS file is media-independent. It just contains metadata (tags) describing a certain media source and a locator which identifies the source to which the metadata applies.

The format of an m-TAGS file is very simple. Each tag is represented by a pair "<tag name>" : "<tag value>", with the special "@" tag containing the location of the media resource. This format allows the defininion of any tag name and the assignment of any value to a tag. Support for multivalued tags is included, as well as for multi-part media indexing.

Download the component on the foobar2000 website (http://www.foobar2000.org) or here: http://m-tags.org/foo_tags.zip

For additional information and technical details please visit http://m-tags.org


Usage

For a first "taste" of how the m-TAGS mechanism works, select File / m-TAGS / Create m-TAGS (in same folder) from the main menu. Then browse to a folder where you have some audio files and press OK.

A new file will be created in your folder, named !.tags. If you open this file with any text editor, you will see that it contains the metadata of your audio files in plain text. You can edit the metadata directly if you wish.

If you drop the file into a foobar2000 playlist, it looks like your audio files are loaded into the playlist, just as if you had dropped a playlist file. However, if you look at the properties of the playlist entries, you will notice that the !.tags file was loaded instead.

Your audio files will play normally, but any changes to the metadata will be reflected in the !.tags file, and NOT in the audio files. As long as you use m-TAGS files to load your music into foobar2000, your audio files will play normally, but they never be touched by foobar2000. They will be treated as "read-only" audio sources. Even the replaygain tags will be read and written from / to the !.tags file.

Note: keep in mind that also all move / copy / delete file operations will be performed on the m-TAGS files!

Notes (mostly generated by feedback):

1. The component will generate UTF-8 files. It will still be able to read non-UTF-8 files.

2. You can change the default name for multi-reference m-TAGS file from "!" to another name (Preferences / Advanced / Tagging / m-TAGS / m-TAGS creator).

3. There is an option to always write all tags for each media source, without implementing the "cascading" optimization. It may simplify scripting on m-TAGS files (Preferences / Advanced / Tagging / m-TAGS / m-TAGS creator).

4. there is a command line option to create m-TAGS files "in-place" given a certain folder. It behaves exactly as if the provided folder had been selected using "File / m-TAGS / Create m-TAGS (in same folder)". The syntax is:


CODE
foobar2000 /m-TAGS <folder>



If you know how to create a shell context-menu script, then you can use the above command to "m-TAG" on the fly a folder and all subdirs from within Windows Explorer. Obviously, fb2k will start if it is not open. However, if you use

CODE
foobar2000 /quiet /m-TAGS <folder>



then you can "m-TAG" your folders without opening fb2k's main window.

----------------------------------------------------------------------------------------

Version 1.0 now available. Main upgrades are:

1) you can now write the tags from an m-TAGS file back to the media files;
2) m-TAGS will not attempt anymore to automatically load technical information from remote media files (i.e. URI's);
3) a new predefined tag "DURATION" allows to specify the duration of a track when technical information is not automatically loaded (it is ignored otherwise);
4) a new advanced setting option was added for the m-TAGS creator to retain media file extensions (i.e. scanning "track.mp3" will generate a "track.mp3.tags" file, rather than a "track.tags" file).

----------------------------------------------------------------------------------------

Version 1.02 fixes some issues with archived (zip/rar) files.

----------------------------------------------------------------------------------------

Version 1.03 adds the ability to edit durations as a regular tag ("%DURATION%"), and fixes a small glitch regarding local vs. remote locators

-----------------------------------------------------------------------------------------

Version 1.1 adds a few significant features:

1) m-TAGS files now encapsulate album art data. They reflect album art data present in the media file, and allow editing of the album art, but, abiding to m-TAGS philosophy, the album art is NOT inserted/removed into the media file until explicitely requested via the Tagging/Write m-TAGS to media files menu command. Album art is kept in binary files located in the folder where the m-TAGS file is.

2) "Pure" m-TAGS files are now supported. These are files without locators. They do not encapsulate any playable media, but they can be used by other input components to store metadata without having to write a specialized mechanism. All metadata i/o (including album art data i/o) can be deferred to the m-TAGS component. An instance of the input component may be obtained by simply calling input_entry::g_open_for_info_read(p_info_read_instance, NULL, <path to m-TAGS file>, p_abort) or input_entry::g_open_for_info_write(p_info_write_instance, NULL, <path to m-TAGS file>, p_abort).

The extension for a pure m-TAGS file is ".mtags". Note that you must obtain an m-TAGS input instance to load/save tags from/into an ".mtags" file using fb2k's SDK, because these files will NOT be recognized as media files (as they are not, indeed media files, nor files encapsulating media). As such, they will be trated in a playlist context just like any other non-recognized file.

When you use fb2k SDK calls, you MUST append an asterisk to the file path, because the pseudo-extension ".mtags*" IS recognized by the m-TAGS input component, while ".mtags" IS NOT (as previously explained). For example, if you want to store your metadata in a file named "C:/Music/My Album/album.mtags" then you can obtain an m-TAGS I/O instance by calling input_entry::g_open_for_info_write(p_info_write_instance, NULL, "C:/Music/My Album/album.mtags*", p_abort).

Similarly, you can obtain an album art editor for the same file by calling album_art_editor::g_get_interface(p_album_art_editor, "C:/Music/My Album/album.mtags*").

3) Input instances and album art editors may be opened for files which do not exist yet. In such case, m-TAGS automatically creates an empty, single-tracked m-TAGS component, and the file is only created if tags are edited and committed. This way, there is no need to physically create a pure m-TAGS file until it is actually needed (i.e. until tags are edited by the user or tags are insterted by the calling input component and a commit requested).

This mechanism is expecially useful when writing input components which offer support for network URI's. Developers may concentrate on connection and decoding issues, leaving m-TAGS to carry out metadata and album art I/O operations on pure m-TAGS files stored in a designated folder. These files could be indexed so that if a network URI is loaded again, the metadata is automatically loaded.

-----------------------------------------------------------------------------------------

Version 1.12 fixes a few nasty issues. Thanks a million to WilB and RiCON for the unvaluable help. Version 1.1 and 1.11 are deprecated. Please upgrade.



This post has been edited by luigimercurio: Aug 29 2015, 14:23
Go to the top of the page
+Quote Post
 
Start new topic
Replies
gabri.ns
post Aug 24 2013, 04:11
Post #2





Group: Members
Posts: 11
Joined: 28-June 13
Member No.: 108854



yes, it can... there is alot more other way to accomplish that.
but what i try to say here is that there is bug in that plug in.
honestly, i rarely use menu to create m-tags, i'd prever loading
the file to playlist, select all, and then create m-tags from context menu.
i trying to use the menu because this flow doesn't work well before for
shared folder... and that's why i trying the menu, to check wether its work,
and there i found the bug.

@EpicForever:
you can accomplish what you are trying to do using masstagger.
i've seen an option to copy tag between file. all you have to do is
add list of source file, then add the new file, select all, and copy tag.

This post has been edited by gabri.ns: Aug 24 2013, 04:12
Go to the top of the page
+Quote Post

Posts in this topic
- luigimercurio   m-TAGS component (foo_tags)   Sep 24 2012, 03:51
- - hyakukv   Wow! I was just thinking of this today. What a...   Sep 24 2012, 05:01
|- - luigimercurio   QUOTE (hyakukv @ Sep 24 2012, 05:01) Wow...   Sep 24 2012, 13:12
|- - Kohlrabi   QUOTE (luigimercurio @ Sep 24 2012, 14:12...   Sep 24 2012, 13:52
|- - luigimercurio   QUOTE It's a reference to online file sharing ...   Sep 24 2012, 15:01
|- - MrMonkey   QUOTE (Kohlrabi @ Sep 24 2012, 08:52) It...   Sep 24 2012, 18:27
|- - Kohlrabi   QUOTE (MrMonkey @ Sep 24 2012, 19:27) QUO...   Sep 24 2012, 20:09
|- - luigimercurio   QUOTE (MrMonkey @ Sep 24 2012, 18:27) QUO...   Sep 24 2012, 20:58
- - romor   Interesting idea and great file format choice foob...   Sep 24 2012, 06:54
|- - luigimercurio   QUOTE (romor @ Sep 24 2012, 06:54) Intere...   Sep 24 2012, 13:29
- - tpijag   hyakukv After reading the OP, are you really need...   Sep 24 2012, 12:56
- - romor   That is the version I've tried, I downloaded i...   Sep 24 2012, 13:47
- - Andreasvb   Some things I've noticed: - The sorting in Es...   Sep 24 2012, 18:15
|- - luigimercurio   QUOTE (Andreasvb @ Sep 24 2012, 18:15) So...   Sep 24 2012, 21:42
- - sevenarts   This is a great concept, and one that I'd love...   Sep 24 2012, 20:09
|- - luigimercurio   QUOTE (sevenarts @ Sep 24 2012, 20:09) Th...   Sep 24 2012, 21:56
- - Andreasvb   Works with %path_sort%, thanks.   Sep 24 2012, 22:51
- - BenB   I'll preface all of this by saying I use Colum...   Sep 24 2012, 23:03
|- - luigimercurio   Ben: The first problem (diacritical marks) should...   Sep 24 2012, 23:49
|- - luigimercurio   QUOTE (BenB @ Sep 24 2012, 23:03) Other t...   Sep 25 2012, 00:55
- - BenB   Thanks for the UTF-8 fix. Good deal. The network ...   Sep 25 2012, 01:25
|- - luigimercurio   QUOTE (BenB @ Sep 25 2012, 01:25) The net...   Sep 25 2012, 02:20
- - BenB   No, I still cannot access network folders on the N...   Sep 25 2012, 04:50
- - romor   FYI I run m-tags in local encoding (reason: it doe...   Sep 25 2012, 10:28
|- - luigimercurio   QUOTE (romor @ Sep 25 2012, 10:28) FYI I ...   Sep 25 2012, 13:58
|- - romor   QUOTE (luigimercurio @ Sep 25 2012, 14:58...   Sep 25 2012, 14:53
- - sevenarts   A few notes now that I've experimented a littl...   Sep 25 2012, 14:14
|- - luigimercurio   QUOTE (sevenarts @ Sep 25 2012, 14:14) A ...   Sep 26 2012, 04:31
|- - BenB   QUOTE (luigimercurio @ Sep 25 2012, 22:31...   Sep 26 2012, 22:14
- - romor   Noticed 2 issues with latest version: 1. Although...   Sep 25 2012, 19:00
|- - luigimercurio   QUOTE (romor @ Sep 25 2012, 19:00) Notice...   Sep 26 2012, 03:51
|- - romor   QUOTE (luigimercurio @ Sep 26 2012, 04:51...   Sep 26 2012, 09:21
|- - luigimercurio   The m-TAGS mechanism is created to create .tags fr...   Sep 26 2012, 14:24
|- - romor   QUOTE (luigimercurio @ Sep 26 2012, 15:24...   Sep 26 2012, 15:18
|- - luigimercurio   QUOTE (romor @ Sep 26 2012, 15:18) QUOTE ...   Sep 26 2012, 15:57
|- - luigimercurio   QUOTE (romor @ Sep 26 2012, 15:18) QUOTE ...   Sep 26 2012, 16:26
|- - luigimercurio   QUOTE (romor @ Sep 26 2012, 16:26) If tha...   Sep 26 2012, 22:07
- - romor   3. It changes foobar' working/default path, wh...   Sep 25 2012, 21:35
|- - luigimercurio   QUOTE (romor @ Sep 25 2012, 21:35) 3. It ...   Sep 26 2012, 04:15
- - luigimercurio   UPDATE New version here: http://m-tags.org/foo_t...   Sep 26 2012, 04:47
- - BoraBora   QUOTE (luigimercurio @ Sep 26 2012, 15:24...   Sep 28 2012, 00:44
- - Eclipsed Moon   Love it so far. Whenever I buy an album, I usuall...   Sep 30 2012, 08:27
|- - luigimercurio   QUOTE (Eclipsed Moon @ Sep 30 2012, 08:27...   Oct 2 2012, 18:08
|- - Eclipsed Moon   QUOTE (luigimercurio @ Oct 2 2012, 12:08)...   Oct 3 2012, 14:00
|- - luigimercurio   QUOTE (Eclipsed Moon @ Oct 3 2012, 14:00)...   Oct 27 2012, 15:58
- - zaede   Very nice tool for creating virtual albums Many t...   Sep 30 2012, 21:26
- - hyakukv   Hi. Thanks for this app. It works the way I wanted...   Oct 3 2012, 05:44
|- - luigimercurio   QUOTE (hyakukv @ Oct 3 2012, 05:44) Hi. T...   Oct 27 2012, 16:13
- - hyakukv   I'm actually having problems playing certain t...   Oct 3 2012, 18:05
- - foomark   I'd like to try this new component but i'm...   Oct 5 2012, 08:17
- - BenB   The site appears to be down. I haven't had the...   Oct 5 2012, 19:57
- - romor   You can grab last version from here: http://db.tt/...   Oct 5 2012, 20:32
|- - luigimercurio   QUOTE (romor @ Oct 5 2012, 20:32) You can...   Oct 27 2012, 16:16
- - hyakukv   QUOTE (hyakukv @ Oct 3 2012, 09:05) I...   Oct 5 2012, 21:26
|- - hyakukv   QUOTE (hyakukv @ Oct 5 2012, 12:26) QUOTE...   Oct 11 2012, 20:02
|- - luigimercurio   QUOTE (hyakukv @ Oct 11 2012, 20:02) QUOT...   Oct 27 2012, 16:48
|- - hyakukv   QUOTE (luigimercurio @ Oct 27 2012, 08:48...   Nov 27 2012, 08:36
- - tofu   thank you! i can get rid of mediamonkey now...   Oct 8 2012, 07:40
|- - luigimercurio   QUOTE (tofu @ Oct 8 2012, 07:40) thank yo...   Oct 27 2012, 16:33
- - elemiah   Hello ! It's not a important feature, but...   Oct 8 2012, 13:36
|- - luigimercurio   QUOTE (elemiah @ Oct 8 2012, 13:36) Hello...   Oct 27 2012, 16:39
- - MrMonkey   I've tried connectiong to the m-tags.org websi...   Oct 9 2012, 13:58
- - tofu   Thanks for the reply. My album rips with a single ...   Oct 27 2012, 16:41
|- - luigimercurio   QUOTE (tofu @ Oct 27 2012, 16:41) Thanks ...   Oct 27 2012, 16:50
- - r3v0   Hi, I'm trying your component and I found a bu...   Nov 21 2012, 18:39
|- - r3v0   QUOTE (r3v0 @ Nov 21 2012, 19:39) Hi, I...   Nov 21 2012, 20:23
- - Fire   I second hyakukv. There are lots of good sites th...   Dec 4 2012, 21:50
- - luigimercurio   Sorry for the delay. Well, philosophically, I do ...   Dec 13 2012, 23:35
- - dubwai   Media-metadata separation problem already solved b...   Dec 17 2012, 20:16
- - romor   WTF? Whats use of CreateObject("OlePrn.OleCvt...   Dec 17 2012, 21:02
|- - dubwai   romor I also, don't want to discuss my script,...   Dec 17 2012, 21:52
- - Ket   nthing the request for the ability to ignore .cue ...   Dec 24 2012, 22:57
- - gabri.ns   my experience using this: it work great with local...   Jun 28 2013, 09:28
|- - luigimercurio   QUOTE (gabri.ns @ Jun 28 2013, 09:28) my ...   Aug 13 2013, 13:58
|- - gabri.ns   QUOTE (luigimercurio @ Aug 13 2013, 19:58...   Aug 23 2013, 04:59
|- - BenB   QUOTE (gabri.ns @ Aug 22 2013, 22:59) ......   Aug 23 2013, 13:56
- - EpicForever   I needed some technical detail, but as m-tags.org ...   Aug 13 2013, 20:20
|- - luigimercurio   QUOTE (EpicForever @ Aug 13 2013, 20:20) ...   Aug 13 2013, 22:57
|- - luigimercurio   In any case, you're better off making proper u...   Aug 13 2013, 23:00
- - luigimercurio   !!!!! NEW RELEASE !!...   Aug 14 2013, 00:51
- - EpicForever   Thanks for your reply. That is really nice option ...   Aug 14 2013, 17:24
|- - luigimercurio   QUOTE (EpicForever @ Aug 14 2013, 17:24) ...   Aug 15 2013, 19:07
- - Rescator   Interesting! I'll try and factor this into...   Aug 17 2013, 15:09
- - Anakunda   This plugin crashes foobar2000 on starup, where ca...   Aug 22 2013, 18:07
- - gabri.ns   well, i'm not... please see bottom image, its ...   Aug 23 2013, 15:07
- - marc2003   does mapping drives to shares work? you'd coul...   Aug 23 2013, 15:25
- - gabri.ns   yes, it can... there is alot more other way to acc...   Aug 24 2013, 04:11
- - kariol   Hi. When I tried foo_tags the titles occured twice...   Aug 24 2013, 19:59
|- - gabri.ns   QUOTE (kariol @ Aug 25 2013, 01:59) Hi. W...   Aug 24 2013, 21:27
|- - kariol   After installing/copying the foo_tags.dll I run ...   Aug 26 2013, 15:11
- - BenB   You could try excluding either the mtags files (ki...   Aug 26 2013, 16:23
|- - kariol   QUOTE (BenB @ Aug 26 2013, 16:23) You cou...   Aug 26 2013, 18:26
|- - kariol   Now I am afraid that m-TAGS might not be usable in...   Aug 28 2013, 14:12
- - kariol   Files from a pc with windows 7 foob. 1.2.6. copied...   Aug 29 2013, 12:21
- - gabri.ns   you said before that one off a case is tags file c...   Aug 29 2013, 12:34
|- - kariol   QUOTE (gabri.ns @ Aug 29 2013, 12:34) you...   Aug 29 2013, 13:34
- - BenB   Just so I make sure I'm understanding your pos...   Aug 29 2013, 16:34
|- - kariol   QUOTE (BenB @ Aug 29 2013, 16:34) Just so...   Aug 29 2013, 17:44
- - gabri.ns   has you try comparing both created by Win7 n WinXP...   Aug 29 2013, 18:05
- - kariol   QUOTE (gabri.ns @ Aug 29 2013, 18:05) has...   Aug 29 2013, 19:11
3 Pages V   1 2 3 >


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 4th September 2015 - 12:15