Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Hardware & Software > Software players

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 4th November 2017, 09:53   #1  |  Link
Registered User
chros's Avatar
Join Date: Mar 2002
Posts: 2,321
Modified Remoti.co remote app for MPC-HC/BE (on Android), madVR JS remote, bscpylgtv

I decided to create a separate post for this (original post is here), so this can be found easily and maybe it will give you guys ideas how to create one with pure javascript or html5 of somebody wants to work on it.
With this app there's no need for any other 3rd party frontend to play stuff from the couch, it includes every necessary feature that I need.

1. Preface
There are couple of remote apps for MPC-HC/BE but Remoti.co Lite (by Kostia Dombrovsky) the only one that is simple and well working all the time.
It lacked of certain features, so I tried to contact Kostia, but he had other things to do.
So, I decided to try to modify the app itself (without having the source code ). Here's the result.
(It has also a version for Apple devices, but I only modded the Android one.)

2. Changes
- added 1 button to change source level with MadVR
- added 2 buttons for subtitle delay
- fixed and refactored the after playback entries
- modded the default skip interval from 5 sec to 10 sec
- switched the size and location of the FF/RW with PrevTrack/NextTrack buttons in portrait mode, since we use them more frequently
- removed ads
- added new skin(s)

3. Known issues
- if a favorite folder is selected, sometimes app crashes: if you run (start) the app again, this feature will work well afterwards

4. Download
- mpc-rc_5.1_mod-1.0.apk

5. Notes about button for MadVR
It required a small hack to interact with MadVR since it doesn't have an interface for remote controlling different properties, but it does provide keyboard shortcuts for couple of them.
So, the idea is that we send actual MadVR keyboard shortcuts as a parameter to MPC-HC/BE and the player itself will actually trigger these keyboard shortcuts with an external helper script.

I'm using Windows Host Script (which comes with newer Windows, >Win7, I think), which should be run with 'cscript.exe':
- cgi script receives 1 url encoded argument (the keystroke), url decode it, then send it to the foreground (!!!) application.

MPC-HC/BE web interface setup:
- x Serve pages from: ./webroot
(we don't have to change Default page value (default is: 'index.html;index.php'))
- CGI handlers: '.vbs=c:\Windows\System32\cscript.exe'

Save this into file called 'sendkeys.vbs' in 'webroot' subdirectory of directory of MPC-HC/BE (you don't have to deploy anything else to here, all the other pages will be served as well if you need them). The file extension does matter!

'!c:/windows/system32/cscript //nologo
' Toggle source level in MadVR (CTRL+SHIFT+ALT+i = ^+%i = %5e%2b%25i)
' get shell object
Set WshShell = WScript.CreateObject("WScript.Shell")
' get Process array that includes the query string
Set wshUserEnv = WshShell.Environment("Process")
' urldecode querystring
param = unescape(wshUserEnv("QUERY_STRING"))
' send keystroke
WshShell.SendKeys param
' delete used objects
Set wshUserEnv = Nothing
Set WshShell   = Nothing
' quit script with exit code 0
Wscript.Quit 0
You can try it out from a different computer or from a smartphone by calling this URL (you should modify the IP/port):
- since it can only send keystrokes to the foreground application, and I don't include a check whether it is MPC-HC/BE or not (i tried, and it worked, but it was so slow, that the whole thing became unusable), so you can get some funky stuff

Good thing:
- it won't kick out MadVR from Fullscreen Exclusive mode

6. Final notes
- I won't add any new feature to the app (it was a pain in the ass to mod it without having the source code )
- I considered uploading the reverse engineered source code to somewhere but I failed to do so at that time (more than 2 years ago)
- if you like the app then support the original dev, Kostia

7. madVR JS remote
Lightweight remote controller for madVR written in HTML/JS/CSS: madVR JS remote

8. bscpylgtv
Library to control webOS based LG Tv devices, a basic, smaller and faster version of aiopylgtv (without calibration related features), optimized for command line usage: bscpylgtv

Ryzen 5 2600,Asus Prime b450-Plus,16GB,MSI GTX 1060 Gaming X 6GB(v398.18),Win10 LTSC 1809,MPC-BEx64+LAV+MadVR,Yamaha RX-A870,LG OLED77G2(2160p@23/24/25/29/30/50/59/60Hz) | madvr config

Last edited by chros; 19th September 2021 at 16:55.
chros is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 17:57.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.