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: 53
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 here: http://m-tags.org/foo_tags.dll

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.

This post has been edited by luigimercurio: Aug 22 2014, 18:46
Go to the top of the page
+Quote Post
 
Start new topic
Replies
dubwai
post Dec 17 2012, 20:16
Post #2





Group: Members
Posts: 36
Joined: 23-January 11
Member No.: 87576



Media-metadata separation problem already solved by foo_input_monkey.dll.
Two years ago, when I start use private trackers, I start searching solution to solve problem, how to get proper tags (or just replaygain info) in my musical collection without modification files, because I want to seed all what I download. And I find solution with foo_input_monkey.dll. It allows to use Monkey's Audio Image Link File (APL) native in foobar2000. APL is simple file, with path to media and APE tags. One APL file = one track. Path to source can be relative, exact or just name of file in the same directory. APE tags fully specification support, so in fb2k I can get anything I want, for example multi value tags and etc. It’s standard APE tags, witch works with all fb2k functions natively: convector, all taggers (discogs, mb, cddb, etc), etc. This example of APL file:
CODE
[Monkey's Audio Image Link File]
Image File=FILENAME.ape // mp3, flac, wv, whatever witch support fb2k
Start Block=0
End Block=34289 // This line not necessary, it need only for album in one image file

----- APE TAG (DO NOT TOUCH!!!) -----
//here will be APE tags witch use fb2k,

As you can see, you can use with any codec type of source files, works with everything witch supported by fb2k. Only bad thing that foobar2000 can create natively APL files, only for image .ape files with .cue. And it’s main reason why I post to this thread. Maybe author want to not to create own bicycle and just wrote plugin for already exciting solution of metadata separation problem.
But you may ask, how you say that you find solution, when this link files can be done only for ape image+cue files? Answer is simple, I wrote simple vbs script. And my work flow, now very simple and quick. First of all, I download music content from whatcd. Then, I give to script path of the album (all whatcd torrents must be in separate folders:) and he create APL files file_name.apl for MP3 or FLAC files, witch it found in directory what I give to him. It practice, I just enter to folder what I download in total commander and hit only one button with start script, another solutions maybe more automatic, for example automatic start script, when utorrent finish downloading, but I don’t try it, because I add to collection not all what I download. Then my fb2k collection settings to monitor only *APL files in my music directories, so when APL files created it automatic adds to fb2k collection. When this apl file with only path to file and without tags gets in foobar2000, fb2k read tags of source files and wrote them to APL files. So in collection your new albums already get tags from original files, and then you can correct them as you wish.
Already size of my collection is ~2TB (MP3 and FLAC) and all it, foobar2000 see throw apl files. I don't find any problems with this solution. But year ago one of my hdd start damage, so many music files was damaged, but I just copy it to another hdd, start recheck hash in utorrent, download damage pieces and main things, that it don’t touch my fb2k collection tags and statistic. WOW! I love p2p!
So again, my English is not perfect, may be I wrote not well for understanding, what I mean, but I think that this solution is already perfect works for this kind of problem, except creating apl files. Because in m-tags I don't find any advantage over APL method. So may be author of m-tags want to solve problem with creating apl files with foo_plugin, and start populized it (web site) because vbs method not trivial to understand for average p2p user.

This my vbs script:
CODE
' How to use:
' wscript.exe script_path folder_to_work1 [folder_to_work2] [...]

Option Explicit

Const EXT_FILTER = "*.mp3; *.flac; *.ape; *.wv"

If WScript.Arguments.Length Then
  Dim objShApp
  Dim objFSO
  Dim objOC
  Dim i
    Set objShApp = CreateObject("Shell.Application")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objOC = CreateObject("OlePrn.OleCvt.1")
    For i = 0 To WScript.Arguments.Count - 1
      RecDirs objFSO.getfolder(WScript.Arguments.Item(i))
    Next
    Set objShApp = Nothing
    Set objFSO = Nothing
    Set objOC = Nothing  
End If

MsgBox "APL files created"

WScript.Quit

Sub RecDirs(sDir)
  Dim SubDir
  Dim arrFiles
  Dim i
    For Each SubDir In sDir.SubFolders
      RecDirs(SubDir)
    Next
    Set arrFiles = objShApp.NameSpace(sDir.Path).Items
    arrFiles.Filter 192, EXT_FILTER
    For i = 0 To arrFiles.Count - 1
      CreateAplFile arrFiles.Item(i).Path
    Next
End Sub

Sub CreateAplFile(fPath)
  Dim aplFileUTF8
  Dim aplFileWithoutBOM
  Dim aplFileName
    aplFileName = objFSO.GetParentFolderName(fPath) & "\" & objFSO.GetBaseName(fPath) & ".apl"
    If Not objFSO.FileExists(aplFileName) Then
        Set aplFileUTF8 = CreateObject("ADODB.Stream")
            aplFileUTF8.Type=2
            aplFileUTF8.Charset = "UTF-8"
            aplFileUTF8.Open
            aplFileUTF8.WriteText     "[Monkey's Audio Image Link File]" & vbCrLf & _
                                    "Image File=" & objFSO.GetFileName(fPath) & vbCrLf & _
                                    "Start Block=0" & vbCrLf & vbCrLf & _
                                    "----- APE TAG (DO NOT TOUCH!!!) -----" & vbCrLf & _
                                    ""
            aplFileUTF8.Position=3
        Set aplFileWithoutBOM = CreateObject("ADODB.Stream")
            aplFileWithoutBOM.Type=1
            aplFileWithoutBOM.Open
        aplFileUTF8.CopyTo aplFileWithoutBOM
        aplFileWithoutBOM.SaveToFile(aplFileName)
    End If
End Sub

This random apl file from my collection:
CODE
[Monkey's Audio Image Link File]
Image File=01. Basic Channel - Enforcement.flac
Start Block=0

----- APE TAG (DO NOT TOUCH!!!) -----
APETAGEXР                          Track 1/6       Album BCD-2
       Artist Basic Channel        Barcode 827670143123       Catalognumber BCD-2       Year 2008
       Genre Electronic
       Label Basic Channel$       Musicbrainz_albumid 1b43a144-f4be-4365-b376-947d93586550       Musicbrainz_albumstatus Official       Musicbrainz_albumtype Compilation$       Musicbrainz_artistid d145a57e-7afb-4793-8cc4-2fad292374ef$       Musicbrainz_releasegroupid 17f80ceb-4cd5-3158-8dd5-6c1b5267b845$       Musicbrainz_trackid 15a54337-f1c7-4804-b4bf-414453f8fc62       Rerating 1       Title Enforcement        Tracktype instrumental       replaygain_album_gain -6.75 dB       replaygain_album_peak 0.999969       replaygain_track_gain -6.89 dB       replaygain_track_peak 0.991089APETAGEXР          Ђ


P.S. Also I will glad to answer any questions, because I want to get more seeds on torrents smile.gif And may be anyone adds any info about APL files to hydrogenaudio wiki, and maybe gives link to solution, how to used them to solve metada separation problem.

This post has been edited by dubwai: Dec 17 2012, 20:21
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
2 Pages V   1 2 >


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: 31st October 2014 - 10:21