I’ve been looking for a example where I could see, how subtitles for mplayer can be mapped on a remote control. But my search have been quite unsuccessful. Looking for lircrc, example, subtitles and mplayer didn’t return anything meaningful.
And if you build (check out) mplayer from source, there is a file called
input.conf in the
etc directory, where you can look up the mapping of the keyboard. At least I thought so. In the man page you can read:
Cycle through the available subtitles.
but in the
input.conf file there is no “
j” and the appropriate command for it, which I could have used in my lircrc.
I still can’t believe that there isn’t an easy way to find an
lircrc example, where this mapping can be looked up. It took me almost half an hour to find the appropriate commands for lircrc. Here they are:
|command||comment||key on keyboard|
||toggle the visibility of the On Screen Display|
||toggle the visibility of the subtitle|
||cycle through all available subtitle languages.|
||cycle through all available audio languages.|
begin remote = my_remote.conf prog = mplayer button = red config = vobsub_lang end begin remote = my_remote.conf prog = mplayer button = green config = sub_visibility end begin remote = my_remote.conf prog = mplayer button = blue config = switch_audio end begin remote = my_remote.conf prog = mplayer button = yellow config = osd end
With this lircrc I can switch through all available subtitles, hide and make them visible again, and I can also switch through all available audio tracks.
I usually build mplayer from source on a Ubuntu system with an Nvidia gfx card (here a x86_64 Jaunty Jackalope 9.04) like this:
aptitude build-depends mplayer svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer cd mplayer ./configure --disable-x264-lavc --disable-x264 --enable-vdpau --enable-menu --prefix=/usr make && make install
osdcommands aren't necessary in this example, but I've added them, because most of the people would add them anyway. --enable-menu is only needed in order to have On Screen Display (
osd). It shows you e.g, if the playback is paused, the progress indicator of the movie (position), or the percentage of the position. The part with relation to subtitles is, that you can see the subtitle language while changing them if
osdis enabled. You can see in the little opening image in the upper left how it looks like. The
osdbutton turns this display on and off again.
Hope, I could help.