Configuring Xine

From MythTV

Jump to: navigation, search

Note: As of 0.21, the use of Xine for videos and DVDs is deprecated in favour of using the Internal player which is integrated into MythTV.


Contents

Xine

It has excellent support for menus and is second only to MythTV's Internal player for that 'set top box' experience.

This is the Xine FAQ.

For the most part it 'just works' - but this page is here to record any interesting configuration issues.

Note that if you got your Xine from the SuSE default install RPM, it will not decode encrypted DVD's for legal reasons. You'll have to uninstall it, and get it from a non-SuSE source.

see also XvMC X-Video Motion Compensation to reduce CPU load

Xine start command

MythVideo

xine -pfhq --no-splash

MythVideo *.ISO file

xine -pfhq --no-splash dvd:/%s

MythDVD - Play

xine -pfhq --no-splash dvd:/

MythDVD - Rip (preview)

xine -pfhq --no-splash dvd:/%t

You might also want to enable deinterlacing on the video. You can do this by adding -D to the commands above, for example: MythDVD

xine -pfhq -D --no-splash -s DVD

If you are having trouble with getting control back to Mythtv after Xine has exited (the well known "focus" issue), you can try this trick for your Xine command. For example, change the DVD playback command in Utilities/Setup-Media Settings-DVD Settings-Play Settings. This works well with Gnome and should also work with other window managers. This was cribbed from Mythtvology.

xterm -geometry 1x1-0-0 -e xine -pfhq -D --no-splash -s DVD

The (-pfhq) part of the command instructs xine to automatically start:

  • Playing the video/DVD
  • in Fullscreen mode
  • and Hide the GUI control panel.
  • When done with the video, Xine will then Quit back to MythTV.

The (-D) option instructs Xine to Deinterlace the video.

The (--no-splash) option instructs Xine not to display the Xine splash screen when loading

The (dvd:/) option instructs Xine to play the dvd. In the MythVideo *.ISO example shows how (dvd:/%s) is used to instruct Xine to play the ISO file as if it were a DVD.

The Deinterlacing example above alternatively uses (-s DVD) in place of the (dvd:/) command to simulate hitting the DVD key in the Xine GUI. This simply tells xine to autoscan the DVD and start playing it. Depending on your system setup, one method may work better than the other.

Xine and DTS or SPDIF

Assuming you have already mastered Configuring Digital Sound and have the SPDIF working already then getting Xine to play DTS DVDs is easy. In order to get DTS sound from a DVD you need to go to the menu, go to settings, then setup. Select the audio tab and then, in the 'Speaker Arrangement' dropdown, go to the bottom and select 'Pass Through' Alternatively put

audio.speaker_arrangement:Pass Through

in your ~/.xine/config

Obviously, make sure you select the DTS soundtrack on the DVD.

Xine Keyboard Mapping

You will need to do some keyboard mapping across the various applications so that your remote control will do the right thing.eg Pause key does the same function in Myth and in xine.

You will need to remap some of the default keys in Xine using the keymap editor within Xine. Right mouse inside the Xine Window to bring the menu up ->settings->keymap editor.

Image:xinekeygrab.jpg

All you need to do then is to select a xine function, click Edit, click Grab and press the key you want on your keyboard. Click Save after each key change. You will need to move some keys as some of the common keys such as arrow up and arrow down will already be assigned by xine.

To save you a lot of time and you could just cut and paste the keymap file below as a starter for 10. If you want this keymap to apply to just your userid, it should be saved as ~/.xine/keymap file. Alternatively, save it wherever you like (in this case I saved it to /home/mythtv/my_xine_keymap_file), and then add

--keymap=file:/home/mythtv/my_xine_keymap_file

to your Xine startup string.

Needs work on how to map Mythtv keys. In Mythtv one key does different things depending on context- e.g. in Mythtv Right arrow key is skip forward, in Xine there is no way to map the same key to do different things e.g. go right when in a DVD menu, and also skip forward if doing playback. This means the user experience will always be a little grating. At least until MythDVD is finished. Or I try out Gxine which has a more advanced keybindings system.

