"Now Playing" Mirc script.

Feature requests for VLC.
hondaman
New Cone
New Cone
Posts: 3
Joined: 04 Feb 2006 21:57

"Now Playing" Mirc script.

Postby hondaman » 04 Feb 2006 21:59

I know this is pretty silly in the overall scheme of things, but I would like a "Now Playing" script for mirc and vlc.

For those who dont know what that is, when you open a media player, say, winamp, and play a song, movie, etc, and have a proper script for mirc, the script will display on irc what exactly you are listening to or watching.

Thank you!

Guest

Postby Guest » 04 Feb 2006 22:33

It is trivial to create something like this. Big issue is that mIRC is Windows only.
Best thing would be to write info to text file which could be used by any program (other IRC clients, desktop extenders, LED displays)

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 05 Feb 2006 13:44

I don't know how mirc handles this ... but i've already added a "Now playing..." msn plugin in the dev version. If people want to add support for other functions, feel free to look at modules/misc/msn.c .
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

jacoby
Blank Cone
Blank Cone
Posts: 17
Joined: 29 Apr 2004 21:34
Contact:

Postby jacoby » 14 Feb 2006 19:30

I don't know how mirc handles this ... but i've already added a "Now playing..." msn plugin in the dev version. If people want to add support for other functions, feel free to look at modules/misc/msn.c .
Is there a good chance that this could be extended to dump now playing info into a text file? I would get so much milage out of that.

snappas

Postby snappas » 25 Apr 2006 01:42

I have been looking for something like this for ages, if anyone could script such a thing, or explain on how it could be done, that would be awesome.

dionoea
Cone Master
Cone Master
Posts: 5157
Joined: 03 Dec 2003 23:09
Location: Paris, France

Postby dionoea » 25 Apr 2006 18:46

E-bola on #videolan (Freenode) has a working script.
Antoine Cellerier
dionoea
(Please do not use private messages for support questions)

blader
New Cone
New Cone
Posts: 5
Joined: 15 Jun 2010 11:20

Re: "Now Playing" Mirc script.

Postby blader » 17 Jun 2010 12:32

Anyone out there that has a working script?

I'm trying to get this to work

http://www.home.no/inf3rn0/NowPlaying/

But it does nothing.

KingDemo
New Cone
New Cone
Posts: 1
Joined: 02 Aug 2011 00:24

Re: "Now Playing" Mirc script.

Postby KingDemo » 02 Aug 2011 00:27

Terribly sorry for Necroing this topic but
for those that haven't found one yet i found a working one here:
http://www.hawkee.com/snippet/7593/

Toddler Naruto
New Cone
New Cone
Posts: 3
Joined: 28 Apr 2012 10:09
VLC version: 1.1.11
Operating System: Windows XP
Location: Fair Oaks, California

Re: "Now Playing" Mirc script.

Postby Toddler Naruto » 28 Apr 2012 11:18

None of those scripts are working for me, sigh if only GTSDLL had included VLC as a compatible player, before it's creators abandoned it...
Image

ColaMiXeD
New Cone
New Cone
Posts: 2
Joined: 28 Jun 2013 16:08

Re: "Now Playing" Mirc script.

Postby ColaMiXeD » 28 Jun 2013 16:17

Code: Select all

alias vlc { sockclose vlc sockopen vlc localhost 8080 sockmark vlc $1 } on *:sockopen:vlc: { if ($sockerr) { echo -a VLC läuft anscheinend nicht. | return } sockwrite -n $sockname GET /requests/status.xml HTTP/1.1 sockwrite -n $sockname Host: $sock($sockname).addr sockwrite -n $sockname Connection: close sockwrite -n $sockname } on *:sockread:vlc: { var %t | sockread %t if ($regex(%t,/<(?:info name=")?(\S+?)"?>(?:<!\[CDATA\[)?(.*?)(?:\]\]>)?</(?:\1|info)>/i)) && ($regml(2) != $null) { set %vlc. $+ $regml(1) $regml(2) } } on *:sockclose:vlc: { var %out 14[7VLC-Player14] NowPlaying: $iif(%vlc.artist,$v1 -) %vlc.title if ($sock($sockname).mark == echo) { echo -a %out } elseif ($v1 == say) { msg $active %out } else { var %x 1 while ($var(vlc.*,%x)) { echo -a $v1 => $var(vlc.*,%x).value inc %x } } unset %vlc.* } menu channel { - VLC .Im Channel Anzeigen: /vlc say .Nur Echo zeigen: /vlc echo }
doesn´t work since update 2.0.7 , any ideas? :)


