MCE Remote with VLC (update 18 February 2010)

January 26th, 2010 by Arend Leave a reply »
philips-mce-remote

philips-mce-remote

Background:

At home I use Windows Media Center available on Windows 7. It’s a great program but it doesn’t play all the video codecs and file types that I have in my library. Even advanced codec packs like sharks “Windows 7 codecs” do not always solve this problem. To the rescue comes VLC . A media player that can handle almost any media file you throw at it. When using VLC however, I’m no longer able to use my Media Center Remote Control.

Say hello to mceRemote2vlc:

I decided to try and build an application to handle this, without incorporating this functionality into VLC, but using VLC’s excellent RC interface. In short it allows you to control a running VLC instance by communicating with VLC’s built-in TCP-server.
If you want to give it a try be sure to:

  • Go to Tools-Preferences.
    Select Show All settings (bottom left corner)
    Click on Interface->Main interfaces
    Check “Remote control interface”
    Click on Interface->Main interfaces->RC
    Enter in the field “TCP command input”: 127.0.0.1:8765
    Check “Do not open a DOS command box interface”
  • Install the .NET Framework 3.5 (if not already available)
  • Windows XP, Windows Vista, Windows 7
  • A Windows MCE Remote , the following eHome compatible remote devices should be supported:
    • Microsoft/Philips 2005
    • Microsoft/Philips 2004
    • HP
    • FIC Spectra/Mycom Mediacenter
    • Toshiba/Hauppauge SMK MCE remote
    • Hauppauge OEM MCE remote
    • Mitsumi MCE remote
    • Fujitsu Scaleo-E
    • Pinnacle PCTV Remote
    • Shuttle MCE Remote
    • Centarea Master Remote II

Supported buttons and default mappings:

button vlc_command Description
None none
Power1 none
Left menu left navigate menu
Right menu right navigate menu
Pause pause pause
Power2 quit exit vlc
PowerTV none
Stop stop stop playback
Record record ?
Rewind key key-jump-short go 10 seconds back
Play play play
Forward key key-jump+short skip 10 seconds
Replay previous previous playlist item
Skip next next playlist item
Back previous previous playlist item
Up menu up navigate menu
Info key key-intf-show toggle display interface in fullscreen mode
Ok menu select menu select
VolumeUp key key-vol-up volume up
VolumeDown key key-vol-down volume down
Start none
ChannelUp chapter_n next chapter
ChannelDown chapter_p previous chapter
Mute key key-vol-mute mute sound
RecordedTV f toggle fullscreen
Guide none
LiveTV none
DVDMenu key key-disc-menu show dvd disc menu
NumPad1 none
NumPad2 none
NumPad3 none
NumPad4 none
NumPad5 none
NumPad6 none
NumPad7 none
NumPad8 none
NumPad9 none
NumPad0 none
Oem8 none
OemGate none
Clear none
Enter none
Teletext key key-aspect-ratio toggle aspect ratio
Red key key-aspect-ratio toggle aspect ratio
Green key key-deinterlace deinterlace
Yellow key key-subtitle-track toggle through all subtitles
Blue key key-audio-track toggle through all audio tracks
AspectRatio key key-aspect-ratio toggle aspect ratio
Print none
Down menu down navigate menu

Download:

http://www.arenddeboer.com/wordpress/wp-content/uploads/2010/01/Setupv1.0.10.zip

A big “thank you” goes to the team of MediaPortal as most of the functionality is coming right out of this project

navigate menu
Advertisement

