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 16884 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Stream name, variable

Reply #26
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...


$crc32($lower(%_path_raw%)) is used to create a unique key in the database for the current/track-stream (using the %path%).

I mentioned  to restart the player after adding the database field and action.

Real tracks will show the %title%  in %TITLE_DB%.

In my example I used a function to display %TITLE_DB% only when streams are playing .
$if(%length%,,'['%TITLE_DB%']') .

Stream name, variable

Reply #27
Zeremy, it doesn't seem to work - I've tried several stations to check it out.
Should I reboot the system?

Stream name, variable

Reply #28
Quote
In my example I used a function to display %TITLE_DB% only when streams are playing .
$if(%length%,,'['%TITLE_DB%']') .
In where?
The notification area?

Stream name, variable

Reply #29
Post a screenshot of a streams's properties as to verify you have setup custom_db OK.
Like this....

Stream name, variable

Reply #30
I thought I only needed the "TITLE_DB" one.


O'k, I got it!
I guess all I needed was another cup of coffee or something.
I put "TITLE_DB" both into the notification area (solely) and into the window title (in front, bracketed, with a couple of characters to discern etc.).
Thank you, it seems working now. Even a new "TITLE_DB" field is. Strange if I had problems yesterday...


Stream name, variable

Reply #32
Hi Zeremy
I know my favourite internet radio's do stream metadata because it shows nicely in the remote app MonkeyMote that I use on my iPhone.
I simply cannot understand why it is NOT possible to view this info on a PC within Foobar2000.
I am interested to see the name of the radio station, the radio program, album title and artist like it is shown within MonkeyMote.
After several hours of searching I found nowhere a solution or a way to accomplish this.
Do you have an idea?
Presently I am using DUITunes downloaded from Deviant and developed by Br3tt.

Stream name, variable

Reply #33
Jokanok, not every station sends metadata. Most do though.

It seems strange that you can't see any - what is your foobar version?

Stream name, variable

Reply #34
Jokanok, you didn't mention whether you enabled dynamic track titles in the networking preferences. If that setting is left unchecked, foobar doesn't send the Icy-MetaData:1 header, so the station doesn't send metadata, and foobar doesn't look for it.

Stream name, variable

Reply #35
Hi Zeremy
I know my favourite internet radio's do stream metadata because it shows nicely in the remote app MonkeyMote that I use on my iPhone.
I simply cannot understand why it is NOT possible to view this info on a PC within Foobar2000.
I am interested to see the name of the radio station, the radio program, album title and artist like it is shown within MonkeyMote.
After several hours of searching I found nowhere a solution or a way to accomplish this.
Do you have an idea?
Presently I am using DUITunes downloaded from Deviant and developed by Br3tt.


I assume you mean that with DUITunes the information is not displayed in the Top Panel.


To display the dynamic info you need to modify the top panels  wsh script as it doesn't support dynamic_track changes.
Here is a quick fix , but you should contact Br3tt for a modified version.


Shift-Right Click the top panel.
Select configure.

Change lines 1316-1317 with:
        g_title = tf_title.Eval();
        g_artist = tf_artist.Eval();

Add at the end of the script:

function on_playback_dynamic_info_track(){
    on_metadb_changed();
}




Stream name, variable

Reply #36
Today I elaborated on my foobar titles with functions: some stations don't send much metadata, some send a "placeholder" in place of their title - exactly this case I stumbled upon and took to hook some fish from the %url% field, using a few ifs and other stuff - to crop/format the name.
Do you want me to show the strings used?

Stream name, variable

Reply #37
Today I elaborated on my foobar titles with functions: some stations don't send much metadata, some send a "placeholder" in place of their title - exactly this case I stumbled upon and took to hook some fish from the %url% field, using a few ifs and other stuff - to crop/format the name.
Do you want me to show the strings used?


If it is relevant with the current discussion/thread , why not?

Stream name, variable

Reply #38
I've elaborated that even more now, but I'll show with which I started.

I stumbled upon a station that neither sends normal metadata nor leaves those empty - having a placeholder, "N/A", in place of %title% and - you know.
So I took to fish out from what I had - the <URL> field.

The strings I'll show you below might already be not final for now (I've done some more tinkering today), and it only "works with" a certain station as an (assumed rare) exception; it'll need much more elaboration to make it universal - let alone huge:) (save that I already have it as PART of the actual "calculation").

