- Filling of metadata
- Clip length overriding
- Site-specific metadata
Note about metadata fields length.
Currently all data that component uses to provide different metadata-related features is stored in tech info fields of the track. Not very good decision and probably that will be changed in future. As for now, why this could give trouble:
- default limit for tech info fields is 200 bytes. Any text that exceeds this limit is truncated. You can increase this limit by editing
infoMaxfield in LargeFieldsConfig.txt file which is placed in foobar2000 application data folder
- since tech info fields belong to the track, they exist only until exist the track. So for example, if you remove track from all playlists and close the program then any metadata associated with it will be lost
Filling of metadata
Clip title parsing rule
In context of metadata, there are not much you can relay on when getting the clip from video site. The only useful text available is the clip name given to it by the person who uploaded it. And many music videos have title of the form similar to '%artist% - %title%' e.g. 'Manowar - Mountains'.
Clip title parsing rule (placed in
Features Miscellaneous) adds possibility to split clip title to multiple metadata fields. By default there are three predefined rules. Below is their description in the order of appearance in the list:
- use whole clip title as track title
- use text part before first '-' character as artist name and other text as track title.
E.g. Queen - Bohemian Rhapsody will have artist 'Queen' and title 'Bohemian Rhapsody'
- same as previous but also ignore any artifacts that most likely do not belong to metadata (empirical rule) for example text within () or  at end of the clip title.
E.g. Queen - Bohemian Rhapsody (Live At Wembley Stadium, Saturday 12 July 1986) will have artist 'Queen' and title 'Bohemian Rhapsody'
Clip title parsing rule is based on regular expressions.
Each string within %% (e.g. %title%) is replaced by (.*?) group. Then resulting expression is wrapped by ^ and $. For example
%artist% - %title%
^(.*?) - (.*?)$
If whole clip title matches to the expression then group values are used as appropriate metadata fields. Otherwise no metadata is added.
In addition to automatic metadata filling from the title there is a way to set metadata fields explicitly. This can be done by extending clip URL by pairs
field is metadata field name prepended with
fb2k_ prefix (to distinguish metadata fields from regular URL parameters). Like any other URL parameters, these should be separated by
'&' character and should use percent-encoding when needed (expected character encoding is UTF-8).
If at least one
fb2k_ field is present, global parsing rule is not used.
Clip title parsing rule overriding
Clip title parsing rule can be specified locally, on the clip basis. In this case it will override global parsing rule. This can be done using
3dydfy_parsing_rule URL parameter. Example:
Note, unlike global parsing rule, this one is not getting turned off if metadata overriding is used. Found
fb2k_ fields only overwrite fields that are found using this local parsing rule if there are conflicts.
Metadata of the clips can be edited manually using standard ways. Empty and multiple values are not supported.
At retagging there need Youtube title so if track does not have it yet then will be performed usual track analysis to retrieve the clip title. In other words, initial edit sometimes could take more time than expected.
Precedence of the ways to fill metadata
All in all, filling of metadata goes in this way:
- use local parsing rule (
fb2k_fields (rewrites existing metadata fields of the same name)
- if there are no
3dydfy_parsing_rulethen use global parsing rule
- use manually added/edited metadata (rewrites existing metadata fields of the same name)
Clip length overriding
Like with Clip title parsing rule overriding clip length also can be overridden. This can be done using URL parameter
3dydfy_alt_length. Expected value is number of seconds. Example (track length is 90 seconds):
Component exposes several clip properties via custom metadata fields. So they can be used in title formatting.
List of fields:
|Original title of the clip on the site|
|Clip description on the site. If its length is greater than max tech info filed length then description will be truncated and appended with ' (...)'|
|The title of the channel to which belongs the video. In most cases this is display name of the user but not always: channels on Youtube may not be associated with a user. Also this is a display name, it does not have to be unique unlike user names on Youtube|
|Average rating given by the users, from 1 to 5, where 5 is the best|
|The number of times that the video has been viewed|
|Upload date in format |
|The number of people who liked/disliked the video|
|Ratio of likes to dislikes filtered to prevent unfair values. Filter is quite simple but could be more effective than plain ratio:|
Usage example can be viewed in video window fallback text.
Help Extended Filling of metadata