Xine keyboard maps

##
# xine key bindings.
# Automatically generated by xine-ui version 0.99.4.
##

# start playback
Play {
	key = VOID
	modifier = none
}

# playback pause toggle
Pause {
	key = p
	modifier = none
}

# stop playback
Stop {
	key = VOID
	modifier = none
}

# take a snapshot
Snapshot {
	key = VOID
	modifier = none
}

# eject the current medium
Eject {
	key = VOID
	modifier = none
}

# select and play next MRL in the playlist
NextMrl {
	key = VOID
	modifier = none
}

# select and play previous MRL in the playlist
PriorMrl {
	key = VOID
	modifier = none
}

# loop mode toggle
ToggleLoopMode {
	key = VOID
	modifier = none
}

# stop playback after played stream
PlaylistStop {
	key = VOID
	modifier = control
}

# scan playlist to grab stream infos
ScanPlaylistInfo {
	key = VOID
	modifier = control
}

# add a mediamark from current playback
AddMediamark {
	key = VOID
	modifier = control
}

# edit selected mediamark
MediamarkEditor {
	key = VOID
	modifier = control
}

# set position to -60 seconds in current stream
SeekRelative-60 {
	key = VOID
	modifier = control
}

# set position to +60 seconds in current stream
SeekRelative+60 {
	key = VOID
	modifier = none
}

# set position to -30 seconds in current stream
SeekRelative-30 {
	key = Next
	modifier = none
}

# set position to +30 seconds in current stream
SeekRelative+30 {
	key = Prior
	modifier = none
}

# set position to -15 seconds in current stream
SeekRelative-15 {
	key = VOID
	modifier = control
}

# set position to +15 seconds in current stream
SeekRelative+15 {
	key = VOID
	modifier = control
}

# set position to -7 seconds in current stream
SeekRelative-7 {
	key = VOID
	modifier = mod3
}

# set position to +7 seconds in current stream
SeekRelative+7 {
	key = VOID
	modifier = mod3
}

# set position to beginning of current stream
SetPosition0% {
	key = VOID
	modifier = control
}

# set position to 10% of current stream
SetPosition10% {
	key = VOID
	modifier = control
}

# set position to 20% of current stream
SetPosition20% {
	key = VOID
	modifier = control
}

# set position to 30% of current stream
SetPosition30% {
	key = VOID
	modifier = control
}

# set position to 40% of current stream
SetPosition40% {
	key = VOID
	modifier = control
}

# set position to 50% of current stream
SetPosition50% {
	key = VOID
	modifier = control
}

# set position to 60% of current stream
SetPosition60% {
	key = VOID
	modifier = control
}

# set position to 70% of current stream
SetPosition70% {
	key = VOID
	modifier = control
}

# set position to 80% of current stream
SetPosition80% {
	key = VOID
	modifier = control
}

# set position to 90% of current stream
SetPosition90% {
	key = VOID
	modifier = control
}

# increment playback speed
SpeedFaster {
	key = u
	modifier = none
}

# decrement playback speed
SpeedSlower {
	key = j
	modifier = none
}

# reset playback speed
SpeedReset {
	key = VOID
	modifier = meta
}

# increment audio volume
Volume+ {
	key = [
	modifier = none
}

# decrement audio volume
Volume- {
	key = ]
	modifier = none
}

# increment amplification level
Amp+ {
	key = VOID
	modifier = control
}

# decrement amplification level
Amp- {
	key = VOID
	modifier = control
}

# reset amplification to default value
ResetAmp {
	key = VOID
	modifier = control
}

# audio muting toggle
Mute {
	key = |
	modifier = control
}

# select next audio channel
AudioChannelNext {
	key = +
	modifier = none
}

# select previous audio channel
AudioChannelPrior {
	key = VOID
	modifier = none
}

# visibility toggle of audio post effect window
APProcessShow {
	key = VOID
	modifier = none
}

