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 126244 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: External Tags

Reply #450
The metadata that APIs return for a track doesn't change when stream is switched. Doing what is suggested would pretty much require ignoring all metadata caches and forcing fresh tag reloads from decoders at all times.
Until there are proper interfaces to do what you want, it's best to stick to one stream.

Re: External Tags

Reply #451
Question and possible wishlist item:
Since %last_modified% doesn't work now, how can it "Find tracks edited after External Tagging" - does it simply compare tags and report the different ones?

Because if not, that is a thing to ask for. (Rather than committing the whole thing.)

Re: External Tags

Reply #452
That command seems to compare the timestamp returned by the metadata handle to the timestamp returned by the file format's decoder instance. At the moment I'm not certain why I made it this way but I'm sure it worked correctly at least at the time of writing.

I'll need to find my motivation to re-engineer this component. I'm sure I can make it smarter and its code simpler with all the new interfaces Peter has added.

Re: External Tags

Reply #453
@Case

I am attempting to convert from using m-Tags to external tags and I seem to be running into the same problem I have with m-Tags.
Once external tags exist, how do I go about getting the external tags updated if tags get added by an external program?
For example, I use Keyfinder to add Camelot keys to files, but it seems, like with m-Tags, that if external tags already exist, I can't seem to get these tags added into the external tags.
I have to resort to the same method as with m-Tags (remove the external tags and recreate them), but this has the same drawback that any tag(s) added in foobar2000 after creating external tags are lost.

Also, Would it be possible to support title formatting in foldertag names somewhere down the line?
m-Tags at least then prompts with a Save dialog to give it a name myself if the name is left blank in Advanced Preferences.
External Tags just not shows the context menu item to "Create ...." if I empty the field.

Re: External Tags

Reply #454
I had already checked it out when I noticed the comment in the other thread. Stream pauses briefly even with a clean foobar2000 install without any additional components when tagging attempt is made. I don't see External Tags doing anything to the stream in the code, it appears to just humbly write the external tag when it gets the information.
But Peter has been notified about the issue. Perhaps the behavior can be improved.

Hello @Case I wanted to know if Peter has rectified this? Still seems to be an issue in foobar2k v2.1.5... It would be great to iron this out as you could write in additional tags for a web stream and use Discord RPC in conjunction to display it. Currently even attaching images cause this loop as well.

Re: External Tags

Reply #455
@Just_Addict : if you could try the following once you have identified the files (Tagging -> "Find tracks edited after External Tagging" if you have timestamps updated ...):

Tagging -> Edit file tags will open the file tags.
Then open the properties of the same files. You now have two windows which show different tag sets.
If there is only one field you have updated, you can copy over.

Re: External Tags

Reply #456
It would be great if component also let fb2k to save and accept *.tags files as normal playlists. This way also online-playlists and all tags for them could be in one file for easier transferring between different PCs.

Also, amongst options for preferred tags reading/writing it seems logical to have one more: "Prefer folder tags, write stream tags to APE tags, read all three tag types".

Re: External Tags

Reply #457
Hi, documentation question :) What's the meaning of "(not updated for 2.0, please use Component Home Page)" in the external links on the wiki page? I've been using external tags for my midis for years and foobar 2.0 hasn't given me any trouble with it.

Thanks for making it btw, it's a beautifully clean and effective solution. I expanded the wiki page a few years ago after some testing, hope it's been useful to people and that I didn't get anything wrong.

Re: External Tags

Reply #458
What's the meaning of "(not updated for 2.0, please use Component Home Page)" in the external links on the wiki page?
The wiki page hasn't been updated in 14 months.
Edit: wiki page edited
korth

Re: External Tags

