Help - Search - Members - Calendar
Full Version: 0.9.4.1b - %__extrainfo%
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
Squeller
From the 0.9.4.1 beta thread:

QUOTE(Yotsuya @ Sep 7 2006, 05:38) *
Also, the $info(extrainfo) tag is now gone so to figure out if an MP3 is CBR or VBR it looks like we'll have to start parsing $info(codec_profile). No big deal but it's a significant change that breaks many trackinfo scripts.
EEEEEK!

On mp3s I have: $if(%__extrainfo%,[ %__extrainfo%], CBR)

For some reason, i.e. if a vbr track is playing, it displays "CBR". If it is not playing "VBR". Possibly "%__extrainfo%" is only available when not playing?

EDIT: I just see the "[" and "]" are stupid. Hey, this is a stolen string wink.gif
kockroach
QUOTE(Squeller @ Sep 7 2006, 09:09) *

For some reason, i.e. if a vbr track is playing, it displays "CBR". If it is not playing "VBR". Possibly "%__extrainfo%" is only available when not playing?

I haven't seen that. For me, if the file is playing, or not, it always shows "CBR". I had to edit my track info panel config to correct it. Strange that it will show "VBR" for you. Is it possible that it is pulling the "VBR" out some other way? Where is this "VBR" or "CBR" in your display?
Infernus
in my opinion using %code_profile% for mp3s is a good solution. I used it also in older versions of fb0.9 for mp4(aac)- and mpc-files.
Some variable mp3s are now shown as "VBR V2"
Maybe a indicator for Lame "vbr-new" ?!

Edit: but here I get the same: ($stricmp(%__extrainfo%,vbr) shows only vbr if player is stopped (orig trackinfo panel)
kockroach
QUOTE(Infernus @ Sep 7 2006, 15:32) *

Edit: but here I get the same: ($stricmp(%__extrainfo%,vbr) shows only vbr if player is stopped (orig trackinfo panel)

Strange because this code only shows "CBR" for me, playing or not:
CODE
$if($stricmp(%__codec%,mp3),$if($stricmp(%__extrainfo%,vbr),VBR,CBR))


foosion
If the extrainfo technical field does not exist, %__extrainfo% will never equal "vbr". wink.gif
musicmusic
QUOTE(Squeller @ Sep 7 2006, 15:09) *
On mp3s I have: $if(%__extrainfo%,[ %__extrainfo%], CBR)

For some reason, i.e. if a vbr track is playing, it displays "CBR". If it is not playing "VBR". Possibly "%__extrainfo%" is only available when not playing?

I would guess reloading the file info would clear it up/remove that inconsistency. But I would still call it a bug, if the "new" info doesn't stick after playback finishes.
thuan
Yeah I fixed it by making a quickplaylist with all my mp3 and reload info.
Squeller
QUOTE(musicmusic @ Sep 7 2006, 15:45) *
I would guess reloading the file info would clear it up/remove that inconsistency.
True. %__extrainfo% has completely gone then.
kalmark
I'm probably not saying anything suprising, but using
CODE
$ifequal($strstr(%codec_profile%,VBR),0,'CBR','VBR')
instead of
CODE
$if(%__extrainfo%,[ %__extrainfo%], CBR)
for mp3s solves the problem. For me, that is smile.gif
Yotsuya
Another alternative:
CODE
$if($strstr($lower($info(codec_profile)),vbr),VBR,CBR)
Squeller
QUOTE(Yotsuya @ Sep 7 2006, 23:40) *
Another alternative:
CODE
$if($strstr($lower($info(codec_profile)),vbr),VBR,CBR)
$strstr is case sensitive?
Yotsuya
Yes, strstr is case sensitive. You can test this with the following code:

$if($strstr(Case Sensitive,sensitive),no,yes))
Squeller
QUOTE(Yotsuya @ Sep 8 2006, 18:27) *
Yes, strstr is case sensitive. You can test this with the following code:
Thanks, I know how to test this smile.gif More interesting (didn't know that) is to me that we can use the numerical result for an $if statement with 0=false >0=true.

I wanted to edit the wiki page but it is protected.

CODE
Finds first occurence of string ''s2'' in string ''s1''.


Better:
CODE
Performs a case sensitive find on the first occurence of string ''s2'' in string ''s1''.


And btw: We have $strcmp and $stricmp -> don't we need $stristr as well (case insensitive)?
thuan
Compare string in a lot of language has been case sensitive by default.
foosion
QUOTE(Squeller @ Sep 9 2006, 18:06) *
More interesting (didn't know that) is to me that we can use the numerical result for an $if statement with 0=false >0=true.
No, you can't. As far as $if is concerned, "0" is a string and does not have the same meaning as false. If $strstr finds the substring, it returns the position of the substring as index into the larger string. The first character has index 1. If it does not find the substring, it returns "0". But it also returns whether the substring is found as a boolean value. Every expression in the titleformatting language has two values: a string (numbers are expressed as string, too) and a boolean value.
Proxific
I think the real problem is, that you can't just compare
$info(codec_profile) with
vbr
because the variable often contains: VBR V2
So you usually end with cbr displaying on screen.

Steph
NeoRenegade
Using foobar2000 v0.9.4.2, the extrainfo doesn't show up in Trackinfo Panel while playing. Actually what happens is it shows up for an instant and disappears.

If I drag a song from the Album List panel over the Trackinfo panel and hover there, the extrainfo for that song will show up.

This is with VBR MP3s; so the extrainfo should be "VBR". I am not trying to do anything fancy with the string either. Just trying to display it.

As far as I remember, it worked fine in foobar2000 v0.9.3.

(Using %codec_profile% for now, but could someone tell me what the problem is with %__extrainfo%?)
Squeller
QUOTE(NeoRenegade @ Feb 27 2007, 12:29) *
(Using %codec_profile% for now, but could someone tell me what the problem is with %__extrainfo%?)
It doesn't exist any more, see the quote in the first post of this thread.
NeoRenegade
So my question now becomes: Why remove such a feature which was useful and commonly used?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.