Decorum for the Forum:
  • Be nice. If you want to be mean, try Reddit.
  • No Piracy. If you want to be a thief, there are dark places on the internet dedicated to that.
  • No Cracking. Discussions on AnyDVD, DeUHD, DVDFab, UHDKeys and similar tools are not permitted here.
  • No Spamming. If you want to make a buck, work smarter... somewhere else.
  • No Adult Content. Half the internet is dedicated to adult content. This half isn't.

Privacy Policy: Click Here to Review (updated September 30, 2020)

Custom IP control command according to aspect ratio

Post here to suggest ideas for future versions.
Manni
Posts: 593
Joined: Wed May 22, 2019 5:27 am

Custom IP control command according to aspect ratio

Post by Manni » Wed Nov 08, 2023 9:16 am

I have a feature request that would be especially useful for projector owners, either those with an Anamorphic lens and a scope screen, or those who (like myself) like to shift the picture to the top or bottom of their 1.78 screen when it's wider, so that there is only one black bar that can easily be masked manually.

Some VP (Envy, Radiance) and renderers (like madVR) can do this automatically, but other renderers (like JRVR) don't. JRVR is supposed to implement a picture shift feature based on their black bar detection feature, but it has no ETA and a few downsides:
1) It doesn't support DVDs (and there is no plan to do so)
2) It's not real-time detection, so the whole collection has to be scanned in advance and results have to be saved per title, which is very time-consuming and inconvenient for large collections. It also means that you have to scan each new title, even when you don't use jRiver's collection (which is pointless for CMC users).

I propose to implement in CMC what I had helped Brian to implement in WMC with MyMovies, which is an aspect ratio command based on the aspect ratio metadata for each title (as MyMovies CM allows to specify the A/R for each title).

Brian had done it for JVC projectors, so JVC commands were sent over IP to select the correct configuration (as we both had JVCs) but I suspect that it would be more useful (and easier) to do a generic implementation, where a batch file is executed according to each aspect ratio detected.

That way, any projector with IP control could use this feature, not just JVCs. Of course, I'm happy to help implement direct JVC control as we did with MyMovies, but that would be a larger task, as you'd have to implement to IP control for JVC (documented) and the commands themselves (not difficult, I have them, it's just more time).

If we go for a batch files implementation, it sounds like a straightforward task and shouldn't be too difficult:
- When the title is selected, look for the aspect ratio for that title in the metadata
- If present, execute the corresponding batch file (1.78.bat, 2.40.bat, 2.35.bat etc.).
- If not present, do nothing or launch the default A/R (to be specified in the settings)
- Optional delay before starting the player, to avoid conflict if the player is also sending commands, for example I often send commands about aperture to set the peak brightness according to content (SDR or HDR). The JVC is notoriously bad at stacking IP control commands, so if you send one while another is being executed, it can be lost, and changing the installation mode (what you have to do to change the A/R on the JVCs) can take a few seconds depening on what it implies (fairly fast if only a vertical shift, but longer if it also zooms).

I'll be happy to provide a set of batch files for JVC projectors, along with the utility allowing to send the commands from CMC. I could ask the author of the utility if he'd be okay if it was included with CMC (with credits of course). That way CMC could ship with support for JVC projectors, as an example for other projector brands.

That's the only feature that I miss from MyMovies. I had not needed it until now because I was using madVR, but I'm having lots of issues with madVR (wrong HDR mode, black screen) that mean that I'm using JRVR most of the time. That means I have to switch installation mode manually, and even if I use Roomie Remote on the iPad to do it (much faster than using the JVC menus), it's still somehting that CMC could do automatically when the title is selected.

Along with Vera Lights and WOL, this would complete the WMC transition :)

Thoughts?

Online
User avatar
Pauven
Posts: 2792
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Custom IP control command according to aspect ratio

Post by Pauven » Wed Nov 08, 2023 9:47 am

Sounds interesting.

If I did this, I'd probably fully integrate it into CMC, not via batch files. Though I'll have to think about this. It might be that allowing for external scripts to be executed in conjunction with some actions could solve problems far beyond this. But since this requires the AR data from My Movies, it's more than simply calling a batch file, it's calling a specifically named batch file, which defeats the purpose of executing a generic batch file as a standard action.

