Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: m-TAGS component (foo_tags) (Read 165834 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

m-TAGS component (foo_tags)

Reply #100
it maybe have something to do with BOM Marker

m-TAGS component (foo_tags)

Reply #101
it maybe have something to do with BOM Marker


Now I compared a !.tags file fresh at Win7 and after saving with an editor under Win XP. The editor shortens the file from 1441 to 1438 bytes, in hex the missing part at the beginning was "EF BB BF". After that the file works under WinXP.

But the (error-free) files which are generated from the Win XP foobar/m-TAGS come with "EF BB BF" and show for me no difference compared with the Win7 files. And when I add an comment to that file via foobar the !.tags gets that heading BOM again and works without errors.

I could not find any difference at the file properties, but are there additional properties or descriptions which get lost by copying the file from 7 to XP?

m-TAGS component (foo_tags)

Reply #102
I'm curious to know if foobar on both comps had scanned the media files prior to your using this component. foobar stores information from the files in its database, so if not, might it be possible that the XP machine simply doesn't display the missing info because it doesn't have it in its database and it isn't present in the .tags file?

m-TAGS component (foo_tags)

Reply #103
..] might it be possible that the XP machine simply doesn't display the missing info because it doesn't have it in its database and it isn't present in the .tags file?

The XP machine is monitoring and only looking for *.tags. The new files are found a short time after copying.

Perhaps there is an encoding problem between Win 7 and XP. Something like a wrong default encoding and some critical tolerance (by foobar or m-TAGS?) between unicode and utf-8. Or similar problems from the network connection, but I have not seen such problems before.



m-TAGS component (foo_tags)

Reply #104
This reply is for Kapriol, but anyone who's having the same issues is welcome to read.

1) The EF BB BF header.

This is a header that signals to Windows that the file is encoded as UTF-8. This was a requested feature, as it is the only way to properly and portably support unicode characters in the m-TAGS files. Your editor is removing that header and saving the files with another encoding (Windows 1252, I guess), which is just as fine if you do not use foreign characters. Both fb2k and m-TAGS will deal with the file, but if you edit it (using the masstagger, the property window, the inline editor, or whatever means) under fb2k it will again be saved in UTF-8 (therefore inserting the encoding header).

2) The duplicate tags issue

If you create the m-TAGS in the same folder you will obviously get BOTH the tags of the m-TAGS file AND the tags of the original files into fb2k when you load that folder. This is because the m-TAGS file is treated just like a media file (so fb2k loads both the m-tags and the "regular" media file). The suggestion to use an appropriate configuration for "Preferences / Shell Integration" was correct.

The proper way to deal with the issue, if you create the m-TAGS files in the same folder (which is what I do, btw), is to restrict the incoming files to "*.tags", BOTH IN THE SHELL INTEGRATION WINDOW AND IN THE LIBRARY WINDOW.

That said, now you face the issue of creating the m-TAGS files. If you restrict the interface to m-TAGS files, the others will not be loaded, and when you load a folder that does NOT contain m-TAGS yet, you get... well, nothing!

There are two ways to "properly" deal with the creation of new m-TAGS files. The WRONG solution is to use the context menu "Tagging / Create m-TAGS file". That functionality is intended to create an alternate playlist starting with a set of files. For example, it can be used to "re-create" a Beatles' US album properly selecting the appropriate tracks from the official UK releases and creating an m-TAGS file in a new folder. Then that folder can be loaded into fb2k, and the tags edited to create proper album and tracknumber tracks. Finally, you can put the proper cover in the new folder, and, voila', you have, say, "Meet the Beatles" without duplicating tracks.

But that's not what you are trying to do, so... forget the context menu! Here are the two "proper" ways to create a new m-TAGS file in the same folder:

1) Use "File / m-TAGS / Create m-TAGS (in same folder)". You just select the folder to tag, and it is going to be done. If you have several folder to tag, then just select a parent folder of all of them. The folder scan process will automatically skip all folders that do not contain recognizable media, as well as all folders were m-TAGS files are already present. So, m-TAGS will be created JUST FOR THE NEW FOLDERS. As a matter of fact, you can just scan an entire drive and create m-TAGS for all "new" folders in one shot.

2) If you are a batch or command line fan (as I am), then you can use the command line version. The command is:

