mIRC Homepage
Posted By: naki wma's scripting. - 24/02/03 10:05 PM
Is there a way I can use mIRC Script to script a way to get the bitrate and length and all that?
Posted By: pod2oo5 Re: wma's scripting. - 25/02/03 12:08 AM
this might not be much help to u but check www.mircscripts.org and look at a mp3 player with that stuff... if its in their script just look for it...
Posted By: NightChillz Re: wma's scripting. - 25/02/03 12:49 AM
how bout you try /help /splay, that page contains all the information pertaining to playing songs, volume, length, etc etc...
Posted By: naki Re: wma's scripting. - 25/02/03 02:00 AM
because that is only made for mp3's and not other media types. I want to know if their is another way to script a way to get the file information such as the bitrate, length, songname and such since $sound identifiers dont work.
Posted By: Cheech Re: wma's scripting. - 25/02/03 03:05 AM
/splay -cwmpq [filename | stop | pause | resume | seek | skip] [pos]
Plays the specified sound, which can be a .wav, .mid, or .mp3 file.

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

/help /splay
Posted By: naki Re: wma's scripting. - 25/02/03 03:15 AM
READ IT FOR YOURSELF... If all you are going to do is show me the same thing over and over then why not read the FINE PRINT. I can read the help file fine... I dont need help reading the help file. "hence" I didnt ask for help reading the help file. The help file states.

$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.

Meaning that ONLY MP3's have the capability to use the $sound identifier and not .mid .wav and .WMA. So I will ask again.

Does anyone know how to read the file information from .wma files without the $sound identifer or any other identifier for that matter that has anything to do with /splay so I can get information like the bitrate and song length,
Posted By: Nimue Re: wma's scripting. - 25/02/03 03:19 AM
No, the properties belong to $sound
$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
Posted By: naki Re: wma's scripting. - 25/02/03 03:41 AM
that helps me very little when I need to know if there is a possible way to get file information from .wma sound files other then "/help splay" when that helps me not at all.
Posted By: Nimue Re: wma's scripting. - 25/02/03 03:43 AM
That reply was to Cheech :tongue:
Posted By: keeker Re: wma's scripting. - 25/02/03 03:47 AM
i am not sure about this but you might try /bread. I seem to remember someone telling me about that when i asked about getting the ID3v2 information from an mp3 file, which mirc doesnt support either, just ID3v1. It might not be anything you could use, and i would not know where to begin with such a script, but it just might be a worth while thing to look at.

Posted By: Nimue Re: wma's scripting. - 25/02/03 05:38 AM
Check HERE
Posted By: naki Re: wma's scripting. - 25/02/03 12:27 PM
I've tried that script once and I get no reply when I try it.

//echo 0 $wma("C:\My Documents\My Music\Avril Lavigne\Let Go\Complicated.wma").bitrate

My reply is.



The spaces here is what the error is. I guess it's no error, but it still returns nothing.
Posted By: Nimue Re: wma's scripting. - 25/02/03 03:32 PM
Do you mean you see nothing at all, or do you get an error?
"/echo 0 ..." will echo <whatever> in colour0 which is white, usually.
Is it possible that is your "spaces"?
If the script returned nothing at all, you should see "* /echo: insufficient parameters"

I cannot test the snippet as I have no .WMA files at all crazy
Posted By: naki Re: wma's scripting. - 25/02/03 07:00 PM
it returns nothing but yet it gives no error. I tried it with /say /echo /blah and nothing happens. no error no nothing.
Posted By: Cheech Re: wma's scripting. - 26/02/03 12:30 AM
ok i see what you are saying however i was refering to the $inwave identifier with either of these Properties: fname, pos, length

$sound wasnt specified and i also am still using V 5.91 smile
but anyhow i hope it works out
Posted By: Nimue Re: wma's scripting. - 26/02/03 05:49 AM
OK I made a couple of .wma files and tested that snippet out, it does work here.
Try this..
Code:
; Usage:
; /testwma
; /testwma &lt;path\filename&gt;

testwma {
  if !$isfile($1-) { var %a = $+(",$$sfile(*.wma,Choose a WMA file),") }
  else var %a = $+(",$remove($1-,"),")
  splay %a
  echo 2 -s * Info for: $nopath($insong.fname)
  echo 3 -s * $!WMA: Length: $duration($wma(%a).length) Sample: $wma(%a).sample Mode: $wma(%a).mode $&amp;
    Bitrate: $wma(%a).bitrate
  echo 4 -s * $!insong: Length: $duration($calc($insong.length /1000)) POS = $insong.pos
}

* Info for: Shaggy - Shake Shake Shake.wma
* $WMA: Length: 3mins 23secs Sample: 44 Mode: stereo Bitrate: 192
* $insong: Length: 3mins 27secs POS = 228

Well,. $wma().length is a little off, but theres $insong.length too.
Posted By: naki Re: wma's scripting. - 26/02/03 03:43 PM
That's cool. I'll try it back to my house. Continue sending me idea's if you can so I can get this script done.
Posted By: naki Re: wma's scripting. - 26/02/03 10:37 PM
I get this when I try it.

* Info for: 02 Cold.wma
* $WMA: Length: Sample: Mode: Bitrate:
* $insong: Length: 3mins 16secs POS = 8
© mIRC Discussion Forums