Mailing List Archive

MythTV + MPlayer + Xine + Remote - A Solution
Ok i'm starting this thread to kick things off, and then i'll try and post
or provide links to the various files/scripts required to set this up if
people are interested.

A common complaint is how to use lirc with MythTV such that MPlayer and
Xine work correctly with the remote. Now for myPVR I've invested quite a
lot of time to get all of these working so that customers get the
behaviour that they would expect from an "appliance".

First a quick warning. This is designed for MCE2 USB remotes, like the
newer Hauppauge remotes. It provides support for the extra hotkeys etc.
I'm sure it can be easily modified to work with other remote controls.

There are four components that make this up.

1. Keymap modification for MythTV to support the new hotkeys

I've pushed this to Issac as a potential MythTV standard, but it hasn't
generated enough interest to be included at the moment. I can provide a
SQL script to load this or take a look at
http://openmedia.co.nz/openmedia/content/view/27/59/ for an idea of what
i've done.

2. Custom MPlayer input.conf

To remap a couple of keys to align with MythTV

3. Custom Xine keymap

Changes a couple of keys to require Meta or Control to prevent conflicts
with lirc commands. Only an issue if you are a big keyboard user of Xine.

4. lircrc file

Contains a base setup using irxevent to control MythTV or MPlayer, plus an
additional section specific to Xine to map some additional keys etc.


Now I know I could have re-mapped all of Xine's keymap to be closer to
MPlayer and MythTV, but I tried to minimise my changes.

So what does this buy you? Well for a start DVD Menu navigation with Xine,
and sensible mappings to keys like DVD Menu and Info etc. Skip/Repeat will
chapter jump through a DVD, or track jump through an Audio CD.

Right so thats what I have got to offer. Any takers? Only requests is to
help make this even better. Think i'm pretty close to getting it right,
but some of you might have other ideas :)

Steve
--------------------------------------------
OpenMedia Limited
sales - sales@openmedia.co.nz
support - support@openmedia.co.nz
website - http://www.openmedia.co.nz

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: MythTV + MPlayer + Xine + Remote - A Solution [ In reply to ]
Steve, those general mappings make sense... I had my Hauppauge remote
mapped in a similar fashion but then I did a KnoppMyth re-install and
blew my old settings away. However, I never sorted out the Xine mappings
for DVD operation. I'm definitely interested in getting a decent remote
config working!

One thing I noticed with the remote is when I watch a DVD then go back
to the Program Schedule, the remote keys don't seem to work properly any
more. For example, I can't navigate with the arrow keys through the
schedule. Did you encounter this sort of behaviour but I can back out
with the Exit button?

Robert

Open Media Support wrote:
> Ok i'm starting this thread to kick things off, and then i'll try and post
> or provide links to the various files/scripts required to set this up if
> people are interested.
>
> A common complaint is how to use lirc with MythTV such that MPlayer and
> Xine work correctly with the remote. Now for myPVR I've invested quite a
> lot of time to get all of these working so that customers get the
> behaviour that they would expect from an "appliance".
>
> First a quick warning. This is designed for MCE2 USB remotes, like the
> newer Hauppauge remotes. It provides support for the extra hotkeys etc.
> I'm sure it can be easily modified to work with other remote controls.
>
> There are four components that make this up.
>
> 1. Keymap modification for MythTV to support the new hotkeys
>
> I've pushed this to Issac as a potential MythTV standard, but it hasn't
> generated enough interest to be included at the moment. I can provide a
> SQL script to load this or take a look at
> http://openmedia.co.nz/openmedia/content/view/27/59/ for an idea of what
> i've done.
>
> 2. Custom MPlayer input.conf
>
> To remap a couple of keys to align with MythTV
>
> 3. Custom Xine keymap
>
> Changes a couple of keys to require Meta or Control to prevent conflicts
> with lirc commands. Only an issue if you are a big keyboard user of Xine.
>
> 4. lircrc file
>
> Contains a base setup using irxevent to control MythTV or MPlayer, plus an
> additional section specific to Xine to map some additional keys etc.
>
>
> Now I know I could have re-mapped all of Xine's keymap to be closer to
> MPlayer and MythTV, but I tried to minimise my changes.
>
> So what does this buy you? Well for a start DVD Menu navigation with Xine,
> and sensible mappings to keys like DVD Menu and Info etc. Skip/Repeat will
> chapter jump through a DVD, or track jump through an Audio CD.
>
> Right so thats what I have got to offer. Any takers? Only requests is to
> help make this even better. Think i'm pretty close to getting it right,
> but some of you might have other ideas :)
>
> Steve
> --------------------------------------------
> OpenMedia Limited
> sales - sales@openmedia.co.nz
> support - support@openmedia.co.nz
> website - http://www.openmedia.co.nz
>
> _______________________________________________
> mythtvnz mailing list
> mythtvnz@lists.linuxnut.co.nz
> http://lists.ourshack.com/mailman/listinfo/mythtvnz
> Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
>
>


