Jump to content

Media Player Classic Remote Control for Media Browser {EXPERIMENTAL}


Recommended Posts

Posted (edited)

Media Player Classic Remote Control for Media Browser.

 

Change log:

 

1.0.0.1
 
! Fix issue with MPC not closing after playback completed.
+ Added option to Notify Icon Context Menu to open logs folder
 
1.0.0.0
 
+ Streaming Support
+ Logging implemented
+ Toggle Full Screen command added.
+ Settings option to force streaming for testing purposes.
+ Settings option for additional command line arguments for MPC-HC
+ Set MPC ReportFailedPins to false to avoid warning with MCE Recorded TV files
 
0.0.0.8
 
+ No longer requires username or password.
+ Watched status/resume points are linked to the user who launched the content.
+ Auto discovery of MB Server.
+ Auto discovery of MPC-HC location.
+ Enables MPC-HC Web Interface (required).
- Removed status window as it served no purpose.
+ Double click Tray Icon to launch settings.
 
0.0.0.4
 
-  Initial release

This app is a remote control client for Media Browser which uses Media Player Classic (MPC-HC) to play content.

 

It is a notification icon which sits in the system tray without a front end and can be remote controlled via the Media Browser Web Interface or other Media Browser apps.

 

This is an initial release and a proof of concept, there are limitations such as it doesn’t support queueing or streaming, content must be accessible directly from the machine where this app is installed.

 

You will need MPC-HC installed to use this application which can be installed from here: http://mpc-hc.org/

 

The ClickOnce installation for the MPC Remote can be found here: http://jigal.uk/MpcRemote/setup.exe.

 

You browser may warn you that this is unsafe, there isn't much I can do about that, but be assured the application is perfectly safe to install.

 

 

The app will attempt to discover the MB server and the path to MPC-HC.  If all goes well the tray icon will turn from red to green and you can now remote control the app via the web interface or the apps.

 

The path to MPC, the Device Name, which defaults to 'MPC Remote' and the MB Server can be changed through the settings, to launch either double click on the tray icon or right click and select settings from the context menu.

 

MPC-HC’s Web Interface must also be enabled , the App will attempt to do this when it's first launched.  However, to enable manually, launch MPC-HC, then choose View, Options, Web Interface and tick Listen on port.

 

The settings also has an option to Launch Full Screen, which is enabled by default however, this will only have an effect if you have not set MPC-HC to open all files in full screen.  Setting to off will launch MPC in windowed mode.

 

This is to be considered and experimental build, there is still work to be done and the code is more functional than good at this stage. 

 

It would be good to get some feedback if this is useful to anyone.

Edited by anks
  • Like 14
Posted (edited)

Genius! :D I just gave it a spin, took just a few mins to set-up and seems to be working great so far - thank you so much for putting this together.

 

I run MB3 on my HTPC (the only PC in the house which is also home to all my media) which is connected directly to the main living room flat panel (and amplifier) where we do 80% of our viewing (with 20% on mobile devices which MB3 obviously handles great). This now means I get the best possible audio/video quality from my files with no transcoding when playing them from and viewing on the same machine. Love it.

 

I'm not sure what more you plan to do with it as it seems to work perfectly - I'll be roadtesting over the next few days and will let you know if I experience any issues.

 

The one thing I guess might be useful would be to have it available to all users on the server (as the 'cast to' option is only available to the named user in your app (I'm sure you know that and perhaps it's a limitation of the way it has to work?).

 

Either way - great work - thank you.

 

I hope enough people get to see this as I think many would appreciate it. 

Edited by Olywa123
Posted (edited)

I gave it a go - but the icon just stays red for me.

 

Here's the settings I'm using:

 

54682e523b129_mpcremote.png

Edited by AdrianW
Posted

I've updated the app, to install just exit if running and launch, you'll be prompted to install an update.

 

Changes:

 

- No longer required to enter user name or password

- Resume points/Watched status now correctly tie up to the user who launched the playback.  Previously it was the account under which the app was running.

 

@@AdrianW -  Sorry about that, I didn't account for blank passwords, can you try the new version?

 

@@Olywa123 - I can see the remote control target from my apps under different user names,  can you try the new version?

Posted

Another small update

 

- Auto detect MB Server

- Auto detect MPC-HC location

Posted (edited)

@@anks

  Wow - I didn't expect you to produce an update so quickly. Updated it and works as you describe - perfect!

 

I cannot think of anything else I would personally want this tool to do - I have placed it in my startup folder so it auto runs on boot and it does exactly what it needs to (at least for me). Will report back if any issue but I really don't expect any :)

 

Thank you again - this is wonderful. Would be happy to 'buy you a drink' if you have a donation option?

 

@@ebr - I think it would be worth better publicising this somehow (announcement?) if/once anks is happy with it as I think this is a valuable addition to the amazing MB3 you guys deliver.

Edited by Olywa123
Posted

@@Olywa123 Thanks for the feedback,  if you're an MB supporter then that's enough :-)

 

