mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
I think, there is a little bug in this identifier or I script is bad.

When I want to see a Tracks Length from a MP3-File, the length is ever too long.

Real File Length: 04:04

//echo -s $time($calc($sound($findfile(D:\Energy\Currents\,*,1)).length / 1000),nn:ss)


mIRC Echo: 05:06 !

The file length is even to long. When I put in a short MP3-File, it works. Is it a bug??


Mathias

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
try changing $time to $asctime


New username: hixxy
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Building on what tidy_trax told you...
Code:
//echo -s $asctime($calc($timezone + $sound($findfile(D:\Energy\Currents\,*,1)).length / 1000),h:nn:ss)

Then if you happen upon an MP3 that is over an hour, it'll report it accurately.
grin

Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
It doesn't work frown


* /echo: insufficient parameters

Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Code:
//echo -s $asctime($calc($timezone + $sound($sfile(*.mp3,MP3)).length / 1000),H:nn:ss)

Try that. It'll prompt you to select an mp3 file.
Just copy/paste that entire line. (I tested it myself)
cool

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Code:
alias mp3dur tokenize 46 $calc($1 /1000) | return $gmt($1,$iif($1 > 3599,H:) $+ nn:ss)

//echo -a $mp3dur($sound($findfile(D:\Energy\Currents\,*.mp3,1)).length)
//echo -a $mp3dur($insong.length)

Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
a)

//echo -s $asctime($calc($timezone + $sound($sfile(*.mp3,MP3)).length / 1000),H:nn:ss)

does not work (any mp3 file not work with it):

* /echo: insufficient parameters


b)

alias mp3dur tokenize 46 $calc($1 /1000) | return $gmt($1,$iif($1 > 3599,H:) $+ nn:ss)

--------------------------------------------------------------------------------

//echo -a $mp3dur($sound($findfile(D:\Energy\Currents\,*.mp3,1)).length)
//echo -a $mp3dur($insong.length)


--> Not working, too! frown(
Here I can see the wrong file length again.


Mathias

Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Then, no offense, you are doing something wrong.

Both of those methods work. The one that I pasted I know works, I tested it.

And as for Iori's method, that works too.

Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
Sorry...

* /echo: insufficient parameters


:-(

Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
1. Verify that the file you are trying to use actually does exist.
2. Copy and paste EXACTLY what you are doing

Because if it's working for others but not for you, then it's something you are doing.

Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
Ok, two attempts:

1. I want to know the title length from my MP3-File: 3 Doors Down - Be Like That.mp3

Real title length (Explorer & All MP3-Players): 04:25

Then I type into mIRC (newest version, already):

//echo -s $asctime($calc($timezone + $sound($sfile(*.mp3,MP3)).length / 1000),H:nn:ss)

Now I select these MP3 and click "Open":

* /echo: insufficient parameters
-



2. Kosheen - Catch.mp3 (03:21)

The same as on top and...:

* /echo: insufficient parameters
-





And now?????????


Mathias

Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Are they on a local drive or on a network resource (ie, on another computer)?

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Well, I don't know whats up with your mp3s then that $sound().length and $insong.length is seemingly returning the wrong values. That code works fine (±1s) for me and others.

Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Wolfie, this is why your snip doesn't work for everyone.
//echo -s $!asctime( $calc($timezone + $sound($sfile($mp3dir*.mp3,MP3)).length / 1000) ,H:nn:ss)
$asctime( [color:red]-35774.797 ,H:nn:ss)[/color]
Your timezone must be GMT or GMT-(N) for that to work. Here, $timezone == -36000 (GMT+10)

Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
I would think that it should still return something, even if it's a wrong value.

And I'm in the EST (GMT-5 normally, GMT-4 during DST), and the $timezone was supposed to correct for the value difference from midnight. Odd though.

Joined: Mar 2003
Posts: 86
N
NRJ Offline OP
Babel fish
OP Offline
Babel fish
N
Joined: Mar 2003
Posts: 86
Iori, here are the echoes of your command line:

1. $asctime( -3293.509 ,H:nn:ss)
(It's Alanis Morissette - Everything = 04:04 real file length)


All my mp3's on a local drive. They are in a good quality, have no errors, the drive is new and I have no problems with my Windows & mIRC.

What is wrong? The script? mIRC? (Bug?) Or what?


Mathias


Link Copied to Clipboard