Thx ...

Chromatic
Blank Cone
Blank Cone
Posts: 28
Joined: 27 Jun 2013 16:03

Re: "Now Playing" Mirc script.

Postby Chromatic » 07 Jul 2013 02:23

I managed to get a piece of code working well enough with the latest version of VLC.

Make sure you have your http server running in VLC (and restart). (The 127.0.0.1:8080) As this pulls from the generated XML file.

As for setting up IRC, I am going to assume you have that down.

This code works fine for displaying The filename, The encoding, and the Frames per second of the video.

I have it modified for an ontext call,.. in this particular code snippet it is !VidInfo , but change whatever you want for your needs.

Code: Select all

on *:TEXT:!vidinfo*:#: { sockclose vlc sockopen vlc localhost 8080 } on *:sockopen:vlc: { if $sockerr > 0 { echo -at vlc not running | sockclose vlc } sockwrite -n $sockname GET /requests/status.xml HTTP/1.1 sockwrite -n $sockname Host: localhost sockwrite -n $sockname Connection: Keep-Alive sockwrite -n $sockname $crlf } on *:sockread:vlc: { if $sockerr > 0 { echo -a error | sockclose vlc } sockread %vlcx ;echo -a %vlcx if (*name='filename'>* iswm %vlcx) { if ($regex(%vlcx,<info name='filename'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { set %vlcann1 $regml(1) } } if (*name='Frame rate'>* iswm %vlcx) { if ($regex(%vlcx,<info name='Frame rate'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { var %vlcann2 $regml(1) } } if (*name='Codec'>* iswm %vlcx) { if ($regex(%vlcx,<info name='Codec'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { var %vlcann3 $regml(1) msg $active VLC %vlcann1 :: %vlcann3 $+ @ $+ %vlcann2 fps unset %vlcann1 } } }
Hope that helps you out!

Chromatic

RageWorthy
New Cone
New Cone
Posts: 1
Joined: 01 Feb 2014 18:03

Re: "Now Playing" Mirc script.

Postby RageWorthy » 02 Feb 2014 00:00

Thanks Chromatic, I was able to get the script to work. The only problem I am having now is that it won't display other tags! I change the word "codec" to "title" and it outputs nothing there! Is there something I am missing? The tags are working when I chack localhost:8080/requests/status.xml but they won't get pulled by mirc!

ColaMiXeD
New Cone
New Cone
Posts: 2
Joined: 28 Jun 2013 16:08

Re: "Now Playing" Mirc script.

Postby ColaMiXeD » 11 Apr 2014 11:54

now it works :)

set password to Lua Interface an add it to the script

Code: Select all

menu channel { VLC - Now Playing: { sockclose vlc sockopen vlc localhost 8080 } } on *:sockopen:vlc:{ if $sockerr > 0 { echo -at 4VLC ist nicht gestartet | sockclose vlc } sockwrite -n $sockname GET /requests/status.xml HTTP/1.1 sockwrite -n $sockname Host: localhost sockwrite -n $sockname Authorization: Basic $encode(:MYPASSWORD,m) sockwrite -n $sockname Connection: Keep-Alive sockwrite -n $sockname $crlf } on *:sockread:vlc: { if $sockerr > 0 { echo -a error | sockclose vlc } sockread %vlcx ;echo -a %vlcx if (*name='artist'>* iswm %vlcx) { if ($regex(%vlcx,<info name='artist'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { set %artist $regml(1) } } if (*name='title'>* iswm %vlcx) { if ($regex(%vlcx,<info name='title'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { var %title $regml(1) } } if (*name='album'>* iswm %vlcx) { if ($regex(%vlcx,<info name='album'>\s*\K(.+?)(?=\s*<\/info>)) == 1) { var %album $regml(1) msg $active 7VLC::14 %artist 15-14 %title unset %artist unset %title unset %album } } }
Have fun :) and thanks to Chromatic

User81
New Cone
New Cone
Posts: 1
Joined: 17 Feb 2020 14:37

Re: "Now Playing" Mirc script.

Postby User81 » 17 Feb 2020 14:40

I have set everywthing but doesn't work, i have mirc 7.59

In http://127.0.0.1:8080/
is written:

La password dell'interfaccia web non è stata impostata.
Usa --http-password, o imposta una password in
Preferenze > Tutto > Interfacce principali > Lua > HTTP Lua > Password.


but the password is set, even in the mirc script !!


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 9 guests