Reply #459
I'll need to find my motivation to re-engineer this component.
We cannot demand updates of course ... that doesn't stop me from wishing. I find this component very valuable as a sort of "delta copier" for maintaining my off-site backup: since a lot of the year's changes are in fixing tags (and pictures) that once were auto-populated wrongly, I can copy over the entire directory structure with the media files themselves excluded. (Of course I need to backup new music folders, but a periodic "copy structure with only *.tag/*.tags", 7z it and up to cloud, that's very little data to handle.)

Of course, trouble if filename has changed. I maybe should go in fixing manually that issue with that exFAT off-site backup drive and case-(in)sensitivity, but ... as long as the .tag/.tags files merely get case wrong, it is about just as big a job to do pre-emptively as in the situation where I would need to resort to that drive.

But if so, the scenario below. A "tags rescue" mode. And for that, a couple of more specific wishes that might be easier to implement:
 * A Commit-but-retain external tags command would be nice. Right now, Commit will write the external tags to files, and then delete the external.
 * Create in a different format. That is: I have external tags in one format (say SQL), wish to write those out to a different external tags format, say .tags. (Hm, on second thought: maybe that should even work already? If so, consistently? How about overwrites?)
 * As for the below wishlist of smart matching: Even a case-insensitive filename matching would be an improvement! Windows-y file systems cannot allow for FileName and FILEName and fileNAME to coexist in a folder anyway, so on those the file is uniquely determined. (It's more of a stretch to do the asymmetric matching like in fb2k's search, identifying ö and o.)

Vague "request" for a recovery feature, let me explain it in terms of a folder.tags file:
* File includes a list of filenames and their respective tags.
* If I have to recover tags, then filenames may have changed.
So: function "try to match files (in the same folder) by track number" and maybe even easier: "try to match files (in the same folder) by file names in ascending order" - the latter would save it if files are untagged but named Artist Year Album 01 blah blah.flac etc.

This also is relevant when a renaming goes wrong, cf. other comments in this thread.

Of course, since you are also developing foo_audiomd5, then one could match by that tag too. At least in the same folder, then in most cases there should be no dupes. Although there are exceptions where an artist has put the same track as intro and outro, for example.

Re: External Tags

Reply #460
Requests noted. I do want to improve the component.

Re: External Tags

Reply #461
I installed this plugin to be able to use replaygain values on streams so they sound similarly loud as normal tracks/items.

First stream I add RG info works fine and the values entered are used.
Second stream I add RG info but get an error message that the operation is not supported on remote objects.

I tried to change some of the settings in Advanced (write sqlite), but that does not help.

In playback/decoder the external tags writer is the last option.

What's wrong?

Re: External Tags

Reply #462
Your settings are correct. The External Tags Writer at the bottom of the decoder list is just a last resort fallback, so it can take the tag if nothing else wants them.

I don't know yet why that url doesn't make it to External Tags, but you can force External Tags to handle it. Instead of using normal Properties dialog, use Tagging -> Edit External Tags.

Re: External Tags

Reply #463
Maybe a stupid question: If I would like to tag RG to internet radio but I always store external tags as files in folders with music would it still tag the stream and where would that tag be? I do not want to permanently switch to any sql-db. Or maybe I should change it just for that one tagging to sq mode and can revert to files mode for normal/everyday files listening. Would the component check both (tags as files and tags in sq)?

 

Re: External Tags

Reply #464
Change the tag writing option in advanced preferences to "Prefer folder tags, write stream tags to SQLite, read all three tag types" and it will do exactly as the setting suggests. Folder tags will be used when there is a folder to write to, streams will use database and all supported tag types will be read.

Re: External Tags

Reply #465
Change the tag writing option in advanced preferences to "Prefer folder tags, write stream tags to SQLite, read all three tag types" and it will do exactly as the setting suggests. Folder tags will be used when there is a folder to write to, streams will use database and all supported tag types will be read.

Correct me if I am wrong.
I use Ape tags, write stream tags to SQLite, read all three tag types because it writes tags to a folder with a corresponding file.
Prefer folder tags, write stream tags to SQLite, read all three tag types would create a new Folder with tags - which I do not want.
With Ape tags, write stream tags to SQLite, read all three tag types I rightclick and use Create external tag and then try to scan with DRMeter or TPScanner - both seem to do their job, the bar goes green right to the right end....and nothing happens - it never ends.
I can only abort.
Is it true that "folder" mode makes a special folder for tags or will they be in folders with audio files?
Will this only work in "folder" mode or should it also work with "ape" mode?
Am I doing smth wrong?

Re: External Tags

Reply #466
Oh my mistake. I thought you used folder tags when you talked about tags and folders.

If you use the default setting "Use only APE tags" you can still tag streams. The APE tag will be saved under foobar2000 profile in a directory called "external-tags". Its name will be the url with illegal characters replaced with placeholders.

The "folder tag" type was added per request. It creates only a single external tag file per directory/folder and stores all the external tags of that folder in this single file. It allows portability without littering the filesystem with numerous files. Folder tags mode is the only mode I don't allow using with streams.

And you obviously can't perform any kind of scan on a stream as they are infinite. They will never end. My suggestion from another thread to tag RG info was meant for manual entry.

Re: External Tags

Reply #467
I use "Ape tags, write stream tags to SQLite, read all three tag types" (not Only Ape). If I tag local *.m2ts file the tag is created in the folder conaining that m2ts audio file. That is great. If I create a tag for radio stream - does it go to the "external-tags" file?
What would be the best way to find proper peak in radio stream? If it can't be measured should I guess/estimate it from the graphic peakmeter by eye or measure with external dB meter (installed on the phone)?

Re: External Tags

Reply #468
I use "Ape tags, write stream tags to SQLite, read all three tag types" (not Only Ape). If I tag local *.m2ts file the tag is created in the folder conaining that m2ts audio file. That is great. If I create a tag for radio stream - does it go to the "external-tags" file?
What would be the best way to find proper peak in radio stream? If it can't be measured should I guess/estimate it from the graphic peakmeter by eye or measure with external dB meter (installed on the phone)?
I run a normal item in VU meter and adjust the level so it is more or less at 0db.
Then I switch to a stream and adjust values I write manually until it is more or less the same on the VU meter.

Bit tedious and quite unfortunate that there is not an automatic tool to do this.
I understand it cannot be scanned with a normal scanner that needs a 'track' to end at some time, but if a scanner was adjusted so that you can interrupt it manually after a certain time and it writes the values measured until that moment that would be great. It doesn't have to be that exact, but I don't want to go deaf when switching to a stream.

Scanner could be made so that this feature is only available on streams (http(s)://).

I'm not looking forward to manually add values for 200 different streams

Re: External Tags

Reply #469
That option will use the SQLite database for streams and the SQLite database is stored directly in the profile directory with the name "external-tags.db". The "external-tags" directory is used only to store the APE tags for streams as they can't be saved where they would otherwise belong.

You can't scan a peak of a stream. As it's a live broadcast it could be absolutely anything. If you don't want to lie you should leave the peaks blank. Though if you don't care about true peak and you have a FLAC radio station, you could use peak 1.0 there. That is the maximum peak a non-float format can produce when not taking into account the intersample peaks from true reproduced waveform.

Re: External Tags

Reply #470
I updated the True Peak Scanner preview version to detect streams and cleanly exit out after 10 seconds of running.

If you are going to tag hundreds of streams with this I suggest doing some preparations first, as we noticed that stream tagging may not always get handled by the fallback tag writing support.

To make sure you can tag the streams, do the following:
Hold shift+right click, then selected 'Tagging' -> 'Create External Tags'.
Now shift+right the items again and select 'Tagging' -> 'Wrap for external tags'. This changes the urls to include a protocol that forces them to be handled by External Tags.
Now you can scan them with the above linked True Peak scanner and tag writing won't error out.
If you don't like the wrapping to be "permanent", you can create a new temporary playlist of the items and do the operations there.

Re: External Tags

Reply #471
True Peak Scanner preview version stream support.
This works excellent.

After scanning when switching between normal tracks and/or streams this has no delay like RG DSP has.
You mention you scan with TPS for 10 seconds. Some streams come with an advert/spoken message when you start the stream. Does this not lead to incorrect gainlevels being detected and written in the tags?

Of course TPS writes far too much data in the tags, but easy enough to suppress displaying. The only thing relevant for me is knowing the stream has been analyzed and replaygain will be applied when I start playing the stream.

Also very nice you can modify tags (name and genre for instance) and add art to the external tags. I can probably ditch a whole lot of TF-PSS and TF-ELP code because of that.


Two issues with external tags (regarding streams):

1) it seems that only the option to use a centralized external-tags.db works. How will I be able to send only the processed information (and art) for one station to a friend?

2) it would be most convenient if upon creating an external tag for a stream the original %title% (has station name when stream not playing) could be copied to an extra tag %station%. Reason is that when a stream is playing in TF the field %title% is filled with the trackname and the name of the streaming station is not available in any tag. I tested by adding %station% manually and that is always available with playing and not playing TF.

