Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: aboabo on 2021-11-23 15:54:56

Title: metadata from stream
Post by: aboabo on 2021-11-23 15:54:56
When I play an online stream, for most channels the metadata are displayed correctly, but for some streams they get mixed up. For instance, newsounds.org (https://q2stream.wqxr.org/q2) the Artist and Title are always switched, therefore no information is found at last.fm.
I cannot figure out where I can see the dynamic metadata as they come in before they are parsed, or how I can tell foobar to parse the metadata differently for a certain channel.
Any tip much appreciated

Title: Re: metadata from stream
Post by: zeremy on 2021-11-24 17:01:01
With what component are you searching last.fm ?

My tip is the following workaround:

Use External tags (https://www.foobar2000.org/components/view/foo_external_tags) or m-tags (https://www.foobar2000.org/components/view/foo_tags) component to be able to write metadata to the stream url.

Create a field named STREAM_REVERSE and set its value to 1 (for a stream that has reverse artist - title metadata)

Use the following titleformat string wherever needed.

For %artist%
Code: [Select]
For %title%
Code: [Select]
Title: Re: metadata from stream
Post by: sveakul on 2021-11-24 20:04:24
zeremy that's genius man
Title: Re: metadata from stream
Post by: aboabo on 2021-11-24 23:13:41
thank you zeremy, I managed to get m-tags to work, and added a field STREAM_REVERSE, value 1.
To try it out I put your code in the Search Parameters of the Lyric Show 3 panel, but that doesn't reverse artist/title in the display (am not sure if only the display is unchanged, or also the search, doesn't find any lyrics anyhow but they play rather unknown music there so that might be the cause too).
I also use a Biography v1.2.0 panel (spidermonkey), which is mostly what I'd like to see the right metadata for, but I've no idea where to put your code to get that panel behave differently, it has a rather complicated options panel with nowhere any mention of %artist% or %title%
Title: Re: metadata from stream
Post by: aboabo on 2021-11-25 12:11:55
Making progress. In Preferences/Display/ColumnUI/Layout/Item Details/Configure Panel changing the code as follows works:

$set_font(Segoe UI,10,bold)$ifequal(%STREAM_REVERSE%,1,%artist%,%title%)
$if(%isplaying%,$set_font(Segoe UI,10,normal)$crlf()$ifequal(%stream_reverse%,1,[[$crlf()by "[%title%]" ]],[[$crlf()by "[%artist%]" ]]),)

Now only to get that working in the Biography panel...

Title: Re: metadata from stream
Post by: zeremy on 2021-11-25 12:18:04
Hi aboabo,

For biography panel you need to edit biography.ini.

See the following link.

As for Lyrics Show 3 , I will reply later with details when I return home.
Title: Re: metadata from stream
Post by: aboabo on 2021-11-25 17:16:09
Thank you again. It didn't work straight away but you got me on the way:
When I change the biography.ini as you suggest in Roaming/Foobar2000, I see no changes, also after restarting foobar.
When I change the lines to %BIO_ARTIST%=ABCDE and %BIO_TITLE%="EFGH", the panel keeps functioning as before, the variables are not picked up at all.
But I rightclicked the panel. choose Options, and use your lines in Server Settings/Title Format/.. then bingo. The artists are now found by biography panel.
It's a relief because it's amazing how many track-titles are also band names, which causes the biography panel to show completely wrong information.
Title: Re: metadata from stream
Post by: zeremy on 2021-11-25 17:22:58
I just noticed you are using biography 1.2.0.
*biography.ini is no longer used. It's left in place for back compatibility with v1.1.3, otherwise it can be deleted. Server settings therein are automatically imported into the new version.

Use settings page as below.
Title: Re: metadata from stream
Post by: zeremy on 2021-11-25 17:37:11
As for Lyrics Show 3:

Right click the panel and select Preferences..
Use the below in Search parameters.

Code: [Select]

Code: [Select]

Right click the panel and select Panel properties..
Use the below in fallback text

Code: [Select]
Artist: $ifequal(%stream_reverse%,1,%title%,%artist%) $crlf() Title: $ifequal(%stream_reverse%,1,%artist%,%title%) $crlf() Album: %album%$crlf()%playback_time% / %length%$crlf()[%search_state%][%search_progress%'%']

The url you provived (New Sounds) is mostly instrumentals/soundtracks , so it makes sense no lyrics  are found.

You could try the following url which also has reverse metadata to confirm that it is working.
Code: [Select]