IPB

Welcome Guest ( Log In | Register )

7 Pages V  < 1 2 3 4 > »   
Reply to this topicStart new topic
m-TAGS component (foo_tags), Support for m-TAGS metadata separation
sevenarts
post Sep 25 2012, 14:14
Post #26





Group: Members
Posts: 16
Joined: 5-September 12
Member No.: 102912



A few notes now that I've experimented a little more with this component:

- It would be really nice to have a preferences setting to control the naming of the !.tags file, especially with title formatting. If I have a .tags file for an album, I'd want to name it something like %album artist% - %date% - %album%.

- There should also be a preferences setting to control if creating m-tags in a seperate directory mimics the original directory structure or just creates a flat list - obviously, that could only be done and would only make sense if the !.tags files were instead named according to a title formatting pattern. Probably, it'd make sense to set up at least 2 title formatting patterns - one for creating m-tags in the same directory, one for separate directory.

- I don't use embedded artwork, but instead have folder.jpg in the same directory as the songs. If I create the .tags files in the same directory, the artwork displays correctly in foobar. But if I create the .tags files in a seperate folder, no artwork displays - obviously because foobar is loading the .tags file, not the audio files, and there may be no way around this, but it is inconvenient.

- On a related note, if the m-tags file isn't in the same folder as the audio files, even embedded artwork doesn't display.
Go to the top of the page
+Quote Post
romor
post Sep 25 2012, 14:53
Post #27





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



QUOTE (luigimercurio @ Sep 25 2012, 14:58) *
The UTF-8 version is the currently downloadable one: http://m-tags.org/foo_tags.dll

You may very well have downloaded it already without knowing.


Ah, I thought you just reverted to previous version, but after downloading it it seems that it's not the same as initial utf-8 version.
I installed it now, and hope for no crash

And even if it would crash I won't go back to version with user locale wink.gif


QUOTE
As for your python scripting demo, I find it very interesting. You point out that if the tags are in a single file, as opposed to "one-per-media-file", then things need to be approached differently. This is VERY MUCH the case, and it is because, by way of optimization, m-TAGS does not store all tag values for all entries, but "cascades" the values through the entries. This means that you would have to write a special algorithm to read the m-TAGS file.

I have the algorithm, of course. Let me know if you need it. But I wonder if I should add an option to create m-TAGS files WITHOUT cascading the values, for people who would like to take advantage of their JSON format for scripting. The inpact in space and loading time would probably be minimal anyway.

Thanks,

that should be simple in Python (assuming cascaded json file loaded in `dat` object):

CODE
for d in dat:                                   # for each json object
    for k in dat[0].keys():                     # for each key in json's top object
        if k not in d.keys():                   # if key doesn't exist in any of json's (cascaded) objects
            d.update({k : dat[0].get(k)})       # update the object


Result is updated uncascaded dictionary object `dat` (consider it json object)

I guess this can be further simplified in oneliner iterator/comprehension or so, but this way it's easier to see the logic


To repeat it again, I find your idea excellent.
You expose all metadata in portable format, writing new metadata should be faster then writing it in media file. Various benefits to keeping media readonly.
I wonder why no one else explored such possibility. Only drawback, if I can say it like that, could be that this concept may be confusing to regulars
I myself also will spend some time experimenting until I get familiar with this workflow

Cheers

This post has been edited by romor: Sep 25 2012, 15:11


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
romor
post Sep 25 2012, 19:00
Post #28





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



Noticed 2 issues with latest version:

1. Although it declares as UTF-8, it seems that does not read UTF-8, but in local codepage. It understands UTF-8 just fine if I retag m-tags afterwards, but while reading tags from files, metadata is normalized in user locale

2. Option to create tags in separate folder is dangerous if folder for storing m-tags is chosen inside location of source files. Explanation:

root
+ artist1
+ artist2

If I make m-tags folder as root subfolder and select root as source, then recursion makes additional ghost folders as it reads also this m-tags folder (I guess traversing is alphabetic so perhaps all artist with names starting in anything "lower" then M in this example are ghosted)


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
romor
post Sep 25 2012, 21:35
Post #29





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