Re: External Tags

Reply #472
You mention you scan with TPS for 10 seconds. Some streams come with an advert/spoken message when you start the stream. Does this not lead to incorrect gainlevels being detected and written in the tags?
Ideally if the ads play with same loudness as other material, it doesn't. But if the ads are louder it means the ads won't blast your ears when you switch to the station, but the music itself will be quieter.

The partial station scanning is an estimate at best and I wanted to limit the scanning time as 10 seconds already is very long. In that time you have finished scanning an album worth of music.

If the results are bad you can always tweak the gain values manually, as ReplayGain has always intented. Or if you want, you can use Converter or wget or something to capture the station for longer duration, edit the ads away and scan that - then transplant the gain value to station's tag.

Of course TPS writes far too much data in the tags, but easy enough to suppress displaying.
I'd keep component settings as you have configured and instead wipe the extra info away afterwards.

1) it seems that only the option to use a centralized external-tags.db works. How will I be able to send only the processed information (and art) for one station to a friend?
Just few posts up I'm re-explaining to wojak how the default APE tags can also handle that. One tag per station, easy to share if wanted.

2) it would be most convenient if upon creating an external tag for a stream the original %title% (has station name when stream not playing) could be copied to an extra tag %station%.
Tricks like that are outside of the scope of the component. But instead of using the initial "Create External Tags" command, you can use "Edit External Tags" and get normal properties dialog ready to do its thing for all the stations. You can then use 'Tools' -> 'Automatically fill values...' and copy %title% to %station%.

