Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Media PLayer Classic status plugin

Announcements of new plugins or updates.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
herak
Posts: 5
Joined: June 30th, 2008, 1:25 pm

Media PLayer Classic status plugin

Post by herak »

I just completed version 1 of a new plug-in to display information from media player classic.

bellow is the readme, any comments or suggestions just leave them in the thread.


---------
mpcstatus version 1

1. To set up the plugin copy mpcstats.dll, mpcstats.xml, and mpcstats.dll.config to the lcd smartie plugin directory.

2.start media player classic and enable the web interface
view > options > webinterface check the box "listen on port" and make sure that "13579" is in the port box (the rest of the settings don't matter) and click ok.

3. Launch Lcdsmartie and test the plugin.


This plugin is designed to be used with the latest version of Media Player Classic - Homecinema (v1.1.0.0 at time of writing) but it should work with any version of media player classic with a web interface.

http://mpc-hc.sourceforge.net/

The .net framework 3.5 is required to run the plugin

http://www.microsoft.com/downloads/deta ... laylang=en




The plugin has 6 functions called with $dll(mpcstats,[function_number],[parameter],) the second parameter is ignored


function 1 status

parameter 1 - returns the status of media player classic ie playing, paused, closed
parameter 2 - returns a number representing the status as above to use in actions
closed = 0, playing = 1, paused = 2, stoped = 3, opening = 4.
parameter 3 - returns 0 if media player classic is closed and 1 if it's open.

function 2 title

parameter 1 - returns the file name no parsing done. tv_show - eppisode-name.s2e05.xvid.avi becomes tvshow - eppisode-name.s2e05.xvid.avi
parameter 2 - removes the punctuation and spaces from the file name. Helps legability on displays tv_show - eppisode-name.s2e05.xvid.avi => tvshow eppisode name s2e05 xvid avi
parameter 3 - removes the file extention as well tv_show - eppisode-name.s2e05.xvid.avi => tvshow eppisode name s2e05 xvid
parameter 4 - removes the unneeded scene tags so tv_show - eppisode-name.s2e05.xvid.avi => tvshow eppisode name s2e05


function 3 position and length
parameter 1 - returns the length of the loaded file for a 45min file => 00:45:00
parameter 2 - same as above but will only return the needed portion 45min file => 45:00
parameter 3 - position in the file
parameter 4 - position in the file to match parameter 2
parameter 5 - percent of the file played to ease building a bar graph
parameter 6 - time remaining
function 4 volume
parameter 1 - volume level 0 to 100
parameter 2 - mute status 0 = unmuted 1 = muted

function 5 diagnostics
parameter 1 - the url the program is querying for the information the default is "http://localhost:13579/status.html" media player classic does not need to be on the same computer as lcdsmartie though i have not yet done through testing of this.
parameter 2 - the original string receievd from media player classic

function 6 credits
call it with any parameter to see the credits

so an example screen would be (for a 40x4 lcd)

line1:$dll(mpcstats,2,4,)
line2:$dll(mpcstats,3,4,)/$dll(mpcstats,3,2,) $dll(mpcstats,1,1,)
line3:volume:$dll(mpcstats,4,1,)
line4:$Bar($dll(mpcstats,3,5,),100,40)

will give the output wile playing this file "rain_of_madness_h720p.mov"

Image
You do not have the required permissions to view the files attached to this post.
Last edited by herak on October 5th, 2008, 5:25 pm, edited 3 times in total.

caesar
Forum Supporter
Posts: 734
Joined: October 15th, 2005, 10:39 am
Location: Romania
Contact:

Post by caesar »

Nice plugin, will test it soon.

Thank you and keep up the good work!

herak
Posts: 5
Joined: June 30th, 2008, 1:25 pm

Post by herak »

Thanks for the testing, i've just updated the plug-in to add a function to display the time remaining the file attached to the first post is the latest version.

pestilenc
Posts: 1
Joined: August 13th, 2008, 9:52 am

Post by pestilenc »

Great plugin, works really well. Thanks for the hard work!

housemaster
Posts: 1
Joined: May 25th, 2008, 6:06 pm

Post by housemaster »

RESPECT :D :D :D :D :D
for this very nice plugin.
That has always been missing me.
For me it works very well.

But it lacks a function to screen out other connection.

thanks for your great work.

:D :D :D :D :D

herak
Posts: 5
Joined: June 30th, 2008, 1:25 pm

Post by herak »

housemaster wrote: But it lacks a function to screen out other connection.
I'm coming up on some more free time. I might be able to add this to the plug-in what is it you actually want? i'm not sure i understand what you mean?

mr_duplo
Posts: 1
Joined: September 14th, 2009, 9:40 pm
Location: Norway

Re: Media PLayer Classic status plugin

Post by mr_duplo »

Started using this for my current project PC. It's a great plugin!

My only problem is that it returns status:0 when using DXVA. Anyone who knows a fix for this?

fisnils
Posts: 1
Joined: March 15th, 2009, 5:21 pm

Re: Media PLayer Classic status plugin

Post by fisnils »

works fine for me :)

a request, can u fix so that swedish characters ( å ä ö) is displayed ..thanx

droid
Posts: 1
Joined: August 6th, 2012, 2:02 am

Re: Media PLayer Classic status plugin

Post by droid »

It crashes with MPC-HC 1.5.2 and newer versions and the progress bar says "[Bar: Too many parameters]" with any version.

Is there anyone who can fix this?

Martinique

Re: Media PLayer Classic status plugin

Post by Martinique »

@droid: The parameter error probably happens when Windows is configured for a locale that uses comma as decimal separator, which fools Bar and just about every LCD Smartie function. I tried replacing the comma with a dot using another plugin, but it didn't help, as Bar once again expects a number format matching the current locale. LCD Smartie seriously needs an escape character or – even better – a way to set a different separator character inline, to get rid of these comma problems.

As the comma and the digits following it are not really needed, I decided to remove them using the regexp.dll plugin:
$Bar($dll(regexp.dll,3,$Chr(44).*$#,$dll(mpcstats,3,5,)),100,20)

torminator
Posts: 3
Joined: January 16th, 2008, 2:33 pm

Re: Media PLayer Classic status plugin

Post by torminator »

droid wrote:It crashes with MPC-HC 1.5.2 and newer versions and the progress bar says "[Bar: Too many parameters]" with any version.
Is there anyone who can fix this?
I had the exact same problem, so I stayed with MPC-HC 1.5.1 for a long time without upgrading. The guy who wrote the plugin was good enough to provide the source code though, and now I finally got around to have a look at the issue.

Problem was, the newer MPC-HC versions changed slightly the formatting in the web interface, and the plugin didn't parse the new format correctly.

I converted the original source from VB.NET to C# using a tool, and fixed the data parsing. It should now work correctly! Please see attachment.

Note that I've only tested this with the very latest version of MPC-HC (1.6.3)
You do not have the required permissions to view the files attached to this post.

Arpad

Re: Media PLayer Classic status plugin

Post by Arpad »

Not running the media player classic. How to skipping the plugin?

torminator
Posts: 3
Joined: January 16th, 2008, 2:33 pm

Re: Media PLayer Classic status plugin

Post by torminator »

Arpad wrote:Not running the media player classic. How to skipping the plugin?
There's probably a few ways to do it, I use the following rules in the 'Actions' tab:
If $dll(mpcstats,1,3,) = 0 then GotoScreen(4)
If $dll(mpcstats,1,3,) = 1 then GotoScreen(1)

(In my setup, screen 1 is the main screen I use for Media Player Classic. Screen 4 is a blank screen)

Post Reply