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: Stream name, variable (Read 16256 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Stream name, variable

Hi!

What is the name of the variable that contains the name of the stream when you're listening to it?

I can find the stream URL (which is in %path%), but I can't find the stream name variable.

The wiki page that lists the variables doesn't say much about it too, in fact, when I ctrl+f with "stream", I don't get any results.

Some documentation or help would be much appreciated.


Stream name, variable

Reply #2
I don't know if this answers your question but for every stream I have a .asx file with the following content for example:

Code: [Select]
<asx version="3.0">
  <entry>
    <ref href="http://www.omroep.nl/live/radio3-breed.asx"/>
    <title>Radio 3fm</title>
    <author>Stream</author>
  </entry>
</asx>

When the stream is not playing, the name between the author tags is displayed as the artist in fobar. But when I play the stream. The fields become empty.

Stream name, variable

Reply #3
For what it is worth, this thread lists all the tag information I could find for online streams in foobar. If you have more information please add it.

Stream name, variable

Reply #4
I'd really like to have access to the stream title, too.

Apparently when you play a SHOUTcast (ICY) stream which has metadata in it, %artist% and %title% are derived from the StreamTitle metadata, which normally contains the current artist and title and sometimes also the name of the station.

It looks like foobar2000 splits the StreamTitle on the first "-", so if it's in a standard "Artist - Title" format and Artist contains a hyphen, then %artist% will be the part before the hyphen and %title% will be everything after, which of course is poo.

I was hoping I could parse the data myself and split on the first " - " (spaces around the dash) via custom title formatting, but I don't see any variables where the raw StreamTitle is exposed.

Also I had no luck using %url% in a custom column; I had to just use %path%.

Stream name, variable

Reply #5
I'd really like to have access to the stream title, too.

Apparently when you play a SHOUTcast (ICY) stream which has metadata in it, %artist% and %title% are derived from the StreamTitle metadata, which normally contains the current artist and title and sometimes also the name of the station.

It looks like foobar2000 splits the StreamTitle on the first "-", so if it's in a standard "Artist - Title" format and Artist contains a hyphen, then %artist% will be the part before the hyphen and %title% will be everything after, which of course is poo.

I was hoping I could parse the data myself and split on the first " - " (spaces around the dash) via custom title formatting, but I don't see any variables where the raw StreamTitle is exposed.

Also I had no luck using %url% in a custom column; I had to just use %path%.

Hm, here I only get the artist and title in resp. %artist% and %title%.

I never see the the station's name pop up.

Do you have "Enable dynamic track titles (may cause problems with some proxies)" checked in Preferences - Networking?

Stream name, variable

Reply #6
Hm, here I only get the artist and title in resp. %artist% and %title%.

I never see the the station's name pop up.


Right, same here. I was just saying that the 'StreamTitle' metadata embedded in the actual SHOUTcast stream contains usually only either:

  • artist - title, or
  • station - artist - title, or
  • station only


It depends on how the stream source is configured. In any case given any of the above, fb2k seems to parse only the artist and title out of it when those subfields are available.

Do you have "Enable dynamic track titles (may cause problems with some proxies)" checked in Preferences - Networking?


I do. I assume that's the reason it's parsing StreamTitle at all.

Stream name, variable

Reply #7
Hm, here I only get the artist and title in resp. %artist% and %title%.

I never see the the station's name pop up.

Right, same here. I was just saying that the 'StreamTitle' metadata embedded in the actual SHOUTcast stream contains usually only either:
  • artist - title, or
  • station - artist - title, or
  • station only

It depends on how the stream source is configured. In any case given any of the above, fb2k seems to parse only the artist and title out of it when those subfields are available.

Do you have "Enable dynamic track titles (may cause problems with some proxies)" checked in Preferences - Networking?

I do. I assume that's the reason it's parsing StreamTitle at all.

Stream name, variable

Reply #8
Developers: Will this feature be implemented in a future version of Foobar?

I'd like to have the stream name in the %album%-variable.

Also, I'd like to have a boolean variable %stream% so I can check if the track currently playing is a stream or not.

Stream name, variable

Reply #9
Also, I'd like to have a boolean variable %stream% so I can check if the track currently playing is a stream or not.

This can be accomplished with:
Code: [Select]
$if($strcmp($left(%path%,7),http$char(58)$char(47)$char(47)),IS A STREAM,IS NOT A STREAM)

Similarly, you can test if the currently playing track is on an Audio CD with:
Code: [Select]
$if($strcmp($left(%path%,7),cdda$char(58)$char(47)$char(47)),IS A CD,IS NOT A CD)


However, I would like to see more development for online streams. %title% will resolve to the name of the station if the station is not playing or has just begun to play, however it quickly changes to the name of the song as soon as stream information is received. Depending on what you are trying to accomplish, you can exploit this time window and display the station name with %title% if the data is only refreshed on a per-track bases.

Stream name, variable

Reply #10
 Is there now any workaround to display my own custom radio stations name and not the URL in playlists? 

I know the option "enable dynamic track titles". But not all streams work with this option. sadly 

Stream name, variable

Reply #11
Sorry to bump an old topic, but I was wondering if any progress was made on this. I'm sure it wouldn't be too hard to add a variable for the raw stream name, as Foobar2000 already has that data (since it gets the artist and title from it). All the radio stations I use send the "now playing" data in the format Artist - Title (Radio station name) so it shouldn't be too hard to get the name from inside the brackets.

Stream name, variable

Reply #12
Actually, they only send Artist - Title. The station name is sent at connect time only.

Stream name, variable

Reply #13
Oh, I see. I wasn't aware of that. Winamp keeps showing the radio station name even when the song changes, so I assumed it was sent in every metadata update.

Well, in any case, Winamp has a variable for it (I believe), and even after receiving the artist and track name in Foobar, the radio station name is still available in the Metadata properties window (right-click -> metadata) as "Track title". Is it possible to pull through that title in a keyword like %original_title%?

Edit: Seems it's sent as a icy-name header. Surely that'd be easy to save

Stream name, variable

Reply #14
New to foobar, but does anyone know of a component that could parse the stream metadata (dynamic track titles) and make it available? Ideally I'd like to use it with foo_run.

Stream name, variable

Reply #15
Another request for a "station title" titleformat variable (eg. %stream_title% ?)

It's very frustrating that once playback begins you can no longer display what stream you are listening to.

Stream name, variable

Reply #16
Another request for a "station title" titleformat variable (eg. %stream_title% ?)

It's very frustrating that once playback begins you can no longer display what stream you are listening to.

It's still not possible AFAICS?

Stream name, variable

Reply #17
Is there something new ?
I'd like also to have the name of radios in my playlist. Some display a number or "???" or the name is not explicit, like Jazz FM (here are many radios Jazz).
I have tried to use m-TAGS, but unfortunately I do not understand how it works, while reading pages for one hour :-(

Stream name, variable

Reply #18
...

Well, in any case, Winamp has a variable for it (I believe), and even after receiving the artist and track name in Foobar, the radio station name is still available in the Metadata properties window (right-click -> metadata) as "Track title". Is it possible to pull through that title in a keyword like %original_title%?

...

Hello, boyoz!
I second this. Today I wondered if I could create a custom column with the STATION name...  It took half the day to come to know about this "dynamic track titles". I wonder if it can be still possible to fetch the initial "Track Title" (i.e. the station's actual NAME) rather than constantly seeing song names I don't give a s*** about usually.
I listen to a lot of stations - and I'd REALLY like to know which one I've happened to have on at te moment. It can be - theoretically - achieved by editing the notification tooltip in "Default User Interface" -- but you need to have an unaltered piece of metadata (which IS STILL PRESENT in the "Properties".
Well, I wouldn't like to turn the "Dynamic titles" off - because I won't like to cut things off completely. But wouldn't it be rather useful to have a way to "hide" a %title% from the Mighty Dynamics or, say, have a new metadata item to fetch the station name as is - leaving "artists-titles" to their own fate?

Stream name, variable

Reply #19
I use two ways to show the original stream's title.

1. Using foo_customdb component to create a new field %TITLE_DB%



2. In a WSH Panel by calling function on_playback_new_track():

    g_metadb = fb.IsPlaying ? fb.GetNowPlaying() : fb.GetFocusItem();
    titlemetadb = fb.TitleFormat("%title%").EvalWithMetadb(g_metadb);

Stream name, variable

Reply #20
I'm using a plain version - I'm not sure I have any "custom database"

Stream name, variable

Reply #21
foo_customdb component must be installed.
You can download it from here.
http://www.hydrogenaud.io/forums/index.php?showtopic=109065

Read here how to install the component.
http://wiki.hydrogenaud.io/index.php?title...all_a_component

Go to Preferences > Tools > Custom Database

Add the Field TITLE_DB as shown in previous post.
Add the Action TitleSync as shown in previous post.
Restart Foobar2000.

When you play a new track/stream a new field %TITLE_DB% will be created .
You can see it the track's Properties.

To show the station's name that is playing e.g. in the Window Title
Go to Preferences > Display > Default User Interface
and replace Window title to
$if(%length%,,'['%TITLE_DB%']') - [%album artist% - ]['['%album%[ CD%discnumber%][ #%tracknumber%]']' ]%title%[ '//' %track artist%]

Stream name, variable

Reply #22
Thanks, Zeremy 

Quote
Step 3: Click the "Install..." button and select the component archive, or simply drag it to the list.

I don't have to EXTRACT anything first, do I?


Stream name, variable

Reply #24
Zeremy, what does the string "$crc32($lower(%_path_raw%))" mean?

Well, I just tried doing it exactly by your "way 1". Should I restart the player?
And will it affect REAL track titles?

Well, without restarting now, nothing changed yet.  I tried creating a new field with "%TITLE_DB%" - "?" there...