--
"While I thought that I was learning to live,
I have been learning how to die."

Leonardo DaVinci


_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: MythTV + MPlayer + Xine + Remote - A Solution [ In reply to ]
phlux0r wrote:
> Steve, those general mappings make sense... I had my Hauppauge remote
> mapped in a similar fashion but then I did a KnoppMyth re-install and
> blew my old settings away. However, I never sorted out the Xine mappings
> for DVD operation. I'm definitely interested in getting a decent remote
> config working!
>
Sure. I'll see what I can do.
> One thing I noticed with the remote is when I watch a DVD then go back
> to the Program Schedule, the remote keys don't seem to work properly any
> more. For example, I can't navigate with the arrow keys through the
> schedule. Did you encounter this sort of behaviour but I can back out
> with the Exit button?
>
You need to update the version of Xine that comes with KnoppMyth. 0.99.3
has issues that are fixed in 0.99.4. Or there is the xterm hack that
sometimes works.

--
Steven Ellis - Technical Director
OpenMedia Limited
email - steven@openmedia.co.nz
sales - sales@openmedia.co.nz
support - support@openmedia.co.nz
website - http://www.openmedia.co.nz


_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: MythTV + MPlayer + Xine + Remote - A Solution [ In reply to ]
On Mon, 14 Aug 2006 18:34:34 +1200 (NZST)
Open Media Support wrote:

> Ok i'm starting this thread to kick things off, and then i'll try and post
> or provide links to the various files/scripts required to set this up if
> people are interested.

People are very interested. Links to the files/scripts would be
fantastic.

>
> A common complaint is how to use lirc with MythTV such that MPlayer and
> Xine work correctly with the remote. Now for myPVR I've invested quite a
> lot of time to get all of these working so that customers get the
> behaviour that they would expect from an "appliance".
>
> First a quick warning. This is designed for MCE2 USB remotes, like the
> newer Hauppauge remotes. It provides support for the extra hotkeys etc.

Interestingly I have a mce2 usb remote - an OEM microsoft one. It is
this one.

http://www.golfchoice.co.uk/ebay/remotecontrol3.jpg

It differs from the one shown on

http://openmedia.co.nz/openmedia/content/view/27/59/

The one that (Robert &) I have has the four coloured buttons on the
bottom (like on a sky remote). It doesn't have MyMusic, MyPictures,
MyVideo etc.. The buttons detailed on the microsoft remote are covered
in the manual here:

http://www.2partsfusion.com/manuals/MCE_Remote_Manual.pdf

(interestingly this manual has a reference to New Zealand in it!)

However I think these two remotes are pretty much interchangeable, ie
the play button on your remote sends the same code as on my remote. I
say that because my knoppmyth supplied lircd.conf is clearly not exactly
right for my remote, but looks perfect for yours. The lircd.conf on my
machine has entries for all the buttons on your remote, but misses out
the buttons for red, yellow, green & blue. However for all the buttons
that I actually use it works fine.

(Sorry I know all those links were posted last night, but its good to
have them all in one place.)

Anyway it should be easy to get what you have there working well with my
remote, and I am more than willing to help :-)

[snip]

_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: MythTV + MPlayer + Xine + Remote - A Solution [ In reply to ]
> Ok i'm starting this thread to kick things off, and then i'll try and post
> or provide links to the various files/scripts required to set this up if
> people are interested.

This is what I've been running for several months now - note that the
extra remotes in the lircd.conf file are so that I can operate the Sky
box, the amp and the TV via an IR blaster that has 3 IR LEDs in series
(one for each device) so I can turn the amp & TV on/off as well as change
channels on the Sky box. I just keep a single copy of these files in /etc
and then have symbolic links to them from all the places that mythtv, xine
& mplayer expect them to be in. Some of the characters I've chosen for the
jumppoints are a bit odd but at the time (a year ago) I don't think that
meta keys were supported. One day...