3. It changes foobar' working/default path, which is the folder where foobar executable is located. I'm not sure which command does this, perhaps menu command - create m-tags in same folder.

This post has been edited by romor: Sep 25 2012, 21:36


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
luigimercurio
post Sep 26 2012, 03:51
Post #30





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



QUOTE (romor @ Sep 25 2012, 19:00) *
Noticed 2 issues with latest version:

1. Although it declares as UTF-8, it seems that does not read UTF-8, but in local codepage. It understands UTF-8 just fine if I retag m-tags afterwards, but while reading tags from files, metadata is normalized in user locale

2. Option to create tags in separate folder is dangerous if folder for storing m-tags is chosen inside location of source files. Explanation:

root
+ artist1
+ artist2

If I make m-tags folder as root subfolder and select root as source, then recursion makes additional ghost folders as it reads also this m-tags folder (I guess traversing is alphabetic so perhaps all artist with names starting in anything "lower" then M in this example are ghosted)


romor:

1. That should be fixed now: http://m-tags.org/foo_tags.dll. Please let me know....

2. You are really pushing it...... Yes it is traversed in alphabetical order, so you are right. I MAY decide to put in a check for such an irresponsible user behaviour :-)
Go to the top of the page
+Quote Post
luigimercurio
post Sep 26 2012, 04:15
Post #31





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



QUOTE (romor @ Sep 25 2012, 21:35) *
3. It changes foobar' working/default path, which is the folder where foobar executable is located. I'm not sure which command does this, perhaps menu command - create m-tags in same folder.


Can you be a little more specific? I do not notice this behaviour.
Go to the top of the page
+Quote Post
luigimercurio
post Sep 26 2012, 04:31
Post #32





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



QUOTE (sevenarts @ Sep 25 2012, 14:14) *
A few notes now that I've experimented a little more with this component:

- It would be really nice to have a preferences setting to control the naming of the !.tags file, especially with title formatting. If I have a .tags file for an album, I'd want to name it something like %album artist% - %date% - %album%.

- There should also be a preferences setting to control if creating m-tags in a seperate directory mimics the original directory structure or just creates a flat list - obviously, that could only be done and would only make sense if the !.tags files were instead named according to a title formatting pattern. Probably, it'd make sense to set up at least 2 title formatting patterns - one for creating m-tags in the same directory, one for separate directory.

- I don't use embedded artwork, but instead have folder.jpg in the same directory as the songs. If I create the .tags files in the same directory, the artwork displays correctly in foobar. But if I create the .tags files in a seperate folder, no artwork displays - obviously because foobar is loading the .tags file, not the audio files, and there may be no way around this, but it is inconvenient.

- On a related note, if the m-tags file isn't in the same folder as the audio files, even embedded artwork doesn't display.


- I will add an option to change to "!" to soemething else. I will not mess around with title formats, though, because it may lead to disastrous results. If you want to rename the m-TAGS files, all you have to do is load them into fb2k and use the fb2k contextual file operations to move / copy / rename them. You can use title formatting too, in this case. However, remember to check the option "Preferences / Advanced / Tagging / m-TAGS / m-TAGS creator / Only use absolute paths in references", otherwise the locators in the m-TAGS files will be invalid if you move or copy the files (rename is ok, of course).

- Same as above

- The artwork is an issue. Not for me as I always keep my m-TAGS files together with the media files, but I understand the struggle! One solution is of course to keep all non-audio files together with the m-TAGS files rather than with the media. After all, these files can be considered "tag-like" in nature, as they are not directly related to the audio sources, and they may also may change in time (you may get a cover with better resolution, you may rescan the booklet, etc.). Otherwise, if the relationship m-TAG file / audio files is fixed (for example, the m-TAGS folder structure replicated the audio files structure) then you can easily add a new Album Art source in "Preferences / Display".

- That is strange. It should be an always-or-never situation, independent of file colocation. I guess it depends on the way fb2k reads theembedded artwork. I may investigate this.
Go to the top of the page
+Quote Post
luigimercurio
post Sep 26 2012, 04:47
Post #33





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



UPDATE