Batch files can receive parameters, so one option might be to always pass parameters into the batch file, among those parameters the AR would be one, and then the batch file could simply use whatever parameters were needed for the task at hand. That way, the batch file would receive the AR, and make a determination based upon that value and send the appropriate IP commands.

But the more I think about this, the more I like the idea of keeping it internal in CMC. This could include a built-in scripting tool. Define a script, link it to inputs/outputs as desired, and set it to execute at predefined times, not altogether different than WOL and Mi Casa Verde. For the first iteration, I would likely only include the functionality required to support the projector control, but the framework would allow me to expand the functionality over time to do even more stuff.

I've got experience with this type of development. My old day job was writing a lot of interfaces using a prebuilt integration tool, and if you wanted to do any batch commands, you could either link directly to a batch file, or write the script inside the tool and omit batch files altogether. The functionality was there, but was completely manual - if I did it, I would want to have predefined vars and commands that could be easily inserted into the script. And of course, a built-in scripting tool could still be used to call external batch files if I did go in this direction.

Though all of this might be too ambitious. A dedicated projector/display IP control feature might be much more streamlined, same as I did for WOL and MCV.

The first step is for me to see these batch files - I need to see what's actually going on. I've never looked into IP projector control before, though I've done enough IP stuff that I'm not scared.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Manni
Posts: 593
Joined: Wed May 22, 2019 5:27 am

Re: Custom IP control command according to aspect ratio

Post by Manni » Wed Nov 08, 2023 10:19 am

Great, let's dig into this :)

There are no batch files for now. MadVR does this internally, without shifting the picture physically, so there are no JVC commands involved. With JRVR, I'm using the direct IP control of the JVC for this in Roomie Remote, so I have the IP commands for each A/R (in fact for each installation mode, so there is no standard as each user can set-up each mode for each A/R, as they want.

So if you wanted to go the integrated way, the best thing to do would be for me to send you the IP control reference guide, as well as a few hints (for example, you need to send a PJREQ command before each command to "wake up" the JVC interface), and examples of what to send as a proof of concept. Then I can send you all the commands and we can decide on how to implement: Force the user to use a specific installation mode for each A/R, or allow the user to map each A/R to the installation mode they want (or N/A), which would be the best way forward.

I would be happy to create the batch file for you, but only if you want to go the batch file way (single with parameter or multiple batch files, as you wish). It would take me some time to create and test them, so I'd rather not do that if you're not going to use them, because the commands won't be in the same format.

So decide first if you want to go batch file(s) or integrated IP control (similar to Vera Lights) and we'll take it from there.
Last edited by Manni on Wed Nov 08, 2023 1:37 pm, edited 1 time in total.

Online
User avatar
Pauven
Posts: 2792
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Custom IP control command according to aspect ratio

Post by Pauven » Wed Nov 08, 2023 12:01 pm

Yes, please put together a quick and dirty batch file. I want to see what I'm dealing with before even considering reading documentation.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Manni
Posts: 593
Joined: Wed May 22, 2019 5:27 am

Re: Custom IP control command according to aspect ratio

Post by Manni » Wed Nov 08, 2023 1:32 pm

There is nothing in the batch file, it's trivial, it would be something like this:

REM Use: JVC [A/R]
@echo off
GOTO %1
:AR178 RUN c:\video\jvccontrol.exe Raw:[command for installation mode 1.78]
GOTO END
:AR240 RUN c:\video\jvccontrol.exe Raw:[command for installation mode 2.40]
GOTO END
:AR235 RUN c:\video\jvccontrol.exe Raw:[command for installation mode 2.35]
[etc...]
:END

I'm not going to look into the raw commands if you're not going the batch file(s) way. I have no idea what they are as I don't use them currently, but I can find them if necessary.

What I use are IP Control commands, which are sent directly to the JVC using the (well documented) IP control protocol.

They look like this: \x21\x89\x01\x49\x4E\x4D\x4C\x30\x0A