59 comments

  1. yan says:

    You don’t seem to know EventGhost – give it a try, you will love it.

  2. admin says:

    Thanks.
    I did however have a look at EventGhost. According the their website they don’t support Windows 7 x64, and judging related forum posts this seems to be true.
    Update: It does work on Win7 X64.

  3. cerebrolele says:

    Will try this evening, ty for sharing!

  4. cerebrolele says:

    I’ve a ACER mce integrated MCE receiver (CIR) in my laptop with ACER remote control.
    Do you think it will work?

    Also, it will work when right click on media file (*.avi) and use the “play with VLC” option?

  5. admin says:

    I’m afraid your remote might not be supported.
    The program only detects receivers in the list provided, it specifically checks for the deviceid located in the file C:\Program Files (x86)\mceRemote2vlc\eHome Infrared Transceiver List XP.xml.

    You can see this number with USBDview: http://www.nirsoft.net/utils/usb_devices_view.html
    A nice standalone exe to list all usb devices with lot’s of details.

    There is a small chance that adding your device is enough to get going. If so please provide me with this new line so I can add it to the list.

    For your other question, right clicking will work if you set this option in VLC’s configuration:
    Go to Tools-Preferences.
    Select Show All settings (bottom left corner)
    Click on Interface->Main interfaces
    Check “Remote control interface”
    Click on Interface->Main interfaces->RC
    Enter int the field “TCP command input”: 127.0.0.1:8765
    Check “Do not open a DOS command box interface”
    Save and your good to go.

  6. cerebrolele says:

    also if my ir recever is built-in in the laptop? in my case it isn’t an usb device.

  7. admin says:

    Hmm, in that case it wont work.
    I will have a look into this, since I have an acer laptop myself with an IR receiver, but don’t hold your breath..

  8. cerebrolele says:

    ok, ty as well! at the moment i solved with 3rd party mentioned, i will follow your upgrade!

  9. dm says:

    hi,
    I’m trying with Videomate k300.VLC running.
    When press any button on remote, button pressed screen is filling(mute, volumeup,volumedown…) but don’t control VLC.

    Device status=connected
    VLC connection status=offline on mceRemote2vlc.

    Any idea?

  10. kiwi skid kid says:

    Hi,
    thanks for putting in the effort to get this working, I have installed as per instructions and it is working but only for the first command, after that it sees the command in your app but does not make it to vlc? set up is windows 7 32bit. Appreciate any ideas.

  11. guest says:

    I own an ACER Laptop with build in IR receiver and the matching ACER Remote, but it is although supported. But the program just execute the 1st command (which works fine) and after that new commands weren’t send to vlc any more… (the program doesn’t even show them in “Commands to VLC:”

  12. Urmel says:

    Hi, i have a question about your programm.
    I get the Decive status to “connected” and the VLC connecting status to connected, too.

    All Pressed Buttons of My Haupauge MCE Remote are recognized but the only button which was send to VLC ist the play button. And it will only be sent once at the beginning.

    Do you have an idea whats wrong, or what i can do to get it to work properly.

    Thanks
    MFG Urmel

  13. Billkwando says:

    Alas, it doesn’t appear to work in XP. That is, assuming that the spaces are supposed to be there before the double hyphens. I entered it under Conrol Interfaces > Main Intyerfaces > RC, which is what I assume you intended for us to do. I also checked the box for it not to show the DOS box.

    If there’s anything I can do, testing-wise, please send me an email. :)

  14. admin says:

    Sorry for the late reply, I was not being notified about the new comments.

    In an effort to optimize the program, I made a rather stupid mistake where it would only connect once, and never send the new commands to the running VLC instance……
    I updated the installer, please uninstall the old version first.

  15. admin says:

    Billkwando: Did you enter 127.0.0.1:8765 in the configuration menu ?

    You also can check if VLC is running with the RC interface by using putty, enter IP=127.0.0.1 and port number 8765, select RAW as the connection type, then click Open. If a file is currently playing in VLC, typing “pause” without the quotes should pause the current track.

    putty:http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

  16. Billkwando says:

    Here’s a short video I made showing the steps I’m doing in case I’m doing it wrong.

    http://www.youtube.com/watch?v=FkfttO9NRiI

    Everything seems to be working fine but it’s not connecting to VLC.

  17. admin says:

    please first select/click the entry “Main interfaces” now select the checkbox “Remote control interface”
    Then expand the entry “Main interfaces” and click the RC entry. Then paste the following in the input field: 127.0.0.1:8765
    You must restart VLC for this setting to take effect. Also, please install the latest and greatest version I uploaded today!

    I can’t see in the video if you selected the checkbox “Remote control interface”, but the “TCP command input” field should not state “vlc –rc-host=127.0.0.1:8765 –rc-quiet” as this is used to start VLC from the command prompt, just use “127.0.0.1:8765″ without the quotes.

  18. Billkwando says:

    in Putty I get “connection closed by remote host” then when I Ok out of it, I get an error:

    “Network Error: Connection Refused”

  19. admin says:

    Hmss, the VLC clearly is not activating the RC interface. Did you change the entry from “vlc –rc-host=127.0.0.1:8765 –rc-quiet” to “127.0.0.1:8765″ ?
    Are you sure you checked the “Remote control interface” check box? For debug purposes, leave the “Do not open DOS command box interface” check box unchecked.
    If you don’t see this dos box, something is wrong.

  20. Billkwando says:

    Ignore the prev reply. I didn’t see your message cos I hadn’t refreshed the page. :)

    The big dos window popped up and I could play/pause/stop, but then I tried to check the box so the window wouldn’t pop up, and it stopped responding after that. I closed and reopened and rehecked the box, and closed and reopened again and still no dice.

    • admin says:

      What version of VLC are you running ? I’m using VLC 1.0.5. Don’t know if it has anything to do with it.

      • Billkwando says:

        1.0.5 “Goldeneye”, it says. The commands still pop up in your dos window, it just doesn’t do anything in teh VLC.

        Thanks for all the super-quick responses!

      • JRoh says:

        I followed your steps exactly, but still not registering.

        I am running an HP with Win7 32-bit and VLC ver. 1.0.1 Goldeneye

        All > Interface > Main Interfaces > (checked Remote control interface) > RC > (checked Do not open a DOS command box interface > (typed in TCP command input: 127.0.0.1:8765)
        Saved.
        Restarted VLC.

        Still nothing. I gather I need to get version 1.0.5 Goldeneye?

  21. Billkwando says:

    The newest version works great! Thanks!!!!

  22. Sir Shagsalot says:

    Hi,

    First the good news, all works as expected.

    Now the bad news. The buttons from the remote you have are nowhere near enough.

    As I play many real DVD’s I’d like the normal menu and Audio/Subtitle controls etc accessible.

    I think the best way would be a simple interface that has as dropdown list all VLC remote commands available and a simple “learn button” aehhhhm, button, so in your interface I could simply select (for arguments sake) “Cycle Subtitle Track” and then press the MCE Remote button I want this to map to (eg Blue in my case).

    I also don’t mind having drop down liasts for button and action, but rather than have you try to implement each whim of each user, just give them the tools? Possible?

    • admin says:

      Thank you, and I think you are right. It would make a lot more sense to create your own mapping. I hope to implement this in the next version.

  23. Sir Shagsalot says:

    Hi,

    I played a bit more with your program. It already recognises all MCE Buttons correctly (by name), so that side is already covered.

    Adding the complete MCE Mapping should be no big deal.

    If you provide a config file (.ini or .xml) to store the settings I’ll produce and then email you my complete mappings for using the MCE remote with VLC including subtitle/audiotrack switching and all DVD Menu functions etc.

    This stuff is especially of interest to all the Anime Fan faction, as many of the MKV files retain otriginal DVD navigation as well as mutiple sound/subtitle tracks.

    For me it’s important as our household is multilingual, so we different subtitles etc on different DVD’s…

    Greez SSAL

  24. Leon says:

    Hi there. The program works great except for one thing. When I press the Fwd (Fast Forward) button, instead of jumping forward, it just reduces the play speed by half. Am I doing something wrong or is it just a bug? Just letting you know that’s the only issue I’m having. Other than that, great work on the program!

  25. admin says:

    I have included a learn option, using a sqlite backend. I know this is less accessible but it will suffice for now. I will post this update somewhere during the day.
    I must first walk my dog ;-)

  26. admin says:

    Update deployed, please use the following remote commands as a guide for your mapping:

    help
    +—-[ Remote control commands ]
    |
    | add XYZ . . . . . . . . . . . . add XYZ to playlist
    | enqueue XYZ . . . . . . . . . queue XYZ to playlist
    | playlist . . . . . show items currently in playlist
    | play . . . . . . . . . . . . . . . . . . play stream
    | stop . . . . . . . . . . . . . . . . . . stop stream
    | next . . . . . . . . . . . . . . next playlist item
    | prev . . . . . . . . . . . . previous playlist item
    | goto . . . . . . . . . . . . . . goto item at index
    | repeat [on|off] . . . . toggle playlist item repeat
    | loop [on|off] . . . . . . . . . toggle playlist loop
    | random [on|off] . . . . . . . toggle random jumping
    | clear . . . . . . . . . . . . . . clear the playlist
    | status . . . . . . . . . . . current playlist status
    | title [X] . . . . . . set/get title in current item
    | title_n . . . . . . . . next title in current item
    | title_p . . . . . . previous title in current item
    | chapter [X] . . . . set/get chapter in current item
    | chapter_n . . . . . . next chapter in current item
    | chapter_p . . . . previous chapter in current item
    |
    | seek X . . . seek in seconds, for instance `seek 12′
    | pause . . . . . . . . . . . . . . . . toggle pause
    | fastforward . . . . . . . . . set to maximum rate
    | rewind . . . . . . . . . . . . set to minimum rate
    | faster . . . . . . . . . . faster playing of stream
    | slower . . . . . . . . . . slower playing of stream
    | normal . . . . . . . . . . normal playing of stream
    | f [on|off] . . . . . . . . . . . . toggle fullscreen
    | info . . . . . information about the current stream
    | stats . . . . . . . . show statistical information
    | get_time . . seconds elapsed since stream’s beginning
    | is_playing . . . . 1 if a stream plays, 0 otherwise
    | get_title . . . . . the title of the current stream
    | get_length . . . . the length of the current stream
    |
    | volume [X] . . . . . . . . . . set/get audio volume
    | volup [X] . . . . . . . raise audio volume X steps
    | voldown [X] . . . . . . lower audio volume X steps
    | adev [X] . . . . . . . . . . . set/get audio device
    | achan [X]. . . . . . . . . . set/get audio channels
    | atrack [X] . . . . . . . . . . . set/get audio track
    | vtrack [X] . . . . . . . . . . . set/get video track
    | vratio [X] . . . . . . . set/get video aspect ratio
    | vcrop [X] . . . . . . . . . . . set/get video crop
    | vzoom [X] . . . . . . . . . . . set/get video zoom
    | snapshot . . . . . . . . . . . . take video snapshot
    | strack [X] . . . . . . . . . set/get subtitles track
    | key [hotkey name] . . . . . . simulate hotkey press
    | menu . . [on|off|up|down|left|right|select] use menu
    |
    | help . . . . . . . . . . . . . . . this help message
    | longhelp . . . . . . . . . . . a longer help message
    | logout . . . . . . . exit (if in socket connection)
    | quit . . . . . . . . . . . . . . . . . . . quit vlc

  27. Sir Shagsalot says:

    Hi,

    Just trying download, I’m getting “not found” (404) on the new file.

    Greez SSAL

  28. Sir Shagsalot says:

    Sorry,

    Somehow I am still getting 404.

    Could you possibly e-mail the file to me?

    Greez SSAL

  29. Sir Shagsalot says:

    Hi,

    ThatX for the file, and yes, I did refresh the page, but perhaps there is a cache at the ISP or within the great firewall of china that did not update.

    Anyway, I installed it and set it up to a basic level.

    I still have work to do with some mappings, but I have now got aspect ratio and subtitle as well as audio track switching done. Works splendidly.

    For those use:

    key [command] syntax

    The Key Commands can be found here:

    http://forum.videolan.org/viewtopic.php?f=14&t=53013&p=237594

    So, the syntax for changing the aspect ratio (for example) would be:

    key key-aspect-ratio

    Once I am finished (probably past the WE) I’ll send you the file with my mappings to include in the setup (I assume it is mceRemote2VLC.s3db), the aim is to sensibly map any MCE Remote key that could be of use in a “DVD-Player”. Then Users can change the default mappings to their hearts content.

    Greez SSAL

  30. Billkwando says:

    I tried the new version with the Settings tab this morning before work. I didn’t try any mappings yet, but it seemed to be working great with the default. :)

  31. Arend says:

    The “Down” button is missing in the sqlite database. I will update this in the installer when Sir Shagsalot has completed the DVD-style mappings. For now please use the link next to the installer download.
    Just replace mceRemote2VLC.s3db with the currently installed version in c:\Program Files\mceRemote2VLC\

  32. Billkwando says:

    Leave it to me to get it wrong. I don’t fully understand the list of commands. I (of course) tried to program the subtitle button first. I tried just “strack” (I don’t understand what the [X] means) and I tried “strack English” assuming the [X] was a variable. Both resulted in the VLC preferences box opening and covering the screen. If it was in fullscreen, nothing happened.

    Yer instruckshuns need moar werdz. :p

  33. Arend says:

    Use “key key-subtitle-track” as the command for your subtitle button.
    This will toggle the available subtitle tracks.

    Sir Shagsalot posted a link to all the available hotkey options.
    Using putty, as I mentioned somewhere in the comments might ease your testing as it will show the reply from VLC. For example your strack command results in:

    strack
    +—-[ Subtitles Track ]
    | -1 – Disable *
    | 3 – Track 1 – [Français]
    | 4 – Track 2 – [Nederlands]
    | 5 – Track 3 – [English]
    +—-[ end of Subtitles Track ]
    strack: returned 0 (no error)

    Of course this means we have to issue something like “strack 5″, this tells us “key-subtitle-track” is an easier solution.

  34. Billkwando says:

    So I’d have to have a command for each potential subtitle track, rather than being able to just toggle throiugh them like on a DVD player? Like, 4 or 5 buttons set up for subs (assuming that my videos don’t all have the same number of sub tracks, the english track might not always be 5, for example).

  35. Arend says:

    no no, just enter “key key-subtitle-track” as the subtitle toggle command, that’s all.

  36. Sir Shagsalot says:

    Guys,

    To keep it simple.

    For the hackers in the crowd, I am sure you are having fun, let me in on any neat stuff you discover.

    For the rest, who, just want to download a package, install it and be set and good to go. Hold your pretty horses a day or two, between arend and me we will see you right in a week or so. I’m just really busy till the weekend, so I cannot finish the job as well as I wish.

    for super eager beavers I’m posting my “as is” mapping file to Arend.

    Greez SSAL

  37. Arend says:

    Post updated, thanks to Sir S.
    The main app now scrolls the “button pressed” and “commands to VLC” fields to the last item.

  38. Billkwando says:

    Hey thanks for the help with “key key-subtitle-track”. You might wanna add the “ck” to your table. Being an idiot in training, I actually tried “key key-subtitle-tra” to see if it would work. Of course it didn’t! :p

    I have subs working fine now, but it still pops up the VLC pref box whenever I hit the button……but not when it’s in fullscreen, so I guess that’s all that matters.

    I wanted to point out that my main remote, an HP, doesn’t have the yellow, blue, green, & red buttons, just FYI. I have the HP remote, 2 regular Xbox 360 remotes, and 2 Logitech Harmony remotes (one XBox 360 and one regular), so I guess 4 out of 5 with the colored buttons aint bad. Do all MCE remotes come with those now?

    • Arend says:

      Thanks, post updated.

      Not sure about other remotes, I have the one in the picture.

      BTW, I don’t get any pref box on the “key key-subtitle-track” command. Maybe this is a preference setting somewhere in VLC.

  39. Billkwando says:

    Oh yeah, and I used the “Print” button for subtitles. It seemed fitting. :P

    Just thought you might find that amusing.

  40. Arend says:

    hehe, only in HP though, I don’t have that button.

  41. Billkwando says:

    Your download link doesn’t appear to be working. I had to download from the directory.

  42. Sir Shagsalot says:

    Okay Folks,

    Just to let you know my setup.

    First, we use Media Portal, but I need DXVA (Video Acceleration) and Subtitles and this does not work well, regardless which Codec Pack I try.

    Either VLC or MPC-HC do play with Subtitles and DXVA. I always felt VLC had the edgo on picture quality (especially on my 80″ Projector), but remote control was much harder than MPC-HC for which Intelliremote had a usable profile and Eventghost was too hard work… ;-) .

    So Arend’s initiative came just right.

    My setup now uses VLC as external Player in MediaPortal. I have set VLC’s main interface (use settings – all – interface – main interface) set to “remote control interface”. I also set in Playlist the “Play & Exit” parameter, so VLC plays the file and then returns to Media Portal.

    In the Video Section it is worth disabling “Show Media Title on Video”, which omits the display of the file-name.

    All this means there are in normal operation never any VLC Windows or Menus, the integration with Media Portal is practically seamless.

    I have some mappings that differ slightly from the above posted. The main one is that stop and back are mapped as “quit”. This way I get straight back to Media Portal.

    As Media Portal has issues with playing DVD’s via external players I have also mapped an unused button (TV Guide in my case) as “load DVD” using the following command:

    add dvd://D:\

    Anyway, I just thought someone might be interrested.

    Greez SSAL

  43. Sir Shagsalot says:

    PS,

    My Remote is the quite snazzy one that ships with the OrigenAE Cases (OEM by Philips I believe) and the Media PC is in an OrigenAE S16T case, with a fanless Via motherboard and Pico PSU (so completely fanless), hence the need for DXVA (the CPU is too weedy to decode video streams without hardware help).

    Greez SSAL

    • Arend says:

      Nice htpc you have there.
      I might wrap this post up, clean it a bit and post your specific MediaPortal mappings for anyone interested. It would be nice to receive your file once the dust settles.

  44. Billkwando says:

    Is there a way to get the time elapsed/time remaining to show on screen with a button push, the same way it does when you rewind (but without rewinding)?

    On my TV, the real VLC box you get when you hit “info” with the current mapping is too small to really read.

  45. Arend says:

    Sure, use: “key key-position” as the command.

  46. nir says:

    just add this to the vlc shortcut –extraintf rc –rc-host localhost:8765 –rc-quiet

Leave a Reply