Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.
Also make sure you've read the Forum Guidelines before posting in this forum.
![]() ![]() |
Aug 9 2005, 15:21
Post
#1
|
|
|
Member Group: Full Members Posts: 10 Joined: 2-August 05 Member No.: 2006 Mp3tag Version: 2.32a |
Hi
I'm trying to do smth like an avergage bitrate over a catalog. I tried looping all the mp3s and adding their bitrates to one variable, but if I want to display the result after the loop, the variable is empty? How to globalize the variable? Next, I want to display certain information if the bitrate is VBR and other info if it's CBR. The question is, how to check if it's CBR or VBR? Thanks in advance rmg |
|
|
|
Aug 9 2005, 15:40
Post
#2
|
|
![]() Moderator Group: Moderators Posts: 5506 Joined: 4-September 03 From: Germany Member No.: 201 Mp3tag Version: 2.55a |
1.
My html_dano_01_ex_mp3tag config has an average bitrate calculation. http://forums.mp3tag.de/index.php?showtopic=1563 2. %_vbr% -------------------- |
|
|
|
Aug 9 2005, 16:05
Post
#3
|
|
|
Member Group: Full Members Posts: 10 Joined: 2-August 05 Member No.: 2006 Mp3tag Version: 2.32a |
Oh, thx for the average bitrate calculator. It works.
%_vbr% prints CBR or VBR for mp3, but how to make a conditional sentence for checking it. Like $if(%_vbr%==CBR,then,else)<-this one doesn't work. |
|
|
|
Aug 9 2005, 16:14
Post
#4
|
|
![]() Moderator Group: Moderators Posts: 5506 Joined: 4-September 03 From: Germany Member No.: 201 Mp3tag Version: 2.55a |
$if($eql(%_vbr%,CBR),then,else) I think.
See the help file for more information. -------------------- |
|
|
|
Aug 9 2005, 19:07
Post
#5
|
|
|
Member Group: Full Members Posts: 10 Joined: 2-August 05 Member No.: 2006 Mp3tag Version: 2.32a |
Ok, now I can check the CBR/VBR status, but a new problem occured
I loop through the mp3 file sizes and measure their length. What I'd want to do is to get the longest length in a variable, but somehow it doesn't seem to work. The code I use: $loop(%_filename_ext%)$iflonger(%_file_size%,$get(length),$puts(length,$len(%_file_size%)),)$loopend()get(length) The results are 7,7,7,7,7,7,7,8,7,7, but the variable somehow remembers the 7 and not the 8, at least when I try to use it outside the loop. Please tell me what am I missing here? This post has been edited by rmg: Aug 9 2005, 19:08 |
|
|
|
Aug 9 2005, 21:41
Post
#6
|
|
![]() Moderator Group: Moderators Posts: 5506 Joined: 4-September 03 From: Germany Member No.: 201 Mp3tag Version: 2.55a |
Try:
$loop(%_filename_ext%)$puts(length,$iflonger(%_file_size%,$get(length),$len(%_file_size%),$get(length)))$loopend() $get(length) This should be ok. This post has been edited by dano: Aug 9 2005, 22:15 -------------------- |
|
|
|
Aug 10 2005, 12:37
Post
#7
|
|
|
Member Group: Full Members Posts: 10 Joined: 2-August 05 Member No.: 2006 Mp3tag Version: 2.32a |
|
|
|
|
Aug 10 2005, 13:26
Post
#8
|
|
![]() Moderator Group: Moderators Posts: 5506 Joined: 4-September 03 From: Germany Member No.: 201 Mp3tag Version: 2.55a |
QUOTE But still, what is the big difference between these two codes? I leave that to Florian to explain It has some thing to do with the order of the code evaluation but I can't really explain it. -------------------- |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 14:36 |