You start with create a test.html file in the http interface directory (C:\Program Files\VideoLAN\VLC\http) inside this file paste the following to ONE line or it will not work:
Code: Select all
ANNOUNCE <vlc id="value" param1="'ARTIST' vlc_get_meta"/>
with the song <vlc id="value" param1="'TITLE' vlc_get_meta"/>
from the album <vlc id="value" param1="'ALBUM' vlc_get_meta"/>
, The genre is <vlc id="value" param1="'Genre' vlc_get_meta"/>
-or for streaming server info-
Code: Select all
ANNOUNCE <vlc id="value" param1="'TITLE' vlc_get_meta"/>
with the song <vlc id="value" param1="'NOW_PLAYING' vlc_get_meta"/>
Remember to leave an empty line behind the actual line of code, vlc/mirc seems to want this. Then you must create a script in mirc under remote (alt+r) and paste in the following:
Code: Select all
alias now {
sockopen vlc_meta_info 127.0.0.1 8082
}
on *:SOCKOPEN:vlc_meta_info: {
sockwrite -n $sockname GET /test.html HTTP/1.1
sockwrite -n $sockname Host: localhost
;sockwrite -n $sockname Connection: Keep-Alive
sockwrite -n $sockname $crlf
sockwrite -n $sockname $null
}
on *:sockread:vlc_meta_info: {
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) return
if (%temp == $null) %temp = ---
if (ANNOUNCE isin %temp) {
%temp = $remove(%temp,ANNOUNCE )
describe $active is listening to %temp
}
goto nextread
sockclose vlc_meta_info
}
Only things u might want to change is the port the http interface listens on, thats the first line and is port 8082 in my case. You might also want some other text than "is listening to" just change as you see fit.
Thats pretty much it. You should enable the http interface in vlc by default if u wanna use this on a regular basis. This is done under preferences in "Interface->Main interfaces"
Then with all this done (and vlc restarted) you can type /now in mirc and it will display your currently playing track.
This was made for mp3 tracks, so if it doesn't work with other types of media let me know.