This is the fishing-out part:
$if($stricmp(%title%,N/A),$caps($substr(%url%,12,18) $substr(%url%,19,23)),%TITLE_DB%)
You can see that it presumes that station is the only one...

This is making the title out of the URL (considering this the only case for now):
$if($strcmp(%url%,'http://www.insightradio.co.uk/'),$if($stricmp(%title%,N/A),$caps($substr(%url%,12,18) $substr(%url%,19,23)),%TITLE_DB%),%TITLE_DB%)   
First I didn't use the apostrophes - and it didn't work. I don't know which characters are reserved there still...
See, I carve out two words from the URL, leave a space between them and capitalise their first letters. But first I check if it's the case - or else "%TITLE_DB%".  I used it in a column. Further modified some today...

Now I needed to make the window title making difference when it's not a radiostream - I wanted to have the album name there then (usually, radiostations don't send album names).
This is what I made final yesterday (today I modified other parts there, leaving the idea the same, however):
$if3(%album%,$if($strcmp(%url%,'http://www.insightradio.co.uk/'),$if($stricmp(%title%,N/A),$caps($substr(%url%,12,18) $substr(%url%,19,23)),%TITLE_DB%),%TITLE_DB%))
It's actually only the very first part - what I inserted just in stead of the initial "[%TITLE_DB%]" part there. However, other parts won't be exactly on topic here:)

The point of showing that etc. is mostly the fishing-out part.
Technically, if every stream has a meaningful "<URL>" thing there, you can create a procedure to carve the station title to show only using that field - analysing its content first, dissecting by further calculated points, forming and formatting the output. Not even touching your custom "DB" thing;)
Sure that string will be huge and might not result in the exact same name that is the station's official one, but anyway;) In some cases - like with which I started now - you'll need such "colonoscopy" if you wanna have it;)



Stream name, variable

Reply #41
Thanks, Zeremy.  However,  I guess I might do without sandboxes for the time being, though I might as well consider using it at some point in my progress or whatever:)

Still I've got a question for you.
I came across a couple of streams in a row that lack the <URL> field altogether. However, they do have some meaning within their paths etc.
So I guess I might need to bifurcate my "fishing tool" in case I'm gonna develop its more or less universal version. But.
First, can the user fish something from the properties of the file with which he/she starts the streaming from their machine? Can the player reach such data? fetch it to the - whatever it is.
And - if it's no secret - how did you get YOUR fish (%TITLE_DB%)?

Stream name, variable

Reply #42
Thanks, Zeremy.  However,  I guess I might do without sandboxes for the time being, though I might as well consider using it at some point in my progress or whatever:)

Still I've got a question for you.
I came across a couple of streams in a row that lack the <URL> field altogether. However, they do have some meaning within their paths etc.
So I guess I might need to bifurcate my "fishing tool" in case I'm gonna develop its more or less universal version. But.
First, can the user fish something from the properties of the file with which he/she starts the streaming from their machine? Can the player reach such data? fetch it to the - whatever it is.
And - if it's no secret - how did you get YOUR fish (%TITLE_DB%)?


In your example of InsightRadio you added location http://185.14.85.162:8020/ which is a Shoutcast server.
(not must info here to fish..)
Then  the player receives the stations metadata header that contains the information that is configured by the station for that stream.
If you go to http://185.14.85.162:8020/index.html in a web browser you can see Current Stream Information.
That info is stored in properties.
The stream title is what is stored in %TITLE_DB% as it received on  playback start , before whatever dynamic title changes are received from then on.

The same applies to an Icecast station.
eg. http://mp3channels.webradio.antenne.de/index.html



 

Stream name, variable

Reply #43
...
If you go to http://185.14.85.162:8020/index.html in a web browser you can see Current Stream Information.
That info is stored in properties.
The stream title is what is stored in %TITLE_DB% as it received on  playback start , before whatever dynamic title changes are received from then on.
...
I tried just now:
Quote
ICY 404 Resource Not Found
icy-notice1:<BR>SHOUTcast Distributed Network Audio Server/Linux v1.9.8<BR>
icy-notice2:The resource requested was not found<BR>

You sherlock, I didn't cite that path:)