<Folder where you installed fb2k>\foobar2000.exe  /quiet /m-TAGS "<Folder to tag>"

Please note that fb2k does not need to be running in order to run this command. You can run it from a command prompt, from a cygwin shell (if you have that), within a batch file, etc. Again, you can run it on a drive, and it will scan the entire drive in one shot.

Also, and this will be useful if you are NOT a command line buff, you can create a shell context menu entry. Here is how, if you are not an expert:

[blockquote]
Run regedit
Create a registry Key HKEY_CLASSES_ROOT/Folder/shell/m-TAGS
Edit its "(Default)" Value to be Create m-TAGS
Under the m-TAGS key, create a new Key command
Edit its "(Default)" Value to be <Folder where you installed fb2k>\foobar2000.exe /quiet /m-TAGS "%L"[/blockquote]

After that, you'll see that when you right-click on a folder in Windows Explorer, an item "create m-TAGS" will show up. If you run the command, then the m-TAGS scanner will scan the folder and all subfolders.

I hope this helps. Let me know if you have questions.

m-TAGS component (foo_tags)

Reply #105
I hope this helps. Let me know if you have questions.

Thank you.

to 2) new files / new tags (not a question):
Although the media files are not indexed by fb2k it is possible to create (even empty) m-TAGS.

to 1) BOM /  EF BB BF header:
Perhaps that feature does not work as you expect. The m-TAGS files (all with BOM) behave different when they are copied from Win7 to XP. May be that some special characters or line breaks (/n) in a comment field were treated different. Or could one of the foobar2k versions (1.2.6, 1.2.2) have a bug?



m-TAGS component (foo_tags)

Reply #106
Hey guys,

as stated over here I'm currently looking for a solution that allows me to overlay the metadata of webradios. As recommended by another user, I tried to acchieve this through m-TAGS. However, I didn't really get that far, since the plugin itself doesn't seem to work with normal files either.

Here's what I've tried:
1. create an m-tag file in the same folder of an album - works fine.
2. alter the m-tags within that file, start foobar and see e.g. the altered %title% - doesn't work.
3. change the tags of an file through properties, open m-tag file to see those changes there (instead of in the tags of the mp3 file) - doesn't work.

Am I doing anything wrong? I'm using foobar v1.2.9 Portable without any highlevel customization on Windows 7.

m-TAGS component (foo_tags)

Reply #107
As stated in the OP, you have to load the m-TAGS playlist-type file into fb2k, not the referenced audio files, and access the tags through the former. It sounds like you just kept trying to read/write the m-TAGS through the target files themselves.

m-TAGS component (foo_tags)

Reply #108
Bloody hell, I'm so stupid. Sorry and thank you so much, db1989!!!

By the way: it works fine with radio as well. PERFECT!!!!

m-TAGS component (foo_tags)

Reply #109
Haha.

m-TAGS component (foo_tags)

Reply #110
/* EDIT */
Hmm... but unfortunately it doesn't work while listening to the radio.


Great to hear!

Edit: Hmm. Maybe luigimercurio can offer an explanation in the other thread about how it apparently can’t work on currently playing streams, if that’s what you mean.


@luigimercurio can you?! That would be really awesome!!!

To explain it in more detail: the element in my playlist holds the m-tag data. As soon as I start the stream the metadata shown in the playlist and in popup+ seems to be replaced by the streamed info. When looking into the element's properties, I just see the m-tags.

m-TAGS component (foo_tags)

Reply #111
I hope this helps. Let me know if you have questions.

Thank you.

to 2) new files / new tags (not a question):
Although the media files are not indexed by fb2k it is possible to create (even empty) m-TAGS.

to 1) BOM /  EF BB BF header:
Perhaps that feature does not work as you expect. The m-TAGS files (all with BOM) behave different when they are copied from Win7 to XP. May be that some special characters or line breaks (/n) in a comment field were treated different. Or could one of the foobar2k versions (1.2.6, 1.2.2) have a bug?


Kariol:

I apologize, but I do not understand your first comment.

As for the second one, can you send me some trace? "Does not work" is not too specific. What happens? It does not load at all? Or are some tags broken? I have both XP and W7 computers at home and they all read/write from the same shared hard drive. I have never experienced a problem with the files. Are you editing them manually?

