Help - Search - Members - Calendar
Full Version: Trackinfo issue
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Support - (fb2k)
jizam
Hello. I just wanted to see if someone could help me correct the trackinfo code I'm using. I've searched the forum and tried a couple different things, but problem still exists:

It tells me the mp3's are CBR 100% of the time, regardless if I'm playing a VBR encoded file. I've also tried to add some "lame" tag readers (coding) but they don't seem to work. If someone could help fix this code, I'd greatly appreciate it!

QUOTE
%__codec%
$if(%__bitrate_dynamic%,%__bitrate_dynamic%,%__bitrate%)kbps
$if($stricmp(%__codec%,mp3),$if($stricmp(%__extrainfo%,vbr),VBR,CBR))
$if($stricmp($codec(),MP3),%__mp3_stereo_mode%,$channels())

$char(10)$get(default_color)

[%_time_elapsed%/][%_length%][ -%_time_remaining%]
$if(%_isplaying%,
$muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%)'%',)
$div(%_filesize%,1048576).
$left($num($muldiv($mod(%_filesize%,1048576),1000,1048576),3),2)' MB'

$char(10)$get(default_color)

$if($or(%__replaygain_track_gain%,%__replaygain_album_gain%),
['['Tg']' %__replaygain_track_gain% ]['['Ag']' %__replaygain_album_gain%],
$get(tag_missing_color)there is no gain)
Zoom
Well for the first four lines, this should work:
CODE
%codec%
%bitrate%kbps
$if(%codec_profile%,$substr(%codec_profile%,1,3) ,)
$if($strcmp(%codec%,MP3),%__mp3_stereo_mode%,)

This solution will only work on LAME encoded MP3's AFAIK. I don't have another MP3 encoder around to check at the moment. If I remember correctly though, the %CODEC_PROFILE% variable is read from the LAME tag which reports CBR, ABR or VBR with the appropriate preset if applicable.
jizam
QUOTE(Zoom @ Mar 5 2007, 12:17) *

Well for the first four lines, this should work:
CODE
%codec%
%bitrate%kbps
$if(%codec_profile%,$substr(%codec_profile%,1,3) ,)
$if($strcmp(%codec%,MP3),%__mp3_stereo_mode%,)

This solution will only work on LAME encoded MP3's AFAIK. I don't have another MP3 encoder around to check at the moment. If I remember correctly though, the %CODEC_PROFILE% variable is read from the LAME tag which reports CBR, ABR or VBR with the appropriate preset if applicable.


Thanks Zoom! Will give this a try!
Yotsuya
$if($strstr($lower($info(codec_profile)),vbr),VBR,$if($strstr($lower($info(codec_profile)),abr),ABR,CBR))

Only really works with mp3s.
jizam
QUOTE(Yotsuya @ Mar 5 2007, 20:24) *

$if($strstr($lower($info(codec_profile)),vbr),VBR,$if($strstr($lower($info(codec_profile)),abr),ABR,CBR))

Only really works with mp3s.



That did it! Thanks!!
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.