INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MediaCenter28 Debian Command Line Input  (Read 4203 times)

Headkeeper

  • Recent member
  • *
  • Posts: 12
MediaCenter28 Debian Command Line Input
« on: October 20, 2021, 04:05:32 am »

Sorry for the newbie question but I cannot seem to get the command line directives working (such as mediacenter28 /pause).  Could someone give me a quick example? I am sure I must be making a simple syntax error.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: MediaCenter28 Debian Command Line Input
« Reply #1 on: October 20, 2021, 09:35:38 am »

I'd recommend using the MCWS.

Play/Pause:
Code: [Select]
curl -s -o /dev/null -u username:password http://localhost:52199/MCWS/v1/Control/MCC?Command=10000

Username and password are in your Media Server settings.
Logged

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #2 on: October 20, 2021, 12:37:06 pm »

Is that also the recommended way to implement control via lirc, or is there a better way or maybe a plugin?
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

Headkeeper

  • Recent member
  • *
  • Posts: 12
Re: MediaCenter28 Debian Command Line Input
« Reply #3 on: October 21, 2021, 03:31:56 am »

Thank you Bryan,  I haven’t looked at MCWS yet.   Of course this would require running the server and installing a web client.  I am just looking for an easy way to expand my Flirc controls (pause just being a simple example).  Are the command line options not available in Debian?
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MediaCenter28 Debian Command Line Input
« Reply #4 on: October 21, 2021, 03:24:07 pm »

You can run these commands using the mc28 stub executable.

for example:

/usr/lib/jriver/MC28/mc28 /pause
Logged

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #5 on: October 21, 2021, 04:28:45 pm »

Ah, finally, THX!

Went and used that right away to build a small wrapper to control MC from lirc.

One thing is a bit strange, though. These command seem to work https://wiki.jriver.com/index.php/Media_Center_Core_Commands
Now when I try to cycle through audio languages, it does not work. All I can do is select audio1, audio2, audio3 and so on. So let's say I had three audio tracks, I'd have to use up three buttons on my remote. Same for the subtitles, which sometimes come in dozens. Is there a way to actually cycle through them?

Also the syntax seems a bit off. DISPLAY=:0 /usr/lib/jriver/MC28/mc28 /MCC 10053,1 gives me the first audio track, though the html-page states, int nIndex (-1 toggles forward, -2 toggles backwards).
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: MediaCenter28 Debian Command Line Input
« Reply #6 on: October 21, 2021, 07:22:44 pm »

I really don't know much about those commands but the general ones should work the same as windows or Mac.
Only the linux specific ones (like the audio devices, etc) should be different.
Logged

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #7 on: October 22, 2021, 01:19:50 am »

Who would know? Might be a bug. As I said, when I use the exact given syntax, it doesen't work, when it should.

/usr/lib/jriver/MC28/mc28 /MCC 10053,-1 does not switch to the next audio but does nothing at all. This is the documented syntax.
/usr/lib/jriver/MC28/mc28 /MCC 10053,1 gives the first audio track.
/usr/lib/jriver/MC28/mc28 /MCC 10053,2 the second.

With subtitles it does not work at all.
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

Headkeeper

  • Recent member
  • *
  • Posts: 12
Re: MediaCenter28 Debian Command Line Input
« Reply #8 on: October 22, 2021, 03:28:13 am »

Awesome Bob,

Thank you.  Just what I was looking for!
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: MediaCenter28 Debian Command Line Input
« Reply #9 on: October 22, 2021, 06:48:34 am »

/usr/lib/jriver/MC28/mc28 /MCC 10053,-1 does not switch to the next audio but does nothing at all. This is the documented syntax.
/usr/lib/jriver/MC28/mc28 /MCC 10053,1 gives the first audio track.
/usr/lib/jriver/MC28/mc28 /MCC 10053,2 the second.
The spaces?  Or case?
Logged

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #10 on: October 22, 2021, 09:28:03 am »

I tried every possible combination. Here is what I make of it:

/usr/lib/jriver/MC28/mc28 /MCC 10053,1 gives the first audio track.

A 2 instead of a 1 gives the second track. While this is not the expected behaviour, it still shows a logic. I would expect for the subtitles to behave exactly the same. The only difference in the subtitle command is the command number. 10052 istead of 10053. Using 10052,1 simply does nothing.


Who in your team would be the right guy to point  to this?
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #11 on: October 23, 2021, 07:02:51 am »

Is there anyone, who would be in charge of this section? I'm stuck with getting JRiver up and running, because I do not intend to use it with a keyboard.
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: MediaCenter28 Debian Command Line Input
« Reply #12 on: October 23, 2021, 07:26:28 am »

bob answered you above.  He was off for a few days and is in catch up mode, but there are a lot of linux experts on this board.  You're doing a custom project though.

Have you tried the OSD (On Screen Display)?
https://wiki.jriver.com/index.php/OSD
You can select the language from Theater View, using just the 4 arrow keys and the OK button on a remote.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10931
Re: MediaCenter28 Debian Command Line Input
« Reply #13 on: October 23, 2021, 07:27:01 am »

It appears these are not implemented fully on Linux. Its on the list to fix them, but probably won't get around to it right away.
Logged
~ nevcairiel
~ Author of LAV Filters

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #14 on: October 23, 2021, 08:34:35 am »

bob answered you above.  He was off for a few days and is in catch up mode, but there are a lot of linux experts on this board.  You're doing a custom project though.

Have you tried the OSD (On Screen Display)?
https://wiki.jriver.com/index.php/OSD
You can select the language from Theater View, using just the 4 arrow keys and the OK button on a remote.

