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: External Tags (Read 53526 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: External Tags

Reply #300
It comes from foo_midi's own tag database system, which I don't know if it supports tag removal properly.

Re: External Tags

Reply #301
Ah, okay. Thank you.
It's because i've had some problems with metadata like title and artist not following correctly when synchronizing my music folders across computers. That makes sense, if the tags are stored in a database seperate from the music folder.
I do not have a portable install, but a local install on both computers, which then both have the synchronized folder added in the media library.

Re: External Tags

Reply #302
HI,I have some trouble creating my own .tag file outside fb2k(v1.5.2):
this is the python code:
#############################################
import mutagen
from mutagen import apev2
import io
a = apev2.APEv2()
a['Album'] = 'Rain'
a['Artist'] = 'BlaBla'
buf = io.BytesIO()
a.save(buf)
# the audio file name is test.mp3
with open('test.mp3.tag', 'wb') as f:
    # mutagen's apev2 header don't have 'TAGFILE'
    # so add it in front and since header's `size` field
    # only count TAGS ITEM and footer, so no need to hack into
    # the original implementation to update the header's `size` field
    f.write(b'TAGFILE'+ buf.getvalue())
#############################################
and the external tag's configure is:
* Use only APE TAGS
* Take over all tagging
and it can't be recognized by fb2k. and something weird happened:
when i right click on the file > Taggging > Edit External Tags and add some other field.
suddenly it can be recognized and the fields tagged by python is in there.
I've checked a python created ape tag file and the one created totally by external tags and found no difference.
so I wonder it's trigger problem in external tags?

Re: External Tags

Reply #303
Have you tried reloading info from files? Generally speaking foobar2000 doesn't ask for new tag info if the file timestamps don't change from the last time the metadata was read.

Re: External Tags

Reply #304
It works! Thanks! I didn't even know there is a 'reload info' button. Sorry, I didn't read through all the comments in this thread due to difficulty  in reading English :(
but is there a convenient way to let fb2k reload all the info?

that's pretty weird. I remove it from playlist and add it back why fb2k doesn't reload the info. It stores all the file access info in somewhere?

Re: External Tags

Reply #305
foobar2000 caches metadata pretty aggressively. You can force reload info for all track in the media library for example with Album List (Library -> Album List). Hold shift while right clicking "All Music" entry at the top and select Tagging -> Reload info from file(s). Note that it can take a while with large library.

Re: External Tags

Reply #306
Thanks again. Now I know that simply `touch` the files works.
And here is the python code:
############################
from pathlib import Path
Path('path/to/test.mp3').touch()
############################

Re: External Tags

Reply #307
Hi, I'm having some trouble with external tags not working correctly with a select few mp3s. (using External Tags version 1.5.9 - I only noticed this today, it may have been an issue for much longer.)
The mp3s in question all come from the same source. Here's just one short jingle uploaded as an example:

https://www.dropbox.com/s/fgnbhj95d9jt851/125_2_run_home_run_%28in_game%29.mp3?dl=0

What I am experiencing: if I generate an external tag for this or other related mp3s, upon playback the tag information disappears from foobar2000's playlist - as if the external tag isn't being read. On pressing stop, the tag information repopulates.

Things I have tried, but have not helped:
- Reducing the internal tags to only contain ID3v2
- Optimising the file layouts
- Fixing VBR MP3 headers
- Rebuilding MP3 streams
- Verifying integrity (all files concerned are reported as 'OK')

One thing I know will work is if I use foobar2000 to transcode to fresh mp3 files and bin the originals, though obviously not keen on doing that if there is another option. Any ideas/suggestions?

Re: External Tags

Reply #308
you might want to check if there's also ID3v1 tags in those files.

Re: External Tags

Reply #309
Thanks for notifying, @iridescentaudio - APEv2 reading had a bug that is now fixed.


Re: External Tags

Reply #311
Found a bug where the External tags (folder.tags) won't be read if the foobar2000 instance crashed during tagging. Reopening and even rescanning the media library, and the Properties window still show tag from the file instead of the folder.tags

Luckily I only tagged 2 albums before foobar2000 crashed. And have to resort to recreate a new External tag again. Even copy / pasting the previous folder.tags to the new one still doesn't picked up by foobar.

Tested on foobar 1.5.3 without the need to set external tags reader priority. Not sure what is the cause. Strangely clicking Context Menu > Tagging > Edit External Tags can read the tags from folder.tags. But properties windows doesn't.

Re: External Tags

Reply #312
I created external_tags for youtube streams that I added with foo_youtube, but I cannot find the created external tag file nor the sqlite file. Where are these?

EDIT: I found it...

Re: External Tags

Reply #313
Found a bug where the External tags (folder.tags) won't be read if the foobar2000 instance crashed during tagging. Reopening and even rescanning the media library, and the Properties window still show tag from the file instead of the folder.tags

Luckily I only tagged 2 albums before foobar2000 crashed. And have to resort to recreate a new External tag again. Even copy / pasting the previous folder.tags to the new one still doesn't picked up by foobar.

Tested on foobar 1.5.3 without the need to set external tags reader priority. Not sure what is the cause. Strangely clicking Context Menu > Tagging > Edit External Tags can read the tags from folder.tags. But properties windows doesn't.
You should use Reload info feature to force foobar2000 to bypass its internal metadata cache and reload the info from files. You can find it in the properties dialog's Tools button or under Tagging menu of the right click context menu if you hold down shift-key before you right click.

The player crashing isn't normal behavior. Hopefully you submitted the crash logs. If my components are the cause I want to get them fixed as soon as possible.

Re: External Tags

Reply #314
Found a bug where the External tags (folder.tags) won't be read if the foobar2000 instance crashed during tagging. Reopening and even rescanning the media library, and the Properties window still show tag from the file instead of the folder.tags

Luckily I only tagged 2 albums before foobar2000 crashed. And have to resort to recreate a new External tag again. Even copy / pasting the previous folder.tags to the new one still doesn't picked up by foobar.

Tested on foobar 1.5.3 without the need to set external tags reader priority. Not sure what is the cause. Strangely clicking Context Menu > Tagging > Edit External Tags can read the tags from folder.tags. But properties windows doesn't.
You should use Reload info feature to force foobar2000 to bypass its internal metadata cache and reload the info from files. You can find it in the properties dialog's Tools button or under Tagging menu of the right click context menu if you hold down shift-key before you right click.

The player crashing isn't normal behavior. Hopefully you submitted the crash logs. If my components are the cause I want to get them fixed as soon as possible.

Thanks Case again for the reply. The occasional crash is indeed caused by other playlist viewer that I had in my skin, I am using a lot and had to disabled all of them and leave one on.

Not sure if others reported this before, but after using External Tags very rigorously since my last reply on stable foobar 1.5.3, I noticed that after moving files to a new location, some tracks (usually one) would lose the External Tags info and fallback to the file tags. And I had to Reload Info for the tag to shown properly. This happens on the latest foobar 1.6beta as well. So I have to keep in mind to Reload Info whenever I moved the files, and do a Reload Info on all my 3TB music lilbrary every months or so to keep all the tags in check.

Re: External Tags

Reply #315
I have some .mkv files where External Tags seems to take over tagging and create external tags overzealously. In particular it seems to happen when I run the Tag Sanitizer component on them. The tags on these files are able to be read/written to by foobar natively and when I don't have External Tags installed, I can run Tag Sanitizer on them and the files are correctly updated with some tags removed. However when External Tags is installed, running Tag Sanitizer will cause external tags to be created, after which the external tag takes priority over the file's tag. Maybe Tag Sanitizer is running some operation which isn't supported by the mkv decoder, but which isn't actually important?

Either way it would be nice to have an option to never automatically create external tags, ie. only read/write to ones created manually using the context menu, as at the moment this behaviour causes foobar to silently stop writing tag changes to those files without any notice.

Re: External Tags

Reply #316
Not sure if others reported this before, but after using External Tags very rigorously since my last reply on stable foobar 1.5.3, I noticed that after moving files to a new location, some tracks (usually one) would lose the External Tags info and fallback to the file tags.
This is a new report and I haven't seen this happening. Could you check the foobar2000 console after the file operations to see if the component reports any problems?

I have some .mkv files where External Tags seems to take over tagging and create external tags overzealously. In particular it seems to happen when I run the Tag Sanitizer component on them.
Thanks for the bug report, I could replicate it here. It was caused by the fallback album art tag writer creating an external tag from the file contents as soon as tag writer was opened. I changed the behavior so it only copies existing tags to external tag when the commit command is called and there is actual art data to store.

Either way it would be nice to have an option to never automatically create external tags, ie. only read/write to ones created manually using the context menu, as at the moment this behaviour causes foobar to silently stop writing tag changes to those files without any notice.
This should be unnecessary now that the bug is fixed. I hope you agree.


Re: External Tags

Reply #318
Lemme start by saying thanks for making this, and I'm excited to start using this to fix an age-old gripe I have with foobar/foo_midi that foo_mtags doesn't solve transparently enough :)

My collection includes some midis (and on occasion some exotic other untaggables). I'd like to store tags for such nontaggables in an identically named (plus ".tag" of course) file next to each audio file, rather than e.g. foo_midi's builtin sql and whatever similar features foobar has, mostly because I've experienced foobar or foo_midi losing a file's tags after file operations and such. I'd like tags on my nontaggables to not be foobar-internal but (as close as possible to) as robust and backupable as regular tags. I gather from a previous reply that exttags patches the file operations to keep each pair together, great!

I can't get it to do anything though, in foobar 1.6. I've configured this component (aside from the default "APE tags only") to always write external tags in the preferred format, and set the decoder order to

* unnamed legacy
* external tags (writer)
* midi player

Question at this point: isn't "external tags (writer)" a misnomer here? Seems to me it would be a _reader_ since it's in a list of decoders. Or is foobar misnaming them and are these components all two-way codecs?

Next, I went to a midi file (which still showed foo_midi's tags) and used the context command "rewrite file tags" on 1 track. Nothing happened. I also opened the properties dialog (showed the existing tags) and saved it, nothing happened. "Edit external tags" also just opens the existing foo_midi-stored tags in the properties dialog (duh, since there is no tags file).

So, long story short, my high-level question is: how should I go about setting this up to
1) migrate my existing midi tags from foo_midi to external tags, and
2) let external tags take over all midi tagging from then on?