New version here: http://m-tags.org/foo_tags.dll

New additions:

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

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

3. Added 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. I added 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 (it is quite easy in XP, I do not know about W7), 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, f 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: Sep 26 2012, 04:50
Go to the top of the page
+Quote Post
romor
post Sep 26 2012, 09:21
Post #34





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



QUOTE (luigimercurio @ Sep 26 2012, 04:51) *
1. That should be fixed now: http://m-tags.org/foo_tags.dll. Please let me know....

Works!

QUOTE (luigimercurio @ Sep 26 2012, 04:51) *
2. You are really pushing it...... Yes it is traversed in alphabetical order, so you are right. I MAY decide to put in a check for such an irresponsible user behaviour :-)

It's not the point that it's alphabetical of course, but it includes it's own folder and makes .tags files for created .tags files. It can't create m-tags for .tags! Anyhow it seems like you have corrected that

QUOTE (luigimercurio @ Sep 26 2012, 05:15) *
Can you be a little more specific? I do not notice this behaviour.

Command that changes foobar folder is context menu command "create m-tags files".
It's bad practice, and other components depend on it. This is last issue involving such practice: http://www.hydrogenaudio.org/forums/index....st&p=805524
Others also if you search the forums


Have a nice day smile.gif


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
luigimercurio
post Sep 26 2012, 14:24
Post #35





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



The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

Let me give you an example. If I own Frank Sinatra's "Complete Reprise Studio Recordings" box, then I may m-TAG it and load the m-TAG files into fb2k. At that point, by properly selecting the various subsets of tracks, I can recreate EVERY original album, EVERY single and even any of the gazillion Frank's compilations put out by Reprise. m-TAGS would take the tags from the original m-TAGS file(s) and copy them into my "extracted" m-TAGS files. Then, all I have to do is to change the album related tags (%album%, %track number%) in each of them and I am done. Just have to add the artwork to the folders and I have a nice Sinatra Reprise discography without physical duplication!

This feature is very important. That is why m-TAGS files should not be in a subfolder of the files to which they point. For the software there is no way (unless I add complicated checks, and the again someone may not want them) to figure out if an m-TAG file should be processed or not, because it cannot figure out what the user's intentions were when he created the m-TAG files. Even if I add a check for when the files are created the first time (i.e. do not parse what I just created) there is no way to enforce such a rule if you RESCAN the same folder (and subfolders) a second time.

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

As for the foobar folder issue, I will definitely look into it.


Thanks again!

This post has been edited by db1989: Oct 27 2012, 16:22
Reason for edit: deleting pointless full quote of above post
Go to the top of the page
+Quote Post
romor
post Sep 26 2012, 15:18
Post #36





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



QUOTE (luigimercurio @ Sep 26 2012, 15:24) *
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

If that the case than it fails at some point.
Tags created from other tags, as in above described scenario, produce non valid tags. Try it yourself. BTW I use each tags file for each file option.
It's also interesting that it's same behavior for both relative and absolute paths

This post has been edited by romor: Sep 26 2012, 15:26


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post
luigimercurio
post Sep 26 2012, 15:57
Post #37





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



QUOTE (romor @ Sep 26 2012, 15:18) *
QUOTE (luigimercurio @ Sep 26 2012, 15:24) *
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

If that the case than it fails at some point.
Tags created from other tags, as in above described scenario, produce non valid tags. Try it yourself. BTW I use each tags file for each file option.
It's also interesting that it's same behavior for both relative and absolute paths


Would you be able to send me a log and one of the misconstructed tags files?
Go to the top of the page
+Quote Post
luigimercurio
post Sep 26 2012, 16:26
Post #38





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



QUOTE (romor @ Sep 26 2012, 15:18) *
QUOTE (luigimercurio @ Sep 26 2012, 15:24) *
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

If that the case than it fails at some point.
Tags created from other tags, as in above described scenario, produce non valid tags. Try it yourself. BTW I use each tags file for each file option.
It's also interesting that it's same behavior for both relative and absolute paths


Never mind. I see what happens and I know why. I will fix it later today.




Go to the top of the page
+Quote Post
luigimercurio
post Sep 26 2012, 22:07
Post #39





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