# toggle post effect usage
APProcessEnable {
	key = VOID
	modifier = none
}

# select next sub picture (subtitle) channel
SpuNext {
	key = VOID
	modifier = none
}

# select previous sub picture (subtitle) channel
SpuPrior {
	key = VOID
	modifier = none
}

# interlaced mode toggle
ToggleInterleave {
	key = VOID
	modifier = none
}

# cycle aspect ratio values
ToggleAspectRatio {
	key = w
	modifier = none
}

# reduce the output window size by factor 1.2
WindowReduce {
	key = VOID
	modifier = none
}

# enlarge the output window size by factor 1.2
WindowEnlarge {
	key = VOID
	modifier = none
}

# set video output window to 50%
Window50 {
	key = VOID
	modifier = meta
}

# set video output window to 100%
Window100 {
	key = VOID
	modifier = meta
}

# set video output window to 200%
Window200 {
	key = VOID
	modifier = meta
}

# zoom in
ZoomIn {
	key = VOID
	modifier = none
}

# zoom out
ZoomOut {
	key = VOID
	modifier = none
}

# zoom in horizontally
ZoomInX {
	key = VOID
	modifier = control
}

# zoom out horizontally
ZoomOutX {
	key = VOID
	modifier = control
}

# zoom in vertically
ZoomInY {
	key = VOID
	modifier = meta
}

# zoom out vertically
ZoomOutY {
	key = VOID
	modifier = meta
}

# reset zooming
ZoomReset {
	key = VOID
	modifier = control, meta
}

# resize output window to stream size
Zoom1:1 {
	key = VOID
	modifier = none
}

# fullscreen toggle
ToggleFullscreen {
	key = VOID
	modifier = none
}

# Xinerama fullscreen toggle
ToggleXineramaFullscr {
	key = VOID
	modifier = none
}

# jump to media Menu
Menu {
	key = VOID
	modifier = none
}

# jump to Title Menu
TitleMenu {
	key = VOID
	modifier = none
}

# jump to Root Menu
RootMenu {
	key = m
	modifier = none
}

# jump to Subpicture Menu
SubpictureMenu {
	key = VOID
	modifier = none
}

# jump to Audio Menu
AudioMenu {
	key = VOID
	modifier = none
}

# jump to Angle Menu
AngleMenu {
	key = VOID
	modifier = none
}

# jump to Part Menu
PartMenu {
	key = VOID
	modifier = none
}

# menu navigate up
EventUp {
	key = Up
	modifier = none
}

# menu navigate down
EventDown {
	key = Down
	modifier = none
}

# menu navigate left
EventLeft {
	key = Left
	modifier = none
}

# menu navigate right
EventRight {
	key = Right
	modifier = none
}

# menu select
EventSelect {
	key = Return
	modifier = none
}

# jump to next chapter
EventNext {
	key = z
	modifier = none
}

# jump to previous chapter
EventPrior {
	key = q
	modifier = none
}

# select next angle
EventAngleNext {
	key = VOID
	modifier = none
}

# select previous angle
EventAnglePrior {
	key = VOID
	modifier = none
}

# visibility toggle of help window
HelpShow {
	key = VOID
	modifier = meta
}

# visibility toggle of video post effect window
VPProcessShow {
	key = VOID
	modifier = meta
}

# toggle post effect usage
VPProcessEnable {
	key = VOID
	modifier = control, meta
}

# visibility toggle of output window
ToggleWindowVisibility {
	key = VOID
	modifier = none
}

# bordered window toggle of output window
ToggleWindowBorder {
	key = VOID
	modifier = none
}

# visibility toggle of UI windows
ToggleVisibility {
	key = VOID
	modifier = none
}

# visibility toggle of control window
ControlShow {
	key = VOID
	modifier = meta
}

# visibility toggle of mrl browser window
MrlBrowser {
	key = VOID
	modifier = meta
}

# visibility toggle of playlist editor window
PlaylistEditor {
	key = VOID
	modifier = meta
}