I hope you keep using it, please let me know of any issues/requests.  TBH it took longer to do the icons for the tray icon and the setup screen than to write the code, the MB API is that good and easy to work with and having the code Open Source, really helps.  It's my first time working with MB and it's quite a while since I've written anything other than a web based/SharePoint.

 

So are all users now able to remote control the device?  BTW, to support this, that is why the device now appears as a Chromecast.

 

Things I'd like to add:

 

- Queueing

- Trailers support

- Support for changing audio streams

- Support for changing subtitles

- Logging

- Robustness - Handling Server restarts, checking Web Socket still active etc.

Posted

I too think this is awesome for an initial release, but I have noticed that channels aren't working (for me at least) . But still great job! :)

Posted

@@anks - yep, certainly an MB supporter. I tried it with four different users and all of them could see it so all good so far.

Nice to-do list - thanks for sharing, I probably would take advantage of some those (sub/audio stream switching for sure).

 

@@Vidman, I hadn't tried any channels as I don't really use them a lot but confirmed - not working here either (I suspect this is a little more tricky to implement).

Posted

@@Olywa123 Thanks for the feedback,  if you're an MB supporter then that's enough :-)

 

I hope you keep using it, please let me know of any issues/requests.  TBH it took longer to do the icons for the tray icon and the setup screen than to write the code, the MB API is that good and easy to work with and having the code Open Source, really helps.  It's my first time working with MB and it's quite a while since I've written anything other than a web based/SharePoint.

 

So are all users now able to remote control the device?  BTW, to support this, that is why the device now appears as a Chromecast.

 

Things I'd like to add:

 

- Queueing

- Trailers support

- Support for changing audio streams

- Support for changing subtitles

- Logging

- Robustness - Handling Server restarts, checking Web Socket still active etc.

 

Nice work. Installed, set up and working within minutes. Well done!

 

Any thoughts to having a solution that would support the capability of 'casting' item to be opened by Media Browser Theater and/or Media Browser Classic?  Would be nice to throw an item to one of these players from a phone or tablet with the WebUI or the Android app.

Posted

Any thoughts to having a solution that would support the capability of 'casting' item to be opened by Media Browser Theater and/or Media Browser Classic?  Would be nice to throw an item to one of these players from a phone or tablet with the WebUI or the Android app.

 

You can already select MBT or MBC as the player in the WebUI.

Posted

You can already select MBT or MBC as the player in the WebUI.

 

Not when they aren't running.

 

The issues with doing this were discussed previously in this thread.

Posted

Not when they aren't running.

 

The issues with doing this were discussed previously in this thread.

 

Hah - I'd missed four important words: "to be opened by".

Posted (edited)

This is awesome !! Thank you for this brilliant piece of software!

 

Some types of streaming seems to be supported but not all. Why is that ?

 

 

Feature request: Add support for mpc-hc commandline options, do not need toggle options like fullscreen, but just a field where one could type them. 

Edited by KRA
Posted (edited)

@@KRA thanks but if there ever was an appropriate time for the metaphor of dwarfs standing on the shoulders of giants, then it's now!  The API is amazingly powerful, yet simple and most of the code came from @@Luke and @@ebr plus many others, it was more adaptation than anything else!  Being an Open Source project with such skilled developers makes life very very easy :-)

 

@@blade005,  brilliant feedback, as the app is experimental, I've set it to be greedy and accept any media thrown at it so it's good to know what does and doesn't work and I didn't considered channels.  I doubt they'll be supported soon, since as far as I can tell, they all need transcoding and therefore authentication which I'm not 100% convinced MPC can do.  Any other use cases where folks might find this app useful and it doesn't function as expected, let me know and I'll see what I can do.

Edited by anks
  • Like 1
Posted (edited)

This is awesome !! Thank you for this brilliant piece of software!

 

Some types of streaming seems to be supported but not all. Why is that ?

 

 

Feature request: Add support for mpc-hc commandline options, do not need toggle options like fullscreen, but just a field where one could type them. 

 