Again, it's trivial once you've implemented the IP protocol, one command to send depending on the A/R. The main question re implementation is if you force the user to use a specific A/R for each installation mode (CMC decide which mode to call according to the A/R and that's fixed) or if you let the user assign the installation mode they want to select for each A/R (that's what I had done with Brian, as it's more flexible and far better for the user).

So let me know how you'd like to go ahead (batch files or IP control) and I'll provide all the relevant documentation.

We can test one command, and once that works, we can implement the rest. Or you can go ahead with the full enchilada and we can debug as we go.

Online
User avatar
Pauven
Posts: 2792
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Custom IP control command according to aspect ratio

Post by Pauven » Wed Nov 08, 2023 2:15 pm

Okay, we need to slow down and level set on a few things - I'm a bit lost at the moment.

JVCControl.exe looks to be a custom command line app someone wrote, not actually provided by JVC. I found the developers page and they said he source code was included in the download, but unfortunately it is missing. That would have been a nice shortcut to see some source code. Obviously this type of solution would only work for JVC, so I'm not very interested in it.

But obviously using batch files permits this type of solution, so to be clear I'm not ruling out batch files.

What I'd like to do is develop a global, cross platform solution, not a JVC specific solution. And that may require batch files to achieve.
Manni wrote: Wed Nov 08, 2023 1:32 pm using the (well documented) IP control protocol.
A link here would be helpful. The documentation I pulled up, for IPCP, appears to be a very low-level IP management protocol, so a device can request an IP address, for example, so pure networking stuff. What you're describing sounds like a method for remotely controlling devices via TCP/IP, and I don't know if JVC has their own unique API or if there is an industry standard they follow.
Manni wrote: Wed Nov 08, 2023 1:32 pm They look like this: \x21\x89\x01\x49\x4E\x4D\x4C\x30\x0A
Those are hex codes. Not sure if the entire string is predefined somewhere or if this is built up of several smaller bits to form the full string.
Manni wrote: Wed Nov 08, 2023 1:32 pm The main question re implementation is if you force the user to use a specific A/R for each installation mode (CMC decide which mode to call according to the A/R and that's fixed) or if you let the user assign the installation mode they want to select for each A/R (that's what I had done with Brian, as it's more flexible and far better for the user).
I don't even know what an "installation mode" is, so I have no input on this. I assume this is a JVC thing.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Manni
Posts: 593
Joined: Wed May 22, 2019 5:27 am

Re: Custom IP control command according to aspect ratio

Post by Manni » Thu Nov 09, 2023 4:27 am

Sorry, I thought you were more familiar with projector IP control. I've answered many of your questions in my previous posts, but you might have missed the info. Let's recap/clarify:

- There is no universal IP control for projectors. Each brand has its own protocol, and each model/family can have specific commands. So a universal implementation is simply not possible.
- As mentioned in my initial post, the jvccontrol.exe utility is indeed made by a developer, not by JVC. I could get in touch with him about the source code or any other info, but only if you decide to go for the CMC internal, brand-specific integration. This will ONLY help with the JVC implementation. It won't help with Sony, etc.
- I have no idea about other projector brands, I can only help with JVC, which I'm very familiar with. There is definitely an IP control protocol and I assume there must be a similar command line utility for Sony etc, but I haven't researched that, so you'll need a Sony user (or any other brand user) for help with each brand.
- The main reason why I suggested a batch file(s) implementation, besides the fact that it's fast and easy, is because it's a universal solution on your end: We can make a batch file for JVC projectors, using the JVC control utility, and any projector owner can modify the batch file to launch their own utility (if they have a different brand) and the correct command for each aspect ratio (there is no standard defined for that, more on this later). It's also a lot less work for you than having to implement a native IP control implementation in CMC for each brand (as you did for Vera Lights, it wouldn't be the same for any other brand using a different protocol).
- For JVC (and I assume for other projectors), there is no command that sets a specific aspect ratio. What you have is a "lens memory" or "Installation mode" command, that selects a set of zoom, shift etc values specific to each situation. For example, for a user who has a 1.78 screen and no anamorphic lens, all the modes will have the same zoom setting, the only thing that will change is the vertical lens shift. It's up to each user to create a mode for each aspect ratio they want to support. For a user with a scope screen and no anamorphic lens, both the lens shift and the zoom will change for each mode. Other things will change for users with an anamorphic lens. Often, these modes are set by the calibrator/installer, each following their own preference (there is no standard regarding which mode should apply to each aspect ratio), and it's not easy for the user to change that. With the recent JVCs, you have ten different "Installation Modes". With previous models, you had ten different Lens Memories. I think the IP commands are the same for lens memories and installation modes, but I'd have to check. The only thing you can control is which lens memory / installation mode to select. It's up to the user / calibrator / installer to decide what each mode does and how to set it up.
- As I said, I will send you all the relevant documentation, but only once you decide if you want to go the batch file way or the CMC internal IP control way. Let's look further at the pros and cons of each approach:
- If you go the batch files way, you don't need any JVC documentation and you don't need to worry about any specific command. I'll provide the RAW command in the batch file for each specific lens memory or installation mode, so you don't have to waste any time with that, or with the IP command protocol. The JVCcontrols.exe utility does that for you, and I'll provide the commands. The only thing you have to worry about is fetching the A/R from the title metadata and providing it to the batch file when you launch it from CMC. The rest is handled by the batch file logic and the jvccontrol.exe utility (and myself re the raw command to use to select each lens memory / installation mode). The upside of this approach is that implementation is fast and easy for you, it could literally be done in a few hours, and it's universal and flexible, as the user can change the batch file to suit their own implementation (which lens memory / installation mode should be selected for each aspect ratio). The downside it that it's a batch file, so less elegant and relies on an external utility, so you'll need permission from the author to include it with CMC along with the sample batch file (that would be for JVC projectors to start with). You could have a setting that selects a different batch file depending on the projector's brand as you add support for additional projector brands. It's also a bit more research for me as I don't use the batch file approach currently, so I'd have to research the RAW commands to use, but that's not a problem at all, I can get that info easily when/if needed.
- If you go the internal IP control way, I'll also provide all the hex/ascii commands for each lens memory/installation mode. They are not the same as the RAW commands used by the command line utility in the batch file, but I know them so it's faster/easier for me. However, it's much longer and more difficult for you, because you have to implement the IP control internally (what the jvccontrol.exe command line utility does for you in the batch file approach). I'll give you the documentation to implement the IP control protocal, but you won't need to dig into how each lens memory / installation mode command is formed (it is indeed formed of different parts, but that's entirely irrelevant to you, as I will provide the full command for each lens memory / installation mode). Because there is no standard, you will have to decide whether you want to force the user to use say mode 1 for 1.78, mode 2 for 2.40 etc, or if you will give the user a way to assign a lens memory / installation mode for each available A/R. For example, they could specify mode 1 for 2.40 and mode 2 for 1.78, and set all the other A/R to do nothing. The advantage of this approach is that it's more elegant, you don't need to add a third party utility to CMC, no batch files, but it will likely take a lot longer to get the IP Control protocol coded and working. I've helped many developers to implement it (HD Fury, Brian, etc) so it's not a big deal, but it's a lot more work than going the batch files way, plus you have to do a new implementation for each brand (and possible family model).

