IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

2 Pages V   1 2 >  
Reply to this topicStart new topic
Stream name, variable, [moved from Support]
l0c4lh0st
post Feb 15 2009, 01:12
Post #1





Group: Members
Posts: 8
Joined: 24-October 08
Member No.: 60941



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. smile.gif
Go to the top of the page
+Quote Post
l0c4lh0st
post Feb 15 2009, 01:15
Post #2





Group: Members
Posts: 8
Joined: 24-October 08
Member No.: 60941



Found another topic with the same question, from 2004. But no useful answers... http://www.hydrogenaudio.org/forums/index....=0&p=202080
Go to the top of the page
+Quote Post
Tim Schuhmacher
post Feb 17 2009, 21:40
Post #3





Group: Members
Posts: 12
Joined: 10-May 08
Member No.: 53426



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

<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.
Go to the top of the page
+Quote Post
Yotsuya
post Feb 18 2009, 02:32
Post #4





Group: Members
Posts: 1535
Joined: 8-May 06
Member No.: 30546



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.


--------------------
http://www.ubuntu.com
Go to the top of the page
+Quote Post
mjb2006
post Feb 18 2009, 08:30
Post #5





Group: Members
Posts: 960
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



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. unsure.gif

Also I had no luck using %url% in a custom column; I had to just use %path%.
Go to the top of the page
+Quote Post
l0c4lh0st
post Feb 18 2009, 17:19
Post #6





Group: Members
Posts: 8
Joined: 24-October 08
Member No.: 60941



QUOTE (mjb2006 @ Feb 18 2009, 08:30) *
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. unsure.gif

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?
Go to the top of the page
+Quote Post
mjb2006
post Feb 20 2009, 04:47
Post #7





Group: Members
Posts: 960
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



QUOTE (l0c4lh0st @ Feb 18 2009, 09:19) *
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.

QUOTE (l0c4lh0st @ Feb 18 2009, 09:19) *
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.
Go to the top of the page
+Quote Post
mjb2006
post Feb 20 2009, 04:49
Post #8





Group: Members
Posts: 960
Joined: 12-May 06
From: Colorado, USA
Member No.: 30694



QUOTE (l0c4lh0st @ Feb 18 2009, 09:19) *
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.

QUOTE (l0c4lh0st @ Feb 18 2009, 09:19) *
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.
Go to the top of the page
+Quote Post
l0c4lh0st
post Feb 25 2009, 22:24
Post #9





Group: Members
Posts: 8
Joined: 24-October 08
Member No.: 60941



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.
Go to the top of the page
+Quote Post
Yotsuya
post Feb 26 2009, 10:24
Post #10





Group: Members
Posts: 1535
Joined: 8-May 06
Member No.: 30546



QUOTE (l0c4lh0st @ Feb 25 2009, 16:24) *
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
$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
$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.

This post has been edited by Yotsuya: Feb 26 2009, 10:25


--------------------
http://www.ubuntu.com
Go to the top of the page
+Quote Post
Nixdagibts
post Oct 22 2009, 08:05
Post #11





Group: Members
Posts: 72
Joined: 22-September 09
Member No.: 73370



 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  sad.gif

This post has been edited by Nixdagibts: Oct 22 2009, 08:14
Go to the top of the page
+Quote Post
Daniel15
post Apr 18 2010, 06:27
Post #12





Group: Members
Posts: 3
Joined: 18-April 10
Member No.: 79952



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. smile.gif
Go to the top of the page
+Quote Post
kode54
post Apr 18 2010, 06:48
Post #13





Group: Admin
Posts: 4774
Joined: 15-December 02
Member No.: 4082



Actually, they only send Artist - Title. The station name is sent at connect time only.
Go to the top of the page
+Quote Post
Daniel15
post Apr 18 2010, 08:54
Post #14





Group: Members
Posts: 3
Joined: 18-April 10
Member No.: 79952



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 tongue.gif

This post has been edited by Daniel15: Apr 18 2010, 09:23
Go to the top of the page
+Quote Post
YippeeKiYay
post Aug 6 2010, 08:17
Post #15





Group: Members
Posts: 3
Joined: 6-August 10
Member No.: 82870



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.

This post has been edited by YippeeKiYay: Aug 6 2010, 08:19
Go to the top of the page
+Quote Post
trout
post Mar 9 2013, 22:02
Post #16





Group: Members
Posts: 428
Joined: 26-March 09
Member No.: 68400



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.
Go to the top of the page
+Quote Post
Squeller
post Jul 7 2013, 17:40
Post #17





Group: Members
Posts: 2351
Joined: 28-August 02
Member No.: 3218



QUOTE (trout @ Mar 9 2013, 23:02) *
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?
Go to the top of the page
+Quote Post
musikomaniak
post May 2 2014, 15:57
Post #18





Group: Members
Posts: 134
Joined: 5-June 13
From: France
Member No.: 108507



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 :-(
Go to the top of the page
+Quote Post
Josh Lincoln
post May 27 2015, 19:13
Post #19





Group: Members
Posts: 7
Joined: 27-May 15
Member No.: 119533



QUOTE (Daniel15 @ Apr 18 2010, 08:54) *
...

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?
Go to the top of the page
+Quote Post
zeremy
post May 27 2015, 20:46
Post #20





Group: Members
Posts: 125
Joined: 20-March 14
Member No.: 115083



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);
Go to the top of the page
+Quote Post
Josh Lincoln
post May 28 2015, 16:28
Post #21





Group: Members
Posts: 7
Joined: 27-May 15
Member No.: 119533



I'm using a plain version - I'm not sure I have any "custom database" huh.gif
Go to the top of the page
+Quote Post
zeremy
post May 28 2015, 18:07
Post #22





Group: Members
Posts: 125
Joined: 20-March 14
Member No.: 115083



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%]
Go to the top of the page
+Quote Post
Josh Lincoln
post May 29 2015, 08:48
Post #23





Group: Members
Posts: 7
Joined: 27-May 15
Member No.: 119533



Thanks, Zeremy emot-v.gif

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?
Go to the top of the page
+Quote Post
zeremy
post May 29 2015, 17:51
Post #24





Group: Members
Posts: 125
Joined: 20-March 14
Member No.: 115083



QUOTE (Josh Lincoln @ May 29 2015, 08:48) *
Thanks, Zeremy emot-v.gif

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?


Click Install and just select the zip file of the component you downloaded.
No need to extract. wink.gif

Go to the top of the page
+Quote Post
Josh Lincoln
post May 31 2015, 10:06
Post #25





Group: Members
Posts: 7
Joined: 27-May 15
Member No.: 119533



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... yeahright.gif

This post has been edited by Josh Lincoln: May 31 2015, 10:18
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd June 2015 - 15:12