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

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th November 2017, 08:53   #1  |  Link
chros
Registered User
 
chros's Avatar
 
Join Date: Mar 2002
Posts: 1,347
Modified Remoti.co remote app for MPC-HC/BE (on Android)

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!

Code:
'!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):
Code:
http://192.168.1.6:13579/sendkeys.vbs?%5e%2b%25i
Issues:
- 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

Enjoy!
__________________
Ryzen 5 2600,Asus Prime b450-Plus,16GB,MSI GTX 1060 Gaming X 6GB(v385.28),Win10 LTSB 1607,MPC-BEx64+LAV+MadVR,Yamaha RX-A870,LG OLED65B8(2160p@23/24/25/29/30/50/59/60Hz)

Last edited by chros; 4th November 2017 at 09:08.
chros is offline   Reply With Quote
Old 4th November 2017, 08:58   #2  |  Link
chros
Registered User
 
chros's Avatar
 
Join Date: Mar 2002
Posts: 1,347
Quote:
Originally Posted by chros View Post
maybe it will give you guys ideas how to create one with pure javascript or html5 of somebody wants to work on it.
Unfortunately I don't have spare time for this myself, but if someone is willing to start to work on this (e.g. as an opensource project), I can help with pointers or uploading a sample html file that I use sometimes for additional MadVR functionality.
__________________
Ryzen 5 2600,Asus Prime b450-Plus,16GB,MSI GTX 1060 Gaming X 6GB(v385.28),Win10 LTSB 1607,MPC-BEx64+LAV+MadVR,Yamaha RX-A870,LG OLED65B8(2160p@23/24/25/29/30/50/59/60Hz)
chros is offline   Reply With Quote
Old 6th November 2017, 18:01   #3  |  Link
imsrk48
Registered User
 
Join Date: Nov 2017
Posts: 115
Where is download link

Sent from my P4 using Tapatalk
imsrk48 is offline   Reply With Quote
Old 7th November 2017, 08:29   #4  |  Link
chros
Registered User
 
chros's Avatar
 
Join Date: Mar 2002
Posts: 1,347
Quote:
Originally Posted by imsrk48 View Post
Where is download link
Eerrr... at point 4.
__________________
Ryzen 5 2600,Asus Prime b450-Plus,16GB,MSI GTX 1060 Gaming X 6GB(v385.28),Win10 LTSB 1607,MPC-BEx64+LAV+MadVR,Yamaha RX-A870,LG OLED65B8(2160p@23/24/25/29/30/50/59/60Hz)
chros is offline   Reply With Quote
Reply

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 19:20.


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