Because the commands are not the same depending on the approach, and because I know the IP Control commands but not the RAW commands used by the batch files utility, you need to decide which way you'd like to go before I can help further.

If you go the batch files way, there is no need for any documentation. I'll research the raw commands, I'll provide a test batch file once we agree on the A/R parameter you'll provide when calling the batch file, and bob's your uncle.
If you go the internal IP control way, I'll provide the documentation you need and a set of command to use for a JVC specific implementation, and we can discuss the user interface (ideally mapping each A/R to a user-selected lenms memory or installation mode). I have all the commands, and you don't need to dig into how to form them. Once you can communicate with the PJ using the IP control protocol, most of the work is done.

I hope this helps and clarifies, let me know if you have any questions :)

Online
User avatar
Pauven
Posts: 2792
Joined: Tue Dec 26, 2017 10:28 pm
Location: Atlanta, GA, USA
Contact:

Re: Custom IP control command according to aspect ratio

Post by Pauven » Thu Nov 09, 2023 7:54 am

Thank you for this great write up, it helps tremendously.

My first thought is that won't some of these modes, applied as the disc is launched, cause problems with navigating the disc's menu? After all, the menus are standard 16:9, and you may need to navigate the disc setup before starting the movie itself, or perhaps peruse the scenes to jump to a favorite part.

The player applying the mode only during movie playback feels much more elegant. Obviously JRMC falls short here. But the CMC approach could work too well, no?

You said that Brian implemented this in WMC, I'd imagine it had the same drawback, the mode was applied early and affected disc menu navigation, and possibly movie trailer previews in other ARs. Is this really what you want?

Regarding standards, I was hopeful that a Cestron type standard was perhaps at play. I checked, and while Optoma has typically implemented Cestron support in their projectors, apparently mine is nerfed and only has screen casting via network, and more control via the RS232 interface.