Re: External Tags

Reply #473
@Case

I changed settings to use only APE tags and deleted external-tags.db. Enable art support is checked.
After that I created external tags for some 150 streams, did the TPS scanning and attached art (Front, Back and Disc).


Some issues:

1) I cannot attach art to the Icon placeholder at all.

2) I can attach art to Front, Back, Disc (Artist I do not use) and I can see the tag file for that stream gets bigger. After exiting foobar and restarting I do not see  the attached art in pretty much 90% of the streams I tagged and the embedded art is also not available elsewhere. I wonder why. I attached an FPL with 4 sample streams including the external tags.

3) I encountered 8 streams that play just fine but TPS has issues scanning those streams. Those are also attached in a FPL.

4) For one stream I cannot create an external tag. Also attached.

Could you have a look what's wrong?

Re: External Tags

Reply #474
Some good finds. The APE tag type uses the built-in tag writer from foobar2000 and it doesn't seem to write the 'icon' cover. Reproducible by trying to tag for example .MPC file with that cover type. It looks like a foobar2000 bug, I have pinged Peter about it.

Point 2) has been discussed in this thread. For some reason foobar2000 doesn't query art at all for these tracks so External Tags can't give the art. There have been discussions about various workarounds, easiest by far is to use the "Wrap for External Tags" feature of External Tags. That makes the stream url fully handled by the component and album art gets queried and can be shown.
I'm trying to get Peter to change foobar2000 behavior so workarounds wouldn't be needed, but so far this is the only way.

I'll check the rest of the issues probably tomorrow. It's getting late.