# visibility toggle of the setup window
SetupShow {
	key = VOID
	modifier = meta
}

# visibility toggle of the event sender window
EventSenderShow {
	key = VOID
	modifier = meta
}

# visibility toggle of analog TV window
TVAnalogShow {
	key = VOID
	modifier = meta
}

# visibility toggle of log viewer
ViewlogShow {
	key = VOID
	modifier = meta
}

# visibility toggle of stream info window
StreamInfosShow {
	key = VOID
	modifier = meta
}

# display stream information using OSD
OSDStreamInfos {
	key = VOID
	modifier = control
}

# show OSD menu
OSDMenu {
	key = VOID
	modifier = none
}

# enter key binding editor
KeyBindingEditor {
	key = VOID
	modifier = meta
}

# open file selector
FileSelector {
	key = VOID
	modifier = control
}

# select a subtitle file
SubSelector {
	key = VOID
	modifier = control
}

# display MRL/Ident toggle
MrlIdentToggle {
	key = VOID
	modifier = control
}

# grab pointer toggle
GrabPointer {
	key = VOID
	modifier = none
}

# enter the number 0
Number0 {
	key = 0
	modifier = none
}

# enter the number 1
Number1 {
	key = 1
	modifier = none
}

# enter the number 2
Number2 {
	key = 2
	modifier = none
}

# enter the number 3
Number3 {
	key = 3
	modifier = none
}

# enter the number 4
Number4 {
	key = 4
	modifier = none
}

# enter the number 5
Number5 {
	key = 5
	modifier = none
}

# enter the number 6
Number6 {
	key = 6
	modifier = none
}

# enter the number 7
Number7 {
	key = 7
	modifier = none
}

# enter the number 8
Number8 {
	key = 8
	modifier = none
}

# enter the number 9
Number9 {
	key = 9
	modifier = none
}

# add 10 to the next entered number
Number10add {
	key = VOID
	modifier = mod3
}

# set position in current stream to numeric percentage
SetPosition% {
	key = VOID
	modifier = none
}

# set position forward by numeric argument in current stream
SeekRelative+ {
	key = VOID
	modifier = meta
}

# set position back by numeric argument in current stream
SeekRelative- {
	key = VOID
	modifier = mod3
}

# change audio video syncing (delay video)
AudioVideoDecay+ {
	key = VOID
	modifier = none
}

# change audio video syncing (delay audio)
AudioVideoDecay- {
	key = VOID
	modifier = none
}

# reset audio video syncing offset
AudioVideoDecayReset {
	key = VOID
	modifier = none
}

# change subtitle syncing (delay video)
SpuVideoDecay+ {
	key = VOID
	modifier = none
}

# change subtitle syncing (delay subtitles)
SpuVideoDecay- {
	key = VOID
	modifier = none
}

# reset subtitle syncing offset
SpuVideoDecayReset {
	key = VOID
	modifier = none
}

# toggle TV modes (on the DXR3)
ToggleTVmode {
	key = VOID
	modifier = control, meta
}

# switch Monitor to DPMS standby mode
DPMSStandby {
	key = VOID
	modifier = none
}

# increase hue by 10
HueControl+ {
	key = VOID
	modifier = none
}

# decrease hue by 10
HueControl- {
	key = VOID
	modifier = none
}

# increase saturation by 10
SaturationControl+ {
	key = VOID
	modifier = none
}

# decrease saturation by 10
SaturationControl- {
	key = VOID
	modifier = none
}

# increase brightness by 10
BrightnessControl+ {
	key = VOID
	modifier = none
}

# decrease brightness by 10
BrightnessControl- {
	key = VOID
	modifier = none
}

# increase contrast by 10
ContrastControl+ {
	key = VOID
	modifier = none
}

# decrease contrast by 10
ContrastControl- {
	key = VOID
	modifier = none
}

# quit the program
Quit {
	key = Escape
	modifier = none
}

##
# End of xine key bindings.
##
Personal tools