m-TAGS component (foo_tags), Support for m-TAGS metadata separation
m-TAGS component (foo_tags), Support for m-TAGS metadata separation
Sep 24 2012, 03:51
Joined: 23-January 11
Member No.: 87562
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
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:
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
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.
This post has been edited by luigimercurio: Jul 17 2015, 23:06
Sep 24 2012, 23:03
Joined: 17-April 12
Member No.: 98921
I'll preface all of this by saying I use Columns UI.
Very promising plugin but it has issues with folders with names containing letters with diacritical marks or punctuation.
If said folder is opened as the source folder using File > m-TAGS > Create m-TAGS (in same folder), it will fail. (Interestingly, if you open a folder as source without diacritics in its name but containing subfolders that do have them, it works).
If said folder is opened as the source folder using File > m-TAGS > Create m-TAGS (in separate folder), it will fail to create a file but will create a destination folder with a name cut off at where it encounters diacritics or punctuation. (Unfortunately, I could only delete the folders using an elevated command prompt I believe this may have been caused by selecting a destination folder which had diacritics in its name. I'm not really interested in trying to re-create this).
If contents of said folder are selected in a playlist by clicking on a Grouping or by selecting them, using right-click Tagging > Create m-TAGS file resulted in a file containing all tracks, all of which loaded and played in foobar if I selected a destination folder which didn't contain diacritics or punctuation in its name (Oddly however, it seems to cause foobar to immediately add the tags file to the library. I have to investigate this further to be sure). Selecting the contents folder as the destination folder results in failure to create a file but will create a destination folder (again with a name cut off at where it encounters diacritics or punctuation) in the parent folder (Luckily I was able to simply delete the folders).
Other things I noticed:
Using right-click Tagging > Create m-TAGS file in Album List Panel has varying degrees of success. Selecting various parent nodes usually resulted in 1) creation of a file containing all tracks of which either only the first album/folder or random tracks from various albums/folders loaded in foobar 2) creation of a file which either did not contain all tracks or did not contain all albums/folders 3) failure to create a file.
Selecting a parent Grouping (%album artist% in this case) in NG Playlist and using right-click Tagging > Create m-TAGS file resulted in a file that contained all tracks from all albums/folders, all of which loaded and played in foobar .
A person cannot access network files/folders using File > m-TAGS > Create m-TAGS (in same folder) or File > m-TAGS > Create m-TAGS (in separate folder) if using a limited account.
I'm not too familiar with foobar. Is the file path not accessible for use with File > m-TAGS > Create m-TAGS (in same folder)? I'm wondering why one has to set the source and destination with this option.
I am using an administrative account on W7 64.
This post has been edited by BenB: Sep 25 2012, 00:01
|Lo-Fi Version||Time is now: 2nd August 2015 - 22:19|