INTERACT FORUM
More => Old Versions => JRiver Media Center 20 for Linux => Topic started by: Hilton on April 18, 2015, 06:27:15 am
-
Is there any support for /MCC or commandline to control MC playback volume etc from scripts?
I'm remapping some Bluetooth remote keys with Xbindkeys to make MC on Pi controllable via BT remote.
-
It should be working. It's documented here:
http://wiki.jriver.com/index.php/Web_Service_Interface
-
Thanks Jim but Im trying to remap keys on the Linux desktop to send MC20 /mcc commands in Linux and there doesn't appear to be a MC20.exe like there is in windows. Unfortunately MCWS doesn't help me.
-
This is what I'm trying to do to get a Bluetooth remote to control MC20 on Linux because the default media keys aren't being picked up.
XF86Audio is an industry default for media playback keys across platforms from my understanding.
I can scan and get the keypress showing up I just want to remap it to native MC20 commands.
I've included one example of what it might look like if it was available. I tried using MCWS web commands but they don't work unfortunately. I need to use commandline driven commands which is what MC20.exe exists for in windows with the /mcc switch.
If there's another way to do this I'd love to know!
(https://public.dm2301.livefilestore.com/y2pes1uvTL0HvHg--SQTtH3bJY4YZDqEuZhaMI_NcVxKF8UdjGl2nF02Ui_s_AMlEbwIY8stK8mo1xrFZGq_wzt-eagqSeIEMgsNa1_VmMDVpQ/linux-mapkeys.JPG)
-
I don't know the answer, but search for the other MC binary executables. It is possible one is in a directory like /bin or /usr/bin. Bob will know, but he's probably sleeping.
-
Thanks Jim
mediacenter20 is under /usr/bin but there's no sign of a mc20 executable.
My guess is it's a little more complicated on Linux or the guys just haven't gotten around to it.
Cant use the mediacenter20 as it segfaults and isn't designed to send commands to another instance already running.
I'll leave it with the guys I don't think there's much I can do. Maybe they could just enable media controls in Linux so I don't have to do this workaround? :)
-
I ran xev on the Pi2 to capture the key events from standard media keys on a keyboard directly attached to the Pi2.
I dont know if it helps the guys to implement media keys in Linux but here you go anyway.
http://www.x.org/archive/current/doc/man/man1/xev.1.xhtml
Play
KeyPress event, serial 43, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4843365, (-795,-90), root:(816,189),
state 0x0, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4843589, (-795,-90), root:(816,189),
state 0x0, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Next
KeyPress event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4855366, (-795,-90), root:(816,189),
state 0x0, keycode 171 (keysym 0x1008ff17, XF86AudioNext), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4855526, (-795,-90), root:(816,189),
state 0x0, keycode 171 (keysym 0x1008ff17, XF86AudioNext), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Prev
KeyPress event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4857223, (-795,-90), root:(816,189),
state 0x0, keycode 173 (keysym 0x1008ff16, XF86AudioPrev), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4857463, (-795,-90), root:(816,189),
state 0x0, keycode 173 (keysym 0x1008ff16, XF86AudioPrev), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Stop
KeyPress event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4861703, (-795,-90), root:(816,189),
state 0x0, keycode 174 (keysym 0x1008ff15, XF86AudioStop), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4861911, (-795,-90), root:(816,189),
state 0x0, keycode 174 (keysym 0x1008ff15, XF86AudioStop), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Vol+
FocusOut event, serial 46, synthetic NO, window 0x2a00001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 46, synthetic NO, window 0x2a00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 46, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Vol-
FocusOut event, serial 46, synthetic NO, window 0x2a00001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 46, synthetic NO, window 0x2a00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 46, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mute
KeyPress event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4870040, (-795,-90), root:(816,189),
state 0x0, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 46, synthetic NO, window 0x2a00001,
root 0x101, subw 0x0, time 4870184, (-795,-90), root:(816,189),
state 0x0, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
-
There isn't a stub executable to send MCC commands for linux.
The media keys could be implemented.
-
Looks like volume up and down don't have keysyms?
-
Yeah I thought the vol keys were strange, the BT remote gave proper XF86AudioVol keysyms though so maybe it's just that keyboard vol is a bit different.
-
I'm just about to upload a build with these enabled.
On my xfce desktop, the volume keys are getting intercepted by the window manager.
On the pi2 lxde they pass through to MC.
All of the other keys (play/pause, stop, next, previous) work as expected.
-
You Da MAN! :)