QUOTE (romor @ Sep 26 2012, 16:26) *
If that the case than it fails at some point.
Tags created from other tags, as in above described scenario, produce non valid tags. Try it yourself. BTW I use each tags file for each file option.
It's also interesting that it's same behavior for both relative and absolute paths


Should be fixed. Let me know if it works for you, please!

http://m-tags.org/foo_tags.dll

Go to the top of the page
+Quote Post
BenB
post Sep 26 2012, 22:14
Post #40





Group: Members
Posts: 767
Joined: 17-April 12
Member No.: 98921



QUOTE (luigimercurio @ Sep 25 2012, 22:31) *
QUOTE (sevenarts @ Sep 25 2012, 14:14) *

- On a related note, if the m-tags file isn't in the same folder as the audio files, even embedded artwork doesn't display.

- That is strange. It should be an always-or-never situation, independent of file colocation. I guess it depends on the way fb2k reads theembedded artwork. I may investigate this.


If I'm remembering correctly, whether foobar shows external/folder artwork or embedded artwork depends upon size when both are present. Foobar displays whichever is larger. So... it may be that foobar detects the folder artwork as being larger (but cannot display it) and thus fails to display the embedded artwork.

@sevenarts:
Try removing the artwork from one of your folders and see if foobar will display the embedded artwork. On the other hand, if you're a Columns UI user, you can try going to Preferences > Display > Columns UI > Artwork tab and selecting Embedded artwork under Built-in foobar2000 artwork reader mode:.

This post has been edited by BenB: Sep 26 2012, 22:43
Go to the top of the page
+Quote Post
BoraBora
post Sep 28 2012, 00:44
Post #41





Group: Members
Posts: 125
Joined: 17-November 04
From: Paris, France
Member No.: 18179



QUOTE (luigimercurio @ Sep 26 2012, 15:24) *
The m-TAGS mechanism is created to create .tags from .tags indeed! That is because I want to be able to create different views from files I loaded via m-TAGS!

Audio tags frustrated me for years because I couldn't do that. Your idea is positively brilliant! A thousand thanks!
Go to the top of the page
+Quote Post
Eclipsed Moon
post Sep 30 2012, 08:27
Post #42





Group: Members
Posts: 18
Joined: 31-March 06
Member No.: 29028



Love it so far. Whenever I buy an album, I usually want to alter the tags one way or another, but I also want to keep the files as untouched as possible. I've been generating cuesheets and editing them instead for a while, but this is way more versatile.

The only problem I see now is track-splitting. While this thing can read embedded cuesheets and tag the tracks separately, attempting to embed a cuesheet in a .tags file just gives me a non-functioning tag with the CUESHEET name.
Go to the top of the page
+Quote Post
zaede
post Sep 30 2012, 21:26
Post #43





Group: Members
Posts: 46
Joined: 19-May 10
From: Switzerland
Member No.: 80754



Very nice tool for creating virtual albums

Many thanks!


--------------------
foobar2000 best player ever
Go to the top of the page
+Quote Post
luigimercurio
post Oct 2 2012, 18:08
Post #44





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



QUOTE (Eclipsed Moon @ Sep 30 2012, 08:27) *
Love it so far. Whenever I buy an album, I usually want to alter the tags one way or another, but I also want to keep the files as untouched as possible. I've been generating cuesheets and editing them instead for a while, but this is way more versatile.

The only problem I see now is track-splitting. While this thing can read embedded cuesheets and tag the tracks separately, attempting to embed a cuesheet in a .tags file just gives me a non-functioning tag with the CUESHEET name.


I use embedded cues all the time. I do NOT use external cue files at all, though. I am not sure that I understand what you are trying to do: embedding a cue sheet in an m-TAGS file? What do you mean for that? m-TAGS files cannot embed cue sheets. You just "m-TAG" either the cue sheet file or the audio file with the embedded cue sheet.

Please give me some more details. I do not understand if this is a bug or if you are trying to do something I did not foresee.
Go to the top of the page
+Quote Post
hyakukv
post Oct 3 2012, 05:44
Post #45