As far as choosing between batch vs direct IP control, I think I need to see the IP control documentation to see what's involved with that approach, and to ensure compatibility with my developer tools. So please forward that to me.

I do realize that the need for such features is normally restricted to higher end installations, and that 90% of consumer grade projectors don't have the features to fulfill these roles. So from that perspective, it makes sense to only worry about the higher end brands like JVC, Sony, Christie, etc. And considering how small the CMC user base is, this might be another example of a feature just for you. I'm not saying that's a problem, just being realistic about the scenario as I think through the options. Does it make more sense to try to develop a globally usable batch solution that never finds an audience, or to make a highly integrated direct IP control solution that works extremely well for the select few who need it...

I do have dreams of a dedicated theater in my next home, and odds are high that a JVC projector would be part of that build. So my dreams here are also a factor.
President, Chameleon Consulting LLC
Author, Chameleon MediaCenter

Manni
Posts: 593
Joined: Wed May 22, 2019 5:27 am

Re: Custom IP control command according to aspect ratio

Post by Manni » Thu Nov 09, 2023 9:25 am

You're very welcome :)

Yes, it can be an issue to change the A/R before the film itself starts, but there isn't much we can do about this.
It's more of an issue if you have a scope screen (with or without an anamorphic lens), as you can end up with a large part of the interface masked/cropped, but it's up to each user to decide if they prefer the automatisation with its drawback or doing it manually when the content actually starts. Especially with a 1.78 screen, I prefer an automatic A/R selection, as the picture is simply shifted to the top of the screen, usually that doesn't prevent playing through the menus (that tend to be at the bottom of the screen). You can always change the A/R manually if it's really needed, but I'd say 99% of the time it's not need. Of course, many users rip only the main movie, and in that case that's not an issue at all.

I don't know how JRMC will implement this, they probably scan the black bars for the main title only, so they might only do the picture shift when the main title starts. This would definitely be preferable.

Of course, the ideal solution is madVR/Envy/Radiance, which looks at the content in real time and shifts the picture instantly according to the A/R. JRMC doesn't want to do it in real time as it uses more resources and it needs to be able to run on fairly light boxes.

This makes me think that we might want to provide an option to use the auto A/R with DVDs only or with all content, so that those who prefer to use JRMC vertical shift for bluray and UHD Bluray can do so, it will also spare the physical mechanism for the lens.

I attach the PDFs that I have for the IP Control implementation. The most relevant one is the LAN connection specs. Remember that you don't need to work out the actual commands, so the second document is for future reference only. The only command you need to implement is PJREQ, the others I will provide if you decide to go that way. I had to rename the PDFs to JPGs, please rename back to PDF before opening (I'll email them to you if this doesn't work). [EDIT: files not coming through, I'll email them to you].

There is zero issue with your developer tools, it's simply an IP protocol, if you can control the Vera Lights, you can control the JVCs.

I checked and the commands are the same for lens memories and installation modes, so that simplifies the JVC implementation, that's just ten commands for up to ten distinct aspect ratios.

Please don't implement this if it's just for me. I'd feel better if you do it for yourself too. :) Ideally, a few other JVC users will be interested.

Manni
Posts: 593
Joined: Wed May 22, 2019 5:27 am

Re: Custom IP control command according to aspect ratio

Post by Manni » Thu Nov 09, 2023 9:31 am

Also if you wanted to go the batch files way, the lens memory / installation mode commands are implemented in the utility, so it's very easy, no need to work out the RAW commands:

D8 Installation MODE1 - Change of "Installation mode" or "lens memory" to 1
D9 Installation MODE2 - Change of "Installation mode" or "lens memory" to 2
DA Installation MODE3 - Change of "Installation mode" or "lens memory" to 3
E5 Installation MODE4 - Change of "Installation mode" or "lens memory" to 4
E6 Installation MODE5 - Change of "Installation mode" or "lens memory" to 5
E7 Installation MODE6 - Change of "Installation mode" or "lens memory" to 6
E8 Installation MODE7 - Change of "Installation mode" or "lens memory" to 7
E9 Installation MODE8 - Change of "Installation mode" or "lens memory" to 8
EA Installation MODE9 - Change of "Installation mode" or "lens memory" to 9
EB Installation MODE10 - Change of "Installation mode" or "lens memory" to 10

Post Reply