INTERACT FORUM

Windows => JRiver Media Center 34 for Windows => Topic started by: alext77 on March 14, 2025, 01:41:11 am

Title: MC 34 feature request - launch a program on specific conditions
Post by: alext77 on March 14, 2025, 01:41:11 am
Hello,

I would like to launch a specific program when for example MC plays a video with black bars. Example : launch a program which allows to send RJ45 command to my JVC projector. With MC33 I do it manually through the keyboard, it is not handy at all. I could use madVR because it allows it but I prefer the JRiver video renderer even with HDR and tone mapping.
Title: Re: MC 34 feature request - launch a program on specific conditions
Post by: lepa on March 14, 2025, 03:13:56 am
Check this out
https://yabb.jriver.com/interact/index.php/topic,140107.0.html
Title: Re: MC 34 feature request - launch a program on specific conditions
Post by: alext77 on March 21, 2025, 07:24:27 am
Check this out
https://yabb.jriver.com/interact/index.php/topic,140107.0.html

Hello and thank you. I will check it.
Title: Re: MC 34 feature request - launch a program on specific conditions
Post by: jespermart on March 24, 2025, 02:33:48 pm
Check this out
https://yabb.jriver.com/interact/index.php/topic,140107.0.html

And you need to be a programmer to understand this. In madVR you can have a profile for movies in HDR and execute a command for instance a bat file to run jvccontrol a program to change your Jvc Projector user profiles. And you don’t have to be a programmer to do this.
Title: Re: MC 34 feature request - launch a program on specific conditions
Post by: zybex on March 24, 2025, 03:49:07 pm
Examples:
shellrun(c:\scripts\myscript.bat, arg1 arg2, 3)
shellrun(c:\scripts\setProjector.bat, [Width] [Height] "[HDR Format]" "[Color Space]", 3)

Hardly programming.
Title: Re: MC 34 feature request - launch a program on specific conditions
Post by: jespermart on April 04, 2025, 09:23:12 am
Examples:
shellrun(c:\scripts\myscript.bat, arg1 arg2, 3)
shellrun(c:\scripts\setProjector.bat, [Width] [Height] "[HDR Format]" "[Color Space]", 3)

Hardly programming.
I have shellrun to run a bat file but what to do with

 [Width] [Height] "[HDR Format]" "[Color Space]", 3)
Title: Re: MC 34 feature request - launch a program on specific conditions
Post by: zybex on April 04, 2025, 03:40:17 pm
That's just an example on how to pass parameters to the batch file. If you just want to run the same batch file with no arguments each time you play something, just do:

shellrun(c:\scripts\myscript.bat, , 3)

Those sample arguments on the previous examples are fields in MC - eg., you may want to call a batch file specifying which Aspect Ratio or Resolution or HDR color mode to set for the projector depending on which movie is being played, and in that case you would need to pass along those arguments to your batch script.
Title: Re: MC 34 feature request - launch a program on specific conditions
Post by: jespermart on April 09, 2025, 05:05:21 am
That's just an example on how to pass parameters to the batch file. If you just want to run the same batch file with no arguments each time you play something, just do:

shellrun(c:\scripts\myscript.bat, , 3)

Those sample arguments on the previous examples are fields in MC - eg., you may want to call a batch file specifying which Aspect Ratio or Resolution or HDR color mode to set for the projector depending on which movie is being played, and in that case you would need to pass along those arguments to your batch script.

And how would such a batchfile look like if I want to include “ Resolution, HDR format & color space”?
Title: Re: MC 34 feature request - launch a program on specific conditions
Post by: zybex on April 09, 2025, 05:41:12 am
That's very specific to what you need your batch file to do.

First step - write your batch file to do what you need, figure out what parameters it must have from MC, if any. A "powerProjectorOn.bat" file doesn't need any arguments, a "SetProjectorMode.bat" may need some arguments or it may all be hardcoded.
Second step - call your bat file from MC, adding whatever arguments your step1 bat file requires, if any.

Quote
In madVR you can have a profile for movies in HDR and execute a command for instance a bat file to run jvccontrol a program to change your Jvc Projector user profiles. And you don’t have to be a programmer to do this.

Just use the same bat file you use for MadVR.