m-TAGS component (foo_tags)

Reply #112
/* EDIT */
Hmm... but unfortunately it doesn't work while listening to the radio.


Great to hear!

Edit: Hmm. Maybe luigimercurio can offer an explanation in the other thread about how it apparently can’t work on currently playing streams, if that’s what you mean.


@luigimercurio can you?! That would be really awesome!!!


Again, "It doesn't work" does not help me too much! Can you send me a trace? Please enable the verbose logging in Preferences / Advanced / Tagging / m-TAGS and send me a log file.

Also, additional details about what happens (does it stop playing? Doesn't play at all? Do tags get lost while playing???) would be great.

But perhaps most importantly, what are you trying to do? m-TAGS is static. It won't reflect tags changes from a stream. If the playing stream changes tags on the fly, m-TAGS won't "update" those tags. In that sense, it is safe to say that "it does not work with streams". It is not made for that. ;-)

m-TAGS component (foo_tags)

Reply #113
Thanks for your fast reply. I guess, you've missed my edit, which explains my purpose in a little more detail. But essentially you've got it. I'm trying to use the m-TAGS instead of the streamed meta data. It's to bad this doesn't work. m-TAGS seems to be a great plugin and just perfect for such a purpose.

Don't know if it helps, but here's my log. The m-TAGS are just dummy entries for testing:
Quote
Opening track for playback: "D:\sunshine.tags" / index: 1
CREATING TAGS
OPENING file://D:\sunshine.tags
[
  {
      "@" : "http://stream.hoerradar.de:80/sunshinelive-mp3-192?sABC=50708o38%230%23%23|0",
      "ALBUM" : "SSL",
      "ARTIST" : "Sunshine",
      "TITLE" : "Sunshine Live",
      "TOTALTRACKS" : "12",
      "TRACKNUMBER" : "12"
  }
]
[
  {
      "@" : "http://stream.hoerradar.de:80/sunshinelive-mp3-192?sABC=50708o38%230%23%23|0",
      "ALBUM" : "SSL",
      "ARTIST" : "Sunshine",
      "TITLE" : "Sunshine Live",
      "TOTALTRACKS" : "12",
      "TRACKNUMBER" : "12"
  }
]
Retrieving file statistics
Opening track 1
Resolving referenced path: http://stream.hoerradar.de:80/sunshinelive...o38%230%23%23|0
Canonical path: http://stream.hoerradar.de:80/sunshinelive...o38%230%23%23|0
m-TAGS:: REFERENCED FILE: http://stream.hoerradar.de:80/sunshinelive...o38%230%23%23|0 [0]
Reading tags: file://D:\sunshine.tags [1]
TAGS->INFO
{
  "@" : "http://stream.hoerradar.de:80/sunshinelive-mp3-192?sABC=50708o38%230%23%23|0",
  "ALBUM" : "SSL",
  "ARTIST" : "Sunshine",
  "TITLE" : "Sunshine Live",
  "TOTALTRACKS" : "12",
  "TRACKNUMBER" : "12"
}

m-TAGS component (foo_tags)

Reply #114
To explain it in more detail: the element in my playlist holds the m-tag data. As soon as I start the stream the metadata shown in the playlist and in popup+ seems to be replaced by the streamed info. When looking into the element's properties, I just see the m-tags.
Now we seem to have a proper explanation of the problem at last.

Disable this:

Preferences > Networking > Enable dynamic track titles

m-TAGS component (foo_tags)

Reply #115
I'm sorry for not providing it properly in the first place.

Unfortunately, disabling the dynamic track titles doesn't allow me to get the title and artist of the track currently played in the webradio. What I'd like to have is some kind of a merge between m-TAGS. More precisely, I wanna define e.g. %album% with m-TAGS while %title% and %artist% are used from the info provided by the stream.

I guess that's impossible, right?! :-)

/* edit */
The name of that option actually indicates that mainly the track titles should be altered dynamically, nothing else right?! This also comes appearant when taking a quick look at the respective wiki entry. As a consequence, it actually should work to do what I want, since only %title% and %artist% are replaced by the stream.

m-TAGS component (foo_tags)

Reply #116
i'm not really sure how any of this works but perhaps you can configure your playlist view to display %album% instead of %title whenever a stream is playing?