Group: Members
Posts: 8
Joined: 12-September 12
Member No.: 103106



Hi. Thanks for this app. It works the way I wanted it to.

Is it possible to somehow change or locate the music source? In case I move the music to a different location. Thanks.
Go to the top of the page
+Quote Post
Eclipsed Moon
post Oct 3 2012, 14:00
Post #46





Group: Members
Posts: 18
Joined: 31-March 06
Member No.: 29028



QUOTE (luigimercurio @ Oct 2 2012, 12:08) *
I use embedded cues all the time. I do NOT use external cue files at all, though. I am not sure that I understand what you are trying to do: embedding a cue sheet in an m-TAGS file? What do you mean for that? m-TAGS files cannot embed cue sheets. You just "m-TAG" either the cue sheet file or the audio file with the embedded cue sheet.

Please give me some more details. I do not understand if this is a bug or if you are trying to do something I did not foresee.

A file that already has an embedded cue in it works fine. An external cue works fine, too, but I'm trying to reduce how many extra files I'm using.

If I understand correctly from looking at files in a hex editor, an embedded cuesheet is actually simply another tag, and when foobar2000 sees it, it knows what to do. If it's a tag in m-TAGS, though, foobar2000 still sees it, but doesn't know what to do, and it only shows up as an extra tag in the Properties dialog. So, as you said, m-TAGS cannot embed a cuesheet, but I don't understand just why it can't.
Go to the top of the page
+Quote Post
hyakukv
post Oct 3 2012, 18:05
Post #47





Group: Members
Posts: 8
Joined: 12-September 12
Member No.: 103106



I'm actually having problems playing certain tracks in my library. I'm sure the .tags! file points to the correct location of the song files.

I'm getting the following error:
QUOTE
Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"N:\Black Box\foobar2000\m-TAGS\[LonE] K-ON! Music Collection\[LonE]_Fujitou_Chika_-_K-ON!_character_image_song_series_-_Manabe_Nodoka_[w_scans]_(FLAC)\!.tags" / index: 1

Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"N:\Black Box\foobar2000\m-TAGS\[LonE] K-ON! Music Collection\[LonE]_Various_Artists_-_K-ON!_Official_Band_Yarou_yo!!_[w_scans]_(FLAC)\DISC 1\!.tags" / index: 17

Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"N:\Black Box\foobar2000\m-TAGS\[LonE] K-ON! Music Collection\[LonE]_Hyakkoku_Hajime_-_K-ON!_ORIGINAL_SOUND_TRACK_[w_scans]_(FLAC)\!.tags" / index: 18

Decoding failure at 0:00.000 (Unsupported format or corrupted file):
"N:\Black Box\foobar2000\m-TAGS\[LonE] K-ON! Music Collection\[LonE]_Various_Artists_-_K-ON!_Official_Band_Yarou_yo!!_[w_scans]_(FLAC)\DISC 1\!.tags" / index: 13

Do you know how I could fix this? I was thinking a feature that allows u to change the path of source file would fix it. I'm trying to avoid recreating the m-TAGS files, because I have created a lot of tags for these songs already.

This post has been edited by hyakukv: Oct 3 2012, 18:06
Go to the top of the page
+Quote Post
foomark
post Oct 5 2012, 08:17
Post #48





Group: Members
Posts: 87
Joined: 12-July 11
Member No.: 92213



I'd like to try this new component but i'm not able to download it :S
My browser load the page http://m-tags.org forever, with no success.
Is it down or it's just a problem of mine?
Go to the top of the page
+Quote Post
BenB
post Oct 5 2012, 19:57
Post #49





Group: Members
Posts: 767
Joined: 17-April 12
Member No.: 98921



The site appears to be down. I haven't had the chance to download and try the latest "version".
Go to the top of the page
+Quote Post
romor
post Oct 5 2012, 20:32
Post #50





Group: Members
Posts: 682
Joined: 16-January 09
Member No.: 65630



You can grab last version from here: http://db.tt/WB4rkiRt

I'll remove the file when it becomes obsolete


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post

7 Pages V  < 1 2 3 4 > » 
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: 26th November 2014 - 16:24