The only really tricky one is getting xine to use the arrow keys for menus
but still have the jump back/forwards. Not got that quite right yet :-(

I've included the power toggle and channel change shell scripts as well.

--
Robin Gilks
Re: MythTV + MPlayer + Xine + Remote - A Solution [ In reply to ]
Ok sorry this has taken so long, but here is the recipe I'm using.

Copy these files as follows -

keymap -> ~mythtv/.xine/
lircrc.mce2 -> ~mythtv/.mythtv/lircrc
input.conf -> ~mythtv/.mplayer

keymap - remaps some of the xine keys so that the remote will work sensibily
lircrc.mce2 - uses irxevent for most mappings, but some custom maps for xine
input.conf - just a couple of tweaks for mplayer to behave

Now the hotkeys will work if you follow the hotkey map I have at
http://openmedia.co.nz/openmedia/content/view/27/59/

The only other thing are the missing /etc/lircd.conf maps for the hash
and star keys which are

Hash 0x00007be3
Star 0x0000fbe2


Let me know how you get on with this, and if you think there is a better
mapping.

Note that the arrow keys only work the menu in xine, ffwd/rwnd use
different key maps. It was the only way to get the menus to work the way
I wanted them.

Steve

--
Technical Support - OpenMedia Limited
email - support@openmedia.co.nz
sales - sales@openmedia.co.nz
website - http://www.openmedia.co.nz
Re: MythTV + MPlayer + Xine + Remote - A Solution [ In reply to ]
OpenMedia Support wrote:
> Ok sorry this has taken so long, but here is the recipe I'm using.
>
Thanks for this, in the meantime I've looked into this myself and played
around with the xine and lirc configs.
> Let me know how you get on with this, and if you think there is a better
> mapping.
>
I'll examine these configs when I get a chance.
> Note that the arrow keys only work the menu in xine, ffwd/rwnd use
> different key maps. It was the only way to get the menus to work the way
> I wanted them.
>
Yeah I found that it makes most sense to have the arrow keys just for
DVD menu navigation in Xine.

Robert

--
The way you see people is the way you treat them
and the way you treat them is what they become.

- Johann Wolfgang von Goethe


_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
Re: MythTV + MPlayer + Xine + Remote - A Solution [ In reply to ]
OpenMedia Support wrote:
> Ok sorry this has taken so long, but here is the recipe I'm using.
>
> Copy these files as follows -
>
> keymap -> ~mythtv/.xine/
> lircrc.mce2 -> ~mythtv/.mythtv/lircrc
> input.conf -> ~mythtv/.mplayer
>
> keymap - remaps some of the xine keys so that the remote will work sensibily
> lircrc.mce2 - uses irxevent for most mappings, but some custom maps for xine
> input.conf - just a couple of tweaks for mplayer to behave
>
> Now the hotkeys will work if you follow the hotkey map I have at
> http://openmedia.co.nz/openmedia/content/view/27/59/
>
> The only other thing are the missing /etc/lircd.conf maps for the hash
> and star keys which are
>
> Hash 0x00007be3
> Star 0x0000fbe2
>
>
> Let me know how you get on with this, and if you think there is a better
> mapping.
>
> Note that the arrow keys only work the menu in xine, ffwd/rwnd use
> different key maps. It was the only way to get the menus to work the way
> I wanted them.
>
> Steve
>

I looked at the configs and I pretty much mapped my Hauppauge remote in
a similar way to you as far as Xine goes. I've added some more mappings
than you for Xine though. For example, my hash key will eject the DVD
and my Stop key will actually go back to the TitleMenu as I find that
more logical than to just stop the DVD and get the Xine background. I've
got my number keys mapped to things like SpeedSlow/Fast and
AudioChannelNext/Prior and SpuNext/Prior as I find it useful for
switching audio tracks and subtitles. My other difference is that I have
the >| and |< buttons mapped to skip 60 seconds and my ChannelUp/Down
buttons to skip to next/previous chapter. I guess it's a matter of
preference but I think your config works well without overloading the
remote with functions that one needs to remember.

Thanks for posting it.

Robert.

--
The way you see people is the way you treat them
and the way you treat them is what they become.

- Johann Wolfgang von Goethe


_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/
RE: MythTV + MPlayer + Xine + Remote - A Solution [ In reply to ]
OpenMedia Support wrote:
> Ok sorry this has taken so long, but here is the recipe I'm using.
>
> Copy these files as follows -
>
> keymap -> ~mythtv/.xine/
> lircrc.mce2 -> ~mythtv/.mythtv/lircrc
> input.conf -> ~mythtv/.mplayer
>
> keymap - remaps some of the xine keys so that the remote will work
> sensibily lircrc.mce2 - uses irxevent for most mappings, but some
> custom maps for xine input.conf - just a couple of tweaks for mplayer
> to behave
>
> Now the hotkeys will work if you follow the hotkey map I have at
> http://openmedia.co.nz/openmedia/content/view/27/59/
>
> The only other thing are the missing /etc/lircd.conf maps for the hash

> and star keys which are
>
> Hash 0x00007be3
> Star 0x0000fbe2
>
>
> Let me know how you get on with this, and if you think there is a
> better mapping.
>
> Note that the arrow keys only work the menu in xine, ffwd/rwnd use
> different key maps. It was the only way to get the menus to work the
> way I wanted them.
>
> Steve
>

Hi Steve, nice of you to post these files.

But, I don't seem to be having any luck getting this to work. I set-up
the files but don't see any difference in remote operation.
Something is not right for me as the hotkeys via the keyboard don't
seems to do anything either.

I'm still using xine 0.99.3, but wouldn't think that should effect
things. I do see the bug coming back out of xine that removes the
highlight.
KnoppR5C7

Any pointers?

Simon
Simon@simtec.co.nz.



_______________________________________________
mythtvnz mailing list
mythtvnz@lists.linuxnut.co.nz
http://lists.ourshack.com/mailman/listinfo/mythtvnz
Archives http://www.gossamer-threads.com/lists/mythtv/mythtvnz/