Log in

View Full Version : Modified Remoti.co remote app for MPC-HC/BE (on Android), madVR JS remote, bscpylgtv


chros
4th November 2017, 09:53
I decided to create a separate post for this (original post is here (https://forum.doom9.org/showthread.php?p=1735591#post1735591)), 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 (https://play.google.com/store/apps/details?id=com.kdombrovsky.mpcremote&hl=en_GB) (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 (https://www.dropbox.com/s/wwmsvbt4fc3qlw8/mpc-rc_5.1_mod-1.0.apk?dl=0)

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):
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

7. madVR JS remote
Lightweight remote controller for madVR written in HTML/JS/CSS: madVR JS remote (https://github.com/chros73/madvr-js-remote)

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

Enjoy!

chros
4th November 2017, 09:58
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.

imsrk48
6th November 2017, 19:01
Where is download link

Sent from my P4 using Tapatalk

chros
7th November 2017, 09:29
Where is download link
Eerrr... at point 4. :)

chros
11th March 2020, 12:24
I've published a small madVR remote in the 7. point of the first post.

chros
17th April 2021, 21:26
7. madVR JS remote
Lightweight remote controller for madVR written in HTML/JS/CSS: madVR JS remote (https://github.com/chros73/madvr-js-remote)
Updated version:
- rewritten code
- MPC-HC/BE is set to active window when a keystroke is sent
- ability to run external scripts
- optional color attribute of buttons
- support tabs

Thanks to @SirMaster for the ideas!

chros
19th September 2021, 16:51
8. bscpylgtv
Library to control webOS based LG Tv devices, a basic, smaller and faster version of aiopylgtv (https://github.com/bendavid/aiopylgtv) (without calibration related features), optimized for command line usage: bscpylgtv (https://github.com/chros73/bscpylgtv)


v0.0.3 is released.

chros
23rd September 2021, 21:08
bscpylgtv v0.0.4 is out.

chros
2nd October 2021, 18:03
bscpylgtv v0.1.0 (https://github.com/chros73/bscpylgtv/releases) (probably won't be any newer version for a while)

chros
27th November 2021, 12:42
bscpylgtv v0.2.1 (https://github.com/chros73/bscpylgtv/releases)

chros
1st December 2021, 19:07
bscpylgtv v0.2.2 (https://github.com/chros73/bscpylgtv/releases)

chros
4th December 2021, 15:19
bscpylgtv v0.2.3 (https://github.com/chros73/bscpylgtv/releases)

chros
3rd January 2022, 11:25
bscpylgtv v0.3.0 (https://github.com/chros73/bscpylgtv/releases)

chros
23rd October 2022, 21:24
bscpylgtv v0.4.0 (https://github.com/chros73/bscpylgtv/releases), it's mostly about calibration changes, lot of new stuff has been added.

chros
29th October 2022, 21:26
bscpylgtv v0.4.1 (https://github.com/chros73/bscpylgtv/releases)

mondurr
20th December 2022, 18:20
Could this be used to modify the display profile used for the LG C2 menu overlays? For example, open Netflix and while just looking at the box art you'll notice that changes to your picture settings have no effect (other than oled backlight). Move the color slider to 0 and your box art is still in full way overblown color, but play a movie and then you'll see that the video is black and white as expected. If one of the built in picture modes is used for the menu overlays, I can't figure out which one it is, but my goal here is to modify whatever is needed to adjust the picture mode that is used for the menus. Any thoughts?

chros
20th December 2022, 23:20
Good question, I haven't even noticed what you raised so far (I don't really use the built in apps).
Here you can see the available inputs (https://github.com/chros73/bscpylgtv/blob/master/docs/available_settings_C2.md#inputs) on a C2, maybe ip or photo or even browser is used for it. Or it can also happen that these overlays are treated differently in the active picture preset, I'm not sure.

"movie" and "photo" are for the internal media player app when playing video and images, and other internal apps (netfix, plex, etc) uses "default" input.
You can use set_picture_settings method to set any properties of a preset of a given input, e.g. color to 0 (you have to switch back and forth between presets then to activate the new setting).
Let me know if you found something interesting.


bscpylgtvcommand 192.168.1.18 set_picture_settings "{\"color\": 0}" expert2 default
bscpylgtvcommand 192.168.1.18 set_current_picture_mode expert1
bscpylgtvcommand 192.168.1.18 set_current_picture_mode expert2

arrgh
29th August 2023, 01:28
Hi
very likely stupid question...:
how do one get/create the needed ".aiopylgtv.sqlite key config file" needed for calibration tasks?
And: will bscpylgtv work on "B1" models (uploading LUTs)? There seem to be issues...
Thanks

chros
22nd October 2025, 07:46
how do one get/create the needed ".aiopylgtv.sqlite key config file" needed for calibration tasks?
And: will bscpylgtv work on "B1" models (uploading LUTs)? There seem to be issues...

The key db file is created automatically when it's not present, and it's used for connecting to the TV, not just for calibration commands.
B1 should be also supported.

chros
22nd February 2026, 09:30
bscpylgtv v0.5.1 (https://github.com/chros73/bscpylgtv/releases)

Notes on v0.5.0:
- Added reboot method that fully restarts the TV (WebOS logo shows up on restart), since the old reboot_soft method was restricted for some time now.
- All the available settings docs (https://github.com/chros73/bscpylgtv/tree/master/docs) were updated with way more options and their possible values as well!
- With the new set_settings method all the options can be set.
- Added set_device_info, set_system_picture_mode (this one requires WebOS v9 (2024) or newer), set_system_settings methods that use the public API of WebOS, so they are more efficient than e.g. set_settings method. The catch is that only limited amount of options can be set with set_system_settings method (check out the available settings docs).
- Added ability to pass multiple commands with arguments to bscpylgtvcommand by separating them by , . This allows us to write more efficient scripts using bscpylgtvcommand, since we don't have to connect to the TV all the time a new command is fired up.
- Added new guide: Setting presets (https://github.com/chros73/bscpylgtv/tree/master/docs/guides/setting_presets). This can be handy after a factory reset or A/V reset, or for someone who has to deal with many devices all the time. You can set up a TV with this in 5 minutes, including calibration as well!

dropbrivk
20th March 2026, 10:36
Hi there,
Thanks for this software!!

I have an LG C2 from 2022 using the W22O chip in theory... I would like to know how I can export the 1D and 3D LUT from one of the presets (if calibrated with a LUT) and load it back in.

Also is there a way to print the 22 point/10 point/2point white balance and fine tune adjustment from command line ?


Thank you!!