Exactly what does add_metadata_resolver do? Is it replacing the default way
metadata process, or appending/replacing results from the default metadata
process? I'm playing around with to see if is an easy way to get metadata
for aac files that might be in a playlist along with mp3's.
Le jeudi 18 juin 2009 19:51:10, Brandon Casci a écrit :
> Exactly what does add_metadata_resolver do? Is it replacing the default way
> metadata process, or appending/replacing results from the default metadata
> process? I'm playing around with to see if is an easy way to get metadata
> for aac files that might be in a playlist along with mp3's.
It adds a new resolver, which means that the informations returned by the
function will replace results. The resolvers are tried one by one, and each
new result overrides the previous one (from memory).
It should indeed be possible to add support for metadata from your AAC files.
For this purpose, there is already a FAAC resolver in utils.liq and also a
native support added by smimram.
Le jeudi 18 juin 2009 20:13:04, vous avez écrit :
> I was told there is support for aac metadata, but it was only available in
> the trunk version. I'm using 0.90 and feel like sticking with it a while
> longer. What do you think would be easiest way for me to aac metadata
> support? When do you think the next stable release might be?
There was a release today, 0.9.1, but it only include bugxifes and minor
improvements. Native support for AAC metadata needs more testing and will be
Le jeudi 18 juin 2009 20:23:51, vous avez écrit :
> By the way...I got the idea to add aac meta data support to my installed
> version of liquidsoap from this blog article
> That examples uses the add_metadata_resolver to get raplygain data, and it
> gave me the impression it was appending to the metadata not replacing it,
> because the resolver returns what looks like a one element or zero element
> array. It looks intereasting. For my own education, can you explain what's
> actually happening? Thanks.
Internaly in liquidsoap, we have a modular support for metadata. Each resolver
registers itself to the main system, and when trying to find the metadata of a
file, the decoders are tried one by one.
Each of these decoders may return a list of elements of the form
(label,value). Each elements of this list is added to the list of metadata. If
there was another element with the same label, it is overriden with the new
For instance, the replaygain resolver only returns a list with a single
element, which is added to the list of metadata.
add_metadata_resolver is the export of this system to the liquidsoap language.
You can use it to register your own resolver. It needs to be a function of the
string -> (string*string) list
In other word, this function takes a string, which is the URI of the (local)
file, and returns a list of elements of the form (label,value).
You can find some examples in the utils.liq file, in the scripts directory of
the liquidsoap sources.