Code: [Select]
$if($stricmp($left(%path%,4),http),%album%,%title%)


edit: thinking about it, %path% will probably reference the m-tags file in which case, ignore me.

m-TAGS component (foo_tags)

Reply #117
i'm not really sure how any of this works but perhaps you can configure your playlist view to display %album% instead of %title whenever a stream is playing?

Code: [Select]
$if($stricmp($left(%path%,4),http),%album%,%title%)


edit: thinking about it, %path% will probably reference the m-tags file in which case, ignore me.


%path% will refer to the m-TAGS file, but $info(@) will contain the stream url.

m-TAGS component (foo_tags)

Reply #118
I guess that's impossible, right?! :-)
If you mean picking and choosing which fields are displayed from which of the two available sources (core or m-TAGS), altering the default behaviour, then yes, I guess so.

Quote
The name of that option actually indicates that mainly the track titles should be altered dynamically, nothing else right?! This also comes appearant when taking a quick look at the respective wiki entry. As a consequence, it actually should work to do what I want, since only %title% and %artist% are replaced by the stream.
Artist and title, not just title.

Does dynamic titling only override those two fields from m-TAGS, or does it replace all of your m-TAGS-source fields?

m-TAGS component (foo_tags)

Reply #119
@marc2003 although it doesn't work, that's basically a good idea (see below).

@luigimercurio is it possible to access the m-TAGS e.g. by %mtag_title% or through some function?

@db1989 yeah, artist and title, but nothing else. For example, neither %album% nor anything else should be "overwritten" by the stream. The dynamic titling doesn't override anything. Still, while streaming the tags are empty, except the title and artist which are the streamed ones. If i stop the stream, the m-TAGS are used again.

m-TAGS component (foo_tags)

Reply #120
OK, so the method used to invoke the dynamic titling seems to effectively cause the stream itself to be reloaded in place of the m-TAGS reference. I wonder if there is a way for the respective first- and third-party developers to work around this, at least as an option.

m-TAGS component (foo_tags)

Reply #121
For more detail. This is what happens:
Quote
Config (mTAG): %title% = 'T'; %artist% = 'A'; %album% = 'B'
State 1: Not streaming. %title% = 'T'; %artist% = 'A'; %album% = 'B'
State 2: Streaming. %title% = 'DYNAMIC_T'; %artist% = 'DYNAMIC_A'; %album% = ''
State 3: Not streaming. %title% = 'T'; %artist% = 'A'; %album% = 'B'


What should happen in State 2 is:
Quote
State 2: Streaming. %title% = 'DYNAMIC_T'; %artist% = 'DYNAMIC_A'; %album% = 'B'


I actually would try to work it out. But I have no experience in foobar development :-)

m-TAGS component (foo_tags)

Reply #122
Yes, you want the dynamic metadata to only override the two fields it provides, rather than also deleting all other fields.

m-TAGS component (foo_tags)

Reply #123
OK, so the method used to invoke the dynamic titling seems to effectively cause the stream itself to be reloaded in place of the m-TAGS reference.
Dynamic metadata is provided by the decoder of the stream. If the decoder wants to expose the static tags as part of the dynamic tags, it has to explicitly do that.
I wonder if there is a way for the respective first- and third-party developers to work around this, at least as an option.
It should be possible. I think the m-tags component wraps the decoder of the referenced file/stream inside its own decoder. Thus it could enrich the dynamic metadata returned by the stream decoder with static tags.

m-TAGS component (foo_tags)

Reply #124
@marc2003 although it doesn't work, that's basically a good idea (see below).

@luigimercurio is it possible to access the m-TAGS e.g. by %mtag_title% or through some function?

@db1989 yeah, artist and title, but nothing else. For example, neither %album% nor anything else should be "overwritten" by the stream. The dynamic titling doesn't override anything. Still, while streaming the tags are empty, except the title and artist which are the streamed ones. If i stop the stream, the m-TAGS are used again.


M-TAGS wraps the media file, so the title is just %title%. What you are really asking for is a way to access time m-TAGS after they are overwritten by the dynamic stream. I believe that dynamic tags completely overwrite the m-TAGS, as the disappearance of %album% seems to prove. So, even the obvious solution of changing the tag name (to something like %fixed_album% instead of %album%) would still not work. But maybe someone may try that?