mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2019
Posts: 45
Q
quartz Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Dec 2019
Posts: 45
(maximum of 60 seconds)

is there any $file extension that will do this?

Joined: Jul 2014
Posts: 34
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Jul 2014
Posts: 34
You can use
Code
$sound().length
which will return the length in milliseconds. You can use
Code
$calc
to turn that into seconds. Finally, you can use
Code
$duration
to return a more readable output.

Note: The $sound documentation says that the file should be mp3, ogg, or wma, but I have tested this with an mp4 and it has return the correct value. So, I would recommend looking up some dll or other alternatives, if this does not work for you.

Last edited by SykO; 10/01/20 03:56 AM.

Link Copied to Clipboard