@@KRA The app is greedy, it'll take all it can get without validation, sort of why I marked it as experimental, instead of just including what I know works, I included everything, hoped to get feedback and build on this to make improvements.  Please consider that Media Browser this is something I looked at very briefly compared with the long history of other Media Browser contributors, also the codebase is large and well evolved, so it takes a lot to get your head around.  Positively, the code is excellent and the API is easy to use.

 

Great suggestion regarding command line, however it may mean people know how they want MPC-HC to be configured, in which case they might already have the perfect setup.  As noted in the initial post, if you already have fullscreen enabled in MPC-HC, the setting in the app will make no difference.  Initially, I considered this app to fit in to two camps, those who had an excellent MPC-HC setup, MadVR, Amp, Audio Delay tuned, Filters configured etc or those who wanted a fire and forget install, perhaps on a laptop and that is why I added the full screen option, plus it's useful to those who want to help me test :-)

 

The setting for full screen is just a commandline parameter, I could easily add a field to the setup screen to specify additional parameters in minutes but if I assume the user knows about MPC-HC, they might be better setting them directly in the client?  Can you give me an example please and I'll get it put in.

 

It's good to know that some streaming works, but also really surprising, the client looks for a Path in the API, something like "\\MediaBrowser\Movies\Teddy Bear alone on the Subway\Little Ted's Adventures in the Big Apple.BluRay.McGiffin.mkv".   The Api treats transcoding in a different way to direct play streams and I don't handle them (yet).  Can you let me know what worked with streaming and what didn't and I can fix it right up.

 

I really appreciate your time in writing your reply and also in helping me out with this app.

Edited by anks
  • Like 1
Posted

@@anks the only option I found missing from my initial testing was to start MPC-HC on monitor 2, something that can be done with "/monitor 2" commandline. Because I use the web gui as a remote for my projector. But since it's a dual screen setup I don't want mpc-hc to allways start on monitor 2, only when I launch it from Mediabrowser. (previously I did this via MBT)

 

As for streaming, there is a plugin named Video Bookmarks where you can add your own url to streams. I have both my IP Camera and TV channels run through this plugin (tvheadend tv backend supply http streams, same with IPCAM) Both these worked. However movie trailers plugin did not work. 

Posted

@@KRA, great feedback.  I've had a couple of hours this evening and I've implemented full streaming support, so channels etc work as they should.  I've also added an option to the setup screen to add additional options to the MPC command line, so you'll be good to go.

 

I've also added logging and an additional remote command to toggle full screen.  I need to test some more but I'll publish this release over this weekend.

  • Like 1
Posted

Tried the new update with command line paramter option, and it works great. But one problem, MPC-HC no longer exit on finish, and MBS stops counting with 1 sec left.

Posted

I believe you need '/close' on the command line to make MPC-HC exit when the video finishes.

Posted

Yes, but previous version did close on finnish. So I'm wondering if there is a bug or if he removed the command and it's working as intended. 

Posted (edited)

@@KRA, that's interesting. I initially read your post incorrectly,  MPC is just not reporting stopped after playback,  for now just add the /close in the additional arguments field on the setup screen.

 

The app did used to have the /close parameter but I found MPC would crash when it finished playing a stream, but as long as it's getting a status it doesn't need it.  The app polls MPCs web server and grabs the values, this class implements INotifyPropertyChanged.   This means I'm updating MB via the API only if I have something to let it know about, and if the playstate property changes to stopped, I exit the MPC.  This doesn't seem to be happening in your case, I bet the status is set to -1

 

With the /close parameter, can you try either setting the app to force streaming or playing content from a channel and see if your MPC crashes?

Edited by anks
Posted

I too think this is awesome for an initial release, but I have noticed that channels aren't working (for me at least) . But still great job! :)

 

@@Vidman, can you please test channels in the latest release?

Posted

MPC was setting the status to paused when playback was completed.  Fixed now and new version uploaded.

 

@@KRA, i would be grateful if you could test this out.

Posted (edited)

@@anks Confirmed working fine now mpc-hc exit on eof. I also tested channels and I may have made an error when I pointed out it was not working earlier. Becasuse I tried it again now and initially I though it wasn't working, but after about 30 seconds or so it started playing. 

 

Another thing that did not work before is playback of files not available to the MPC-HC client, this works now as it is streamed. 

 

I'm not getting any mpc-hc crashes.

 

Great work!

Edited by KRA

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...