I would assume this just takes calling "rewrite file tags" on all files, where exttags would first defer to foo_midi to read tags (since exttags finds no files) but take priority for writing, and from then on exttags would just own them for read and write.

Thanks :)

Re: External Tags

Reply #319
I'm short on time so only a quick reply for now. The decoder priorities are no longer that relevant as foobar2000 now has filter API for the component to use. To force your midis to external tagging select the files (do this on small test batch first), hold shift, right click one of the tracks and use command Tagging -> Create external tags. That will copy current metadata to external tags. Once a file has external tags all edits should go to those automatically.

Re: External Tags

Reply #320
hold shift, right click one of the tracks and use command Tagging -> Create external tags

Ah, hold shift as in for the extended context menu? I could've sworn I didn't see that command but this would explain that. I'll try it tonight, thanks!

... filter API... Once a file has external tags all edits should go to those automatically.

Excellent :))

I'll see if I can maybe add some things from this topic to the wiki page tonight, never edited foo wikis before, not sure if I'm allowed to or what. Thanks for the info.


Re: External Tags

Reply #322
Thank you very much, the documentation looks great!

The original link was something the system automatically generates.

Re: External Tags

Reply #323
You're very welcome. I've been wishing for exactly this component for years, never dared to try and program it myself. I left a TODO in the page for you though, I can infer much about foo_ext_tags but not everything :p

Re: External Tags

Reply #324
This might've been asked before and maybe I don't even need this component, but I think it's easier to ask. Can I use this to write a file with external tags to be used on foobar instead of the metadata already on the file? It's mostly for torrents that came with tags in a style I don't like or missing stuff [no Album Artist] but I don't want to mess with the metadata so it doesn't stops me from seeding it.

Or is there a better/easier way to do that? Thanks in advance!