mIRC Home    About    Download    Register    News    Help

Print Thread
mp3 file length #8051 24/01/03 03:36 AM
Joined: Dec 2002
Posts: 111
E
EviL_SmUrF Offline OP
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
what would the $file(filename).blah be for an mp3 file length and for the kbps?

Re: mp3 file length #8052 24/01/03 06:46 AM
Joined: Dec 2002
Posts: 23
R
R1pl3y Offline
Ameglian cow
Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 23
$sound(filename)
Returns either the directory for that file type, as above, or information about the sound file. Currently, only mp3 files are supported with the following properties.

Properties: album, title, artist, year, comment, genre, track, length, version, bitrate, vbr, sample, mode, copyright, private, crc

$sound(filename).length
$sound(filename).bitrate


Rą¶¬łĄ
Re: mp3 file length #8053 24/01/03 02:02 PM
Joined: Dec 2002
Posts: 111
E
EviL_SmUrF Offline OP
Vogon poet
OP Offline
Vogon poet
E
Joined: Dec 2002
Posts: 111
for some reason it returned 249999. . . . . .


what am i supposed to do with that number? lol

Re: mp3 file length #8054 24/01/03 03:30 PM
Joined: Dec 2002
Posts: 77
B
BlackAle Offline
Babel fish
Offline
Babel fish
B
Joined: Dec 2002
Posts: 77
Use...

$file(filename).size ...for file size in bytes
$sound(filename).bitrate ...for bitrate

not sure what $sound(filename).length is returning, my guess is it's the number of frames the mp3 contains.

Last edited by BlackAle; 24/01/03 03:32 PM.
Re: mp3 file length #8055 24/01/03 03:56 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$sound().length returns the length of the song in milliseconds.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Re: mp3 file length #8056 25/01/03 09:52 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Also, if you are using mIRC's /splay to play the song, you can use $insong (returns $true or $false by itself) to return $insong.fname for the filename, $insong.length for the length of the song in milliseconds and $insong.pos to tell you the current position, also in milliseconds. laugh


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C