I really don't know much about those commands but the general ones should work the same as windows or Mac.
Only the linux specific ones (like the audio devices, etc) should be different.

Yes, Bob answered, but said that he does not really know. So I asked who would.

Hm, custom project.. I'm actually just trying to put together a decent remote control for me, using documented functions. Perfectly within the scope of an advanced installation for linux, I'd say. ;)

Yes, I checked the OSD function, but strangely subtitles did not show up. I got the audio part, though. I could select the subtitles with the mouse but that is really not the way I will end up using it when watching a movie.

It appears these are not implemented fully on Linux. Its on the list to fix them, but probably won't get around to it right away.

OK, at least now I know that it is no use to try any further at the moment. Can you give any hints as to how long that might take? Sorry to bother, but without a decent remote I will be a bit stuck.
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: MediaCenter28 Debian Command Line Input
« Reply #15 on: October 23, 2021, 09:00:49 am »

Try the OSD again. 

Up and Down cycle through the list.

Left and Right to select.

OK to confirm.

Any device that has these keys can be used. 
Logged

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #16 on: October 23, 2021, 11:04:10 am »

I will try again with a different movie.
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #17 on: October 23, 2021, 12:37:15 pm »

OK, I did, using a keyboard for up,down,left,right and a movie with four subtitles, which I can see and select with the right mouse button just fine.

Pressing "down" (repeatedly) I get:
- "Playing now" (only the headline with no information what is actuelly playing now)
- The timeline
- Volume
- Rating (only the headline, no info)
- Chapter (where I can use left/right to skip around inbetween chapters)
- Language (where I can select an audio track by using left/right keys)

After that comes "Playing now" again.

This is the behaviour I watched on my test-machine running Debian 11, no Wayland. Right now I tested on my Arch Linux notebook.

Might there be something off with the subtitles control in general? Asking, because the behaviour using the menu is exactly the same as when using the CMD interface. The subtitles themself are diaplyed fine btw, if I enable them with the mouse. I also checked, if they might show up in the menu after beein activated, but they dont't.
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: MediaCenter28 Debian Command Line Input
« Reply #18 on: October 23, 2021, 01:07:50 pm »

I think that is a recent bug introduced by JRVR. I have similar OSD rendering problems on Windows.

From my past memory, the MCWS always seems to do what the Linux stub cannot, which is why I recommend using it. If you are running headless why wouldn't you want to enable the Media Network? You don't even need to open any ports, the MCWS is handled locally.
Logged

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #19 on: October 23, 2021, 02:17:13 pm »

Thx for the info! Just quickly checked the documentation and even though the command list is quite comprehensive, when it comes to subtitles I end up with the same problem as with the other command interface: No looping through the available ones. The interface expects me to enter a specific ID. So let's say I have 4 or more subtitles, I would have to have a key for each subtitle index on my remote. Also I don't see any option to enable/disable the selected subtitle, which is essential to me, since I watch everything in it's original language. When it comes to english, I understand 95 % of what is being said, but need to be able to quickly re-check a scene with subs enabled, sometimes.

So the option I see are:
SelectStream
         Select an audio/subtitle stream for playback (dynamic change only supported on HLSVOD streaming)
         Parameters:
            StreamToken: Unique token to identify the streaming session. (default: )
            StreamID: ID of the stream, as listed in StreamInfo (default: )

Also when looking further trough the list, I find "play", "pause", "stop" but no "skip 10 secs forward" or the like.

So now I see several interfaces, but not one which would actually fullfil the basics I need. The one seems to be broken and the other one does not really have the right functions. I am not looking for anything fancy. I just need the basic playback function to begin with along with audio and subtitle selection.

The actual comand line interace has the right options in the description, so personally, I would prefer to have that one working. Would give me actually all I'd need.

I am really trying to give this mediacenter a shot here, for several reasons, but I really have trouble getting it off the ground.

Once I get past the control-issues, there will remain a question of 3D-LUT for me (which I could do without for a while, as long as I knew it was coming) and from that point on out I could switch from Kodi/MadVR to MC28 and just wait and enjoy the updates.
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #20 on: October 27, 2021, 11:13:02 am »

Still stuck on this one. Anyone in the JRiver Team who could help me sort this out? Because, as it is, I have no option to make it work.
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10931
Re: MediaCenter28 Debian Command Line Input
« Reply #21 on: October 27, 2021, 11:27:50 am »

As mentioned above already, we'll work on the missing commands, but there is no ETA.
Logged
~ nevcairiel
~ Author of LAV Filters

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #22 on: October 27, 2021, 12:09:51 pm »

True, I kinda forgot about that. Sorry, just eager to get the thing away from the desk and onto the shelf next to the projector. :)

Any chance to fix the OSD subtitles selection thing in the meantime? Might just be a small issue, since the subtitles are actually implemented in there already, afaik. Maybe I even got it wrong? I'd expect the subtitles to show up as an option when during a film using the up and down keys to scroll through: Timeline, Volume, Shift (new and supercool!), Chapters and Language.

Is that the place?
Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p

((( atom )))

  • Recent member
  • *
  • Posts: 40
Re: MediaCenter28 Debian Command Line Input
« Reply #23 on: October 30, 2021, 05:41:29 pm »

@Hendrik
While we're at it: Since from what I understand you will work on the path that reaches right into the guts of mediacenter. Would it be ok for me to ask for some small usefull functions to implement? Nothing fancy, just what I already mentioned: Having the ability to scroll throgh the existing audio and subtitle tracks would be greatly improved by a toggle to turn the subtitles on/off?

Logged
Debian 11 Bullseye - Nvidia 1050 Ti with 4GB RAM - X11@4K24p
Pages: [1]   Go Up