Useful Procedures
Suspend to RAM
/usr/sbin/pm-suspend
Backend wait for LAN
I've added a few lines of code to the top of /etc/init.d/mythtv-backend: http://mythtv.pastebin.com/f76a67b69
Very nice for making sure my HDHomerun tuners are found every time the PC boots up. Side effect is that the backend script will hang unless the network is visible. Probably not good for most, but fine for me because unless I can see the HDHR on the network, my backend is useless.
# Modification to /etc/init.d/mythtv-backend to force
# the backend to wait until the network interface is running
# properly before continuing. Especially useful to
# make sure HDHomerun tuners will be found
# (if the network is not there, the script will hang)
# ... <snip>
test -x $DAEMON || exit 0
# Quietly ping the router once
ping -q -c 1 <router ip>
# Exit code of ping now contained in $?
while [ $? -ne 0 ]; do
sleep 1
ping -q -c 1 <router ip> # Can we ping the router yet?
done
# ping worked, continue starting up the backend
. /lib/lsb/init-functions
# ... <snip>
Wake On Lan
On DD-WRT device, create file in /tmp/cron.d wake-iris
# Wake up Iris for an evening of recording every day
58 16 * * * root /usr/sbin/wol -h 192.168.0.104 00:24:8C:20:50:85
Database
- Backup: mysqldump -u <myth_user> -p —extended-insert —databases <myth_db_name> > mythdatabase.bak
- Repair: mysqlcheck -r -umythtv -p<pass> mythconverg
- * From irc-freenode #ubuntu-mythtv: <Zinn> If you are having problems connecting to your mysql database, you can perform the following to reconfigure it: 1. sudo dpkg-reconfigure mysql-server-5.0 (pay attention to the root password you set, you will need it for the next step) 2. sudo dpkg-reconfigure mythtv-database 3. sudo dpkg-reconfigure mythtv-common
Testing tuner card
- Install dvb-utils
- Run scan on frequency table: scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-NTSC-center-frequencies-8VSB
Adding the MythBuntu repository
echo "deb http://ppa.dogfood.launchpad.net/mythbuntu/ubuntu feisty multiverse universe restricted main"
sudo tee /etc/apt/sources.list.d/mythbuntu-feisty.list
Export Video
nuvexport —debug output
To encode
Use the following commands:
system call:
/bin/nice -n19 /usr/bin/mythcommflag —gencutlist -c 1101 -s 2006-07-14-00-37-00
system call:
mkdir -m 0755 /tmp/fifodir_27369/
forking:
/bin/nice -n19 /usr/bin/mythtranscode —showprogress -p autodetect -c 1101 -s 006-07-14-00-37-00 -f "/tmp/fifodir_27369/" 2>&1
forking:
/bin/nice -n19 ffmpeg -y -f s16le -ar 48000 -ac 2 -i /tmp/fifodir_27369/audout -f rawvideo -pix_fmt yuv420p -s 1920x1080 -aspect 1.33333333333333 -r 29.970 -i /tmp/fifodir_27369/vidout -aspect 1.33333333333333 -r 29.970 -croptop 22 -cropright 38 -cropbottom 22 -cropleft 38 -padleft 234 -padright 234 -s 1452x1088 -vcodec mpeg4 -b 2200 -lumi_mask 0.05 -dark_mask 0.02 -scplx_mask 0.5 -mv4 -part -vtag divx -acodec mp3 -ab 64 -f avi '/video1/export/Late_Night_With_Conan_.avi' 2>&1
To make DVD of myth recordings
From mythtv-users mailing list July 20, 2006
The method I use is to utilize projectX to split up the file, then
use mplex to put it back together:
mplex -f 8 <file>.mpg <file>.m2v <file>.mp2
Then use dvdauthor in the normal manner:
dvdauthor -o DVD <file>.mpg (additional .mpg files if needed)
dvdauthor -T -o DVD
Then burn the DVD directory structure with growisofs:
growisofs -Z /dev/<writer> -dvd-video DVD
I think you can use avidemux2 instead of projectX if you so desire.
This has worked well for me with both single and double layer disks.
But usually I just use mythburn from the mythweb interface, which I
believe does essentially the same thing with less typing on my part :-)
See the ArchiveRecordingsToDvdHowTo in the docs for further info.
Xorg.conf for Westinghouse LVM-37W3
From: http://www.hardforum.com/showthread.php?t=1088497&page=71&pp=20
/etc/xorg.conf (snippet)
Section "Monitor"
Identifier "Westinghouse LVM-37w3 1080p"
HorizSync 30-80
VertRefresh 60
Option "DPMS"
Option "ModeValidation" "NoMaxPClkCheck, NoEdidMaxPClkCheck"
Option "UseDisplayDevice" "DFP"
#Modelines are unnecessary and not used based on above options...
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Nvidia NV40 BFG GeForce 6800GT"
Monitor "Westinghouse LVM-37w3 1080p"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080" "1280x1024" "1280x768" "1024x768" "800x600" "640x480"
EndSubSection
EndSection
MythVideo
Default setting
mplayer -fs -zoom -quiet -vo xv %s
Xine
From MythTV Ubuntu Installation Guide
The other useful setting is the movie player to use, found in Player Settings. This will probably be either mplayer or xine. I've had better results with xine and use the following command line:
xine -r 4:3 -f -I —no-splash %s
Xine Configuration
From MythTV Wiki
Xine is a popular media player under Linux. Xine can be configured to work with a remote control.
Running man xine from the terminal will get you an exhaustive list of the many options Xine can be run with, but the following is a good default:
xine -pfhq —no-splash
-p specifies "autoplay", f starts in fullscreen mode, h hides the GUI (if you've installed xine-ui) and q means that xine will exit after the video finishes playing, returning you to MythVideo. —no-splash disables the splash screen that Xine usually starts with.
Select subtitle channel with -u <num>. So for example, for subtitles on track 0:
xine -pfhq -u 0 —no-splash
To change thesubtitle font, edit ~/.xine/config
Alter: subtitles.separate.font:sans
Fonts are stored at /usr/share/xine/libxine1/fonts
Typical available options: cc, cci, cetus, mono, sans, serif
To change the font size:
Alter: subtitles.separate.subtitle_size:very large
Options: { tiny small normal large very large huge }, default: 1
Further Xine Configuration
It seems that xine has a rather annoying habit of reverting back to the default keys even after configuring them, and that several functions overlap each other (the prev/next mrl function and the prev/next chapter buttons are an example). The easiest way to solve this problem is to edit the keymap file ($HOME/.xine/keymap usually) or just use the keymap editor in xine_gui if you have it installed, and set up the keys how you'd like, in my case one for watching vids and another for watching dvds. Then copy the keymap file to something similar to keymap.video and/or keymap.dvd. Then enter this as your default player (using the above configuration as a base).
xine -pfhq —no-splash —keymap=file:/path/to/.xine/keymap.video %s
gxine -f %s
This tells xine to load the keymap from the specified file. After doing this xine decided to behave and has been working nicely for some time.
xmame
xmame -vidmod 1 -fullscreen -ctrlr xarcade %s
-video-mode / -vidmod <int> Select video mode:
0 = Normal (left-alt + insert)
1 = XVideo (left-alt + home)
* Alsa Sound System *
-list-alsa-cards List available sound cards
-list-alsa-pcm List available pcm devices
-audiodevice / -ad <string> Use an alternative audiodevice
-mixerdevice / -md <string> Use an alternative mixerdevice
* Sound mixer related *
-sound-mixer-plugin / -smp Select which plugin to use for the sound mixer
<string>
-list-mixer-plugins / -lmp List available sound mixer plugins
* ALSA Mixer *
-alsa-mixer / -amixer <string> Select which simple mixer control to use
-verifyroms / -vr Verify ROMs for games matching gamename, or
all, gamename may contain * and ? wildcards
-x11 mode, -x11-mode
Select x11 video mode (if compiled in).
0 Normal window (hotkey left-alt + insert)
1 Fullscreen DGA (direct graphics access) (hotkey left-alt + home)
2 Windowed Xv
3 Fullscreen Xv
-[no]fullscreen
Start in fullscreen mode.
-[no]ka, -[no]keepaspect
Try / don't try to keep the aspect ratio of a game when selecting the best videomode.
-dar ratio, -displayaspectratio ratio
Set the display aspect ratio of your monitor (float). This is
used for -keepaspect. The default is 1.33 (4/3). Use 0.75
(3/4) for a portrait monitor. (1.78 = 16:9)
-mk keymap, -mapkey keymap
Set a specific key mapping, see xmamerc.dist.
-ctrlr controller
Preconfigure for specified controller, e.g., HotRod, HotRodSE,
SlikStik, XArcade.
-[no]skip_disclaimer
Skip displaying the disclaimer screen.
-ik, -isknown
Check if romdump or romdumps in dir/zip are known.
Maintenance
Periodic maintenance script to put in crontab
optimize_mythdb.pl
#!/bin/sh
OPT_MYTHDB="/usr/share/doc/mythtv-backend/contrib/optimize_mythdb.pl"
LOG="/var/log/mythtv/optimize_mythdb.log"
echo "Started ${OPT_MYTHDB} on `date`" >> ${LOG}
${OPT_MYTHDB} >> ${LOG}
echo "Finished ${OPT_MYTHDB} on `date`" >> ${LOG}
Tidbits from mythtv-users mailing list
From: Nick Morrott
Have your tried running mythfrontend with '-v all' logging output -
this should output all possible log output from mythfrontend and may
catch something. (Note that plugins such as MythMusic/MythWeather run
on the frontend).
From: Dewey Smolka
You could run two instances of mythtv I guess… ?
This works quite well but requires a keyboard attached to the Myth
machine or the ability to ssh in.
Start one instance of mythfrontend and play the music. Ctrl-tab to a
new desktop and start a second mythfrontend to show
TV/video/recordings, or whatever.
From: Yan Seiner
I've been playing around with MythMusic, and so far, so good. Myth
stores its music as .ogg files.
Hardware
From https://help.ubuntu.com/community/MythTV_Feisty_hardware_list
HD5500 - supported but with module issues
- The cx88_dvb module is not loaded on boot. modprobe and add cx88_dvb to /etc/modules to fix this:
$ sudo sh -c "echo "cx88_dvb" » /etc/modules"
From http://parker1.co.uk/mythtv_dvb.php
scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB > ~mythtv/.tzap/channels.conf
Sound
- List all soundcards and digital audio devices: aplay -l
- List your available PCMs (device definitions): aplay -L
- Test output to spdif: aplay -D ALSA:spdif test.ac3
- Adjust channel volumes: alsamixer
Configuring Digital sound at MythTV wiki
- Get your card number and device numbers from aplay -l, then create the following /etc/asound.conf with the appropriate changes
# ~/.asoundrc or /etc/asound.conf
# ALSA configuration file
##### USAGE #####
# Save this file as "~/.asoundrc" (for user-specific sound configuration) or
# "/etc/asound.conf" (for system-wide sound configuration) and specify ALSA
# device names ad described in the next section.
##### DEVICE NAMES #####
# This configuration file defines four devices for use by the user. Those
# devices are "analog", "mixed-analog", "digital", and "mixed-digital". The
# user may also re-define "default" to be identical to one of the above-named
# devices (i.e. to send all sound output to the digital output unless otherwise
# specified). Use the device names as described below:
# - "analog" outputs to the analog output directly and (at least on software
# sound cards) blocks other audio output. After playback completes, "queued"
# sounds are output in sequence.
# - "mixed-analog" mixes audio output from multiple programs into the analog
# output (so you can hear beeps, alerts, and other noises while playing back
# an audio stream).
# - "digital" outputs to the digital output directly. Since most (all?)
# digital outputs expect 48kHz PCM audio, this may not work for some playback
# (i.e. CD's--which are 44.1kHz PCM audio--or 32kHz audio streams from TV
# recordings, etc.).
# - "mixed-digital"
# All other devices created within this file are used only by the configuration
# file itself and should /not/ be used directly. In other words, do not use
# the devices "analog-hw", "dmix-analog", "digital-hw", or "dmix-digital".
##### IMPORTANT #####
# To make this ALSA configuration file work with your sound card, you will need
# to define the appropriate card and device information for the "analog-hw" and
# "digital-hw" devices below. You can find the card and device information
# using "aplay -l".
##### Configuration File #####
# Override the default output used by ALSA. If you do not override the
# default, your default device is identical to the (unmixed) "analog" device
# shown below. If you prefer mixed and/or digital output, uncomment the
# appropriate four lines below (only one slave.pcm line).
#
# Note, also, that as of ALSA 1.0.9, "software" sound cards have been modified
# such that their default "default" device is identical to the "mixed-analog"
# device. Whether using an ALSA version before or after 1.0.9, it does no harm
# and has no affect on performance to redefine the device (even if the
# redefinition does not change anything). Also, by using this ALSA
# configuration file, you once again have access to unmixed analog output using
# the "analog" device.
pcm.!default {
type plug
## Uncomment the following to use (unmixed) "analog" by default
# slave.pcm "analog-hw"
## Uncomment the following to use "mixed-analog" by default
slave.pcm "dmix-analog"
## Uncomment the following to use (unmixed) "digital" by default
# slave.pcm "digital-hw"
## Uncomment the following to use "mixed-digital" by default
# slave.pcm "dmix-digital"
}
# Control device (mixer, etc.) for the card
ctl.!default {
type hw
card 0
}
# Alias for (converted) analog output on the card
# - This is identical to the device named "default"--which always exists and
# refers to hw:0,0 (unless overridden)
# - Therefore, we can specify "hw:0,0", "default", or "analog" to access analog
# output on the card
# - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
# "default" to do mixing, meaning this device is different from "default" and
# allows playback while blocking other sound sources (until playback
# completes).
pcm.analog {
type plug
slave.pcm "analog-hw"
}
# Control device (mixer, etc.) for the card
ctl.analog {
type hw
card 0
}
# Alias for (converted) mixed analog output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the dmix plugin (in this case 48000Hz)
# - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
# "default" to do mixing, meaning this device is identical to "default" for
# "software" sound cards.
pcm.mixed-analog {
type plug
slave.pcm "dmix-analog"
}
# Control device (mixer, etc.) for the card
ctl.mixed-analog {
type hw
card 0
}
# Alias for (converted) digital (S/PDIF) output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the S/PDIF hardware (in this case 48000Hz)
pcm.digital {
type plug
slave.pcm "digital-hw"
}
# Control device (mixer, etc.) for the card
ctl.digital {
type hw
card 0
}
# Alias for mixed (converted) digital (S/PDIF) output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the S/PDIF hardware (in this case 48000Hz)
pcm.mixed-digital {
type plug
slave.pcm "dmix-digital"
}
# Control device (mixer, etc.) for the card
ctl.mixed-digital {
type hw
card 0
}
# The following devices are not useful by themselves. They require specific
# rates, channels, and formats. Therefore, you probably do not want to use
# them directly. Instead use of of the devices defined above.
# Alias for analog output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.analog-hw {
type hw
card 0
# The default value for device is 0, so no need to specify
# - Uncomment one of the below or create a new "device N" line as appropriate
# for your sound card or
# device 1
# device 4
}
# Control device (mixer, etc.) for the card
ctl.analog-hw {
type hw
card 0
}
# Alias for digital (S/PDIF) output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.digital-hw {
type hw
card 0
device 1
# - Comment out "device 1" above and uncomment one of the below or create a
# new "device N" line as appropriate for your sound card or
# device 2
# device 4
}
# Control device (mixer, etc.) for the card
ctl.digital-hw {
type hw
card 0
}
# Direct software mixing plugin for analog output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.dmix-analog {
type dmix
ipc_key 1234
slave {
pcm "analog-hw"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}
# Control device (mixer, etc.) for the card
ctl.dmix-analog {
type hw
card 0
}
# Direct software mixing plugin for digital (S/PDIF) output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.dmix-digital {
type dmix
ipc_key 1235
slave {
pcm "digital-hw"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}
# Control device (mixer, etc.) for the card
ctl.dmix-digital {
type hw
card 0
}
Lirc
Keymaps for xine in ~/.xine/keymap
Installing LIRC on Ubuntu
Follow directions at Ubuntu Lirc Howto
# lircrc.mceusb
###################
#
# IRExec
#
###################
begin
prog = irexec
button = Power
repeat = 3
#config = /home/mythtv/bin/mythstart.sh
config = /home/mythtv/bin/mythpowerbutton.sh
#config = Key Alt-Escape CurrentWindow
end
begin
prog = irxevent
button = Power
repeat = 3
config = Key Ctrl-Escape CurrentWindow
end
###################
#
# MythTV
#
###################
begin
prog = mythtv
button = One
config = 1
end
begin
prog = mythtv
button = Two
config = 2
end
begin
prog = mythtv
button = Three
config = 3
end
begin
prog = mythtv
button = Four
config = 4
end
begin
prog = mythtv
button = Five
config = 5
end
begin
prog = mythtv
button = Six
config = 6
end
begin
prog = mythtv
button = Seven
config = 7
end
begin
prog = mythtv
button = Eight
config = 8
end
begin
prog = mythtv
button = Nine
config = 9
end
begin
prog = mythtv
button = Zero
config = 0
end
begin
prog = mythtv
button = Back
config = Esc
end
begin
prog = mythtv
button = Guide
config = M
end
begin
prog = mythtv
button = More
config = I
end
begin
prog = mythtv
button = VolDown
repeat = 1
config = F10
end
begin
prog = mythtv
button = VolUp
repeat = 1
config = F11
end
begin
prog = mythtv
button = ChanUp
repeat = 3
config = Up
end
begin
prog = mythtv
button = ChanDown
repeat = 3
config = Down
end
begin
prog = mythtv
button = Up
repeat = 3
config = Up
end
begin
prog = mythtv
button = Down
repeat = 3
config = Down
end
begin
prog = mythtv
button = Left
repeat = 5
delay=3
config = Left
end
begin
prog = mythtv
button = Right
repeat = 5
delay=3
config = Right
end
begin
prog = mythtv
button = Play
config = Return
end
begin
prog = mythtv
button = OK
config = Return
end
begin
prog = mythtv
button = Enter
config = Return
end
begin
prog = mythtv
button = Mute
config = F9
end
begin
prog = mythtv
button = Rewind
config = <
end
begin
prog = mythtv
button = Forward
config = >
end
begin
prog = mythtv
button = Record
config = R
end
begin
prog = mythtv
button = Stop
config = O
end
begin
prog = mythtv
button = Pause
config = P
end
# Use for backwards commercial skip
begin
prog = mythtv
button = Replay
config = Q
end
# Use for forward commercial skip
begin
prog = mythtv
button = Skip
config = Z
end
### The following keys need to be mapped before they can be used
### (I mapped mine using MythWeb)
begin
prog = mythtv
button = LiveTV
config = !
end
begin
prog = mythtv
button = RecTV
config = @
end
begin
prog = mythtv
button = Videos
config = ^
end
begin
prog = mythtv
button = Pictures
config = &
end
begin
prog = mythtv
button = Music
config = $
end
begin
prog = mythtv
button = Guide
config = ~
end
begin
prog = mythtv
button = DVD
config = (
end
begin
prog = mythtv
button = Home
config = )
end
###################
#
# MPlayer
#
###################
begin
prog = mplayer
button = Back
config = quit
end
begin
prog = mplayer
button = More
config = osd
end
begin
prog = mplayer
button = Replay
config = seek -10
repeat = 1
end
begin
prog = mplayer
button = Skip
config = seek +10
repeat = 1
end
begin
prog = mplayer
button = Rewind
config = seek -60
repeat = 1
end
begin
prog = mplayer
button = Forward
config = seek +60
repeat = 1
end
begin
prog = mplayer
button = Pause
config = pause
end
begin
prog = mplayer
button = VolUp
config = volume +1
repeat = 1
end
begin
prog = mplayer
button = VolDown
config = volume -1
repeat = 1
end
begin
prog=mplayer
button=Mute
config=mute
end
###################
#
# XINE
#
###################
##
# xine key bindings.
# Automatically generated by xine-ui version 0.9.23.
##
# start playback
begin
button = Play
prog = xine
repeat = 0
config = Play
end
# playback pause toggle
begin
button = Pause
prog = xine
repeat = 0
config = Pause
end
# stop playback
begin
button = Stop
prog = xine
repeat = 0
config = Stop
end
# take a snapshot
begin
button = Record
prog = xine
repeat = 0
config = Snapshot
end
# set position to -60 seconds in current stream
begin
button = Replay
prog = xine
repeat = 0
config = SeekRelative-60
end
# set position to +60 seconds in current stream
begin
button = Skip
prog = xine
repeat = 0
config = SeekRelative+60
end
# set position to -30 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative-30
end
# set position to +30 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative+30
end
# set position to -15 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative-15
end
# set position to +15 seconds in current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SeekRelative+15
end
# set position to -7 seconds in current stream
begin
button = Rewind
prog = xine
repeat = 2
config = SeekRelative-7
end
# set position to +7 seconds in current stream
begin
button = Forward
prog = xine
repeat = 2
config = SeekRelative+7
end
# set position to beginning of current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition0%
end
# set position to 1027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition10%
end
# set position to 2027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition20%
end
# set position to 3027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition30%
end
# set position to 4027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition40%
end
# set position to 5027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition50%
end
# set position to 6027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition60%
end
# set position to 7027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition70%
end
# set position to 8027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition80%
end
# set position to 9027777754410f current stream
begin
button = xxxxx
prog = xine
repeat = 0
config = SetPosition90%
end
# increment playback speed
begin
button = ChanUp
prog = xine
repeat = 0
config = SpeedFaster
end
# decrement playback speed
begin
button = ChanDown
prog = xine
repeat = 0
config = SpeedSlower
end
# reset playback speed
begin
button = Clear
prog = xine
repeat = 0
config = SpeedReset
end
# increment audio volume
begin
button = VolUp
prog = xine
repeat = 1
config = Volume+
end
# decrement audio volume
begin
button = VolDown
prog = xine
repeat = 1
config = Volume-
end
# audio muting toggle
begin
button = Mute
prog = xine
repeat = 0
config = Mute
end
# select next sub picture (subtitle) channel
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = SpuNext
#end
# select previous sub picture (subtitle) channel
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = SpuPrior
#end
# cycle aspect ratio values
begin
# button = Videos
button = Star
prog = xine
repeat = 0
config = ToggleAspectRatio
end
# jump to media Menu
begin
button = Home
prog = xine
repeat = 0
config = Menu
end
# jump to Title Menu
#begin
# button = Menu
# prog = xine
# repeat = 0
# config = TitleMenu
#end
# jump to Root Menu
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = RootMenu
#end
# jump to Subpicture Menu
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = SubpictureMenu
#end
# jump to Audio Menu
#begin
# button = Music
# prog = xine
# repeat = 0
# config = AudioMenu
#end
# jump to Angle Menu
#begin
# button = TV
# prog = xine
# repeat = 0
# config = AngleMenu
#end
# jump to Part Menu
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = PartMenu
#end
# menu navigate up
begin
button = Up
prog = xine
repeat = 0
config = EventUp
end
# menu navigate down
begin
button = Down
prog = xine
repeat = 0
config = EventDown
end
# menu navigate left
begin
button = Left
prog = xine
repeat = 0
config = EventLeft
end
# menu navigate right
begin
button = Right
prog = xine
repeat = 0
config = EventRight
end
# menu select
begin
button = OK
prog = xine
repeat = 0
config = EventSelect
end
# jump to next chapter
#begin
# button = Skip
# prog = xine
# repeat = 0
# config = EventNext
#end
# jump to previous chapter
#begin
# button = Replay
# prog = xine
# repeat = 0
# config = EventPrior
#end
# select next angle
#begin
# button = TV
# prog = xine
# repeat = 0
# config = EventAngleNext
#end
# select previous angle
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = EventAnglePrior
#end
# display stream information using OSD
begin
button = More
prog = xine
repeat = 0
config = OSDStreamInfos
end
# enter key binding editor
#begin
# button = xxxxx
# prog = xine
# repeat = 0
# config = KeyBindingEditor
#end
# enter the number 0
begin
button = Zero
prog = xine
repeat = 0
config = Number0
end
# enter the number 1
begin
button = One
prog = xine
repeat = 0
config = Number1
end
# enter the number 2
begin
button = Two
prog = xine
repeat = 0
config = Number2
end
# enter the number 3
begin
button = Three
prog = xine
repeat = 0
config = Number3
end
# enter the number 4
begin
button = Four
prog = xine
repeat = 0
config = Number4
end
# enter the number 5
begin
button = Five
prog = xine
repeat = 0
config = Number5
end
# enter the number 6
begin
button = Six
prog = xine
repeat = 0
config = Number6
end
# enter the number 7
begin
button = Seven
prog = xine
repeat = 0
config = Number7
end
# enter the number 8
begin
button = Eight
prog = xine
repeat = 0
config = Number8
end
# enter the number 9
begin
button = Nine
prog = xine
repeat = 0
config = Number9
end
# add 10 to the next entered number
begin
button = Ten
prog = xine
repeat = 0
config = Number10add
end
# quit the program
begin
button = Back
prog = xine
repeat = 0
config = Quit
end
# select Audio mode
begin
prog = xine
button = Music
repeat = 0
mode = Audio
end
# select Subtitle mode
begin
prog = xine
button = Pictures
repeat = 0
mode = Subtitle
end
# select Angle mode
begin
prog = xine
button = TV
repeat = 0
mode = Angle
end
#begin Audio
# select next audio channel
#begin
# button = ChanUp
# prog = xine
# repeat = 0
# config = AudioChannelNext
#end
# select previous audio channel
#begin
# button = ChanDown
# prog = xine
# repeat = 0
# config = AudioChannelPrior
#end
#end Audio
begin Subtitle
# select next sub picture (subtitle) channel
begin
button = ChanUp
prog = xine
repeat = 0
config = SpuNext
end
# select previous sub picture (subtitle) channel
begin
button = ChanDown
prog = xine
repeat = 0
config = SpuPrior
end
end Subtitle
begin Angle
# select next angle
begin
button = ChanUp
prog = xine
repeat = 0
config = EventAngleNext
end
# select previous angle
begin
button = ChanDown
prog = xine
repeat = 0
config = EventAnglePrior
end
end Angle
##
# End of xine key bindings.
##
###################
#
# GXINE
#
###################
##
# gxine key bindings.
##
# start playback
begin
button = Play
prog = gxine
repeat = 0
config = play ()
end
# quit the program
begin
button = Stop
prog = gxine
repeat = 0
config = exit ();
end
# playback pause toggle
begin
button = Pause
prog = gxine
repeat = 0
config = pause ()
end
# cycle aspect ratio values
begin
button = Star
prog = gxine
repeat = 0
config = ++vo_aspect.v
end
# set position to -60 seconds in current stream
begin
button = Replay
prog = gxine
repeat = 0
config = play (0, get_time()-60000)
end
# set position to +60 seconds in current stream
begin
button = Skip
prog = gxine
repeat = 0
config = play (0, get_time()+60000)
end
# set position to -10 seconds in current stream
begin
button = Left
prog = gxine
repeat = 0
config = play (0, get_time()-10000)
end
# set position to +10 seconds in current stream
begin
button = Right
prog = gxine
repeat = 0
config = play (0, get_time()+10000)
end
# Playback slower
begin
button = Rewind
prog = gxine
repeat = 0
config = --av_speed.v
end
# Playback faster
begin
button = Forward
prog = gxine
repeat = 0
config = ++av_speed.v
end
# set position to beginning of current stream
begin
button = Zero
prog = gxine
repeat = 0
config = play (0,0)
end
# set position to 10% of current stream
begin
button = One
prog = gxine
repeat = 0
config = play (10,0)
end
# set position to 20% of current stream
begin
button = Two
prog = gxine
repeat = 0
config = play (20,0)
end
# set position to 30% of current stream
begin
button = Three
prog = gxine
repeat = 0
config = play (30,0)
end
# set position to 40% of current stream
begin
button = Four
prog = gxine
repeat = 0
config = play (40,0)
end
# set position to 50% of current stream
begin
button = Five
prog = gxine
repeat = 0
config = play (50,0)
end
# set position to 60% of current stream
begin
button = Six
prog = gxine
repeat = 0
config = play (60,0)
end
# set position to 70% of current stream
begin
button = Seven
prog = gxine
repeat = 0
config = play (70,0)
end
# set position to 80% of current stream
begin
button = Eight
prog = gxine
repeat = 0
config = play (80,0)
end
# set position to 90% of current stream
begin
button = Nine
prog = gxine
repeat = 0
config = play (90,0)
end
# Zoom In
begin
button = ChanUp
prog = gxine
repeat = 0
config = vo_zoom.v += 5
end
# Zoom Out
begin
button = ChanDown
prog = gxine
repeat = 0
config = vo_zoom.v -= 5
end
# Clear Zoom
begin
button = Clear
prog = gxine
repeat = 0
config = vo_zoom.v = 100
end
# jump to media Menu
#begin
# button = Home
# prog = gxine
# repeat = 0
# config = input_menu1 ()
#end
# menu navigate up
begin
button = Up
prog = gxine
repeat = 0
config = input_up ()
end
# menu navigate down
begin
button = Down
prog = gxine
repeat = 0
config = input_down ()
end
# menu select
begin
button = OK
prog = gxine
repeat = 0
config = input_select ()
end
# quit
begin
button = Back
prog = gxine
repeat = 0
# config = input_previous ()
config = exit ()
end
# display stream information using OSD
begin
button = More
prog = gxine
repeat = 0
config = toolbar.fs.toggle ()
end
# display video info
begin
button = Enter
prog = gxine
repeat = 0
config = stream_info_show ()
end
# display video info
#begin
# button = RecTv
# prog = gxine
# repeat = 0
# config = open_show ()
#end
##
# End of gxine key bindings.
##
Ubuntu installing LIRC
- Follow directions at Lirc Howto
Tidbits from mythtv-users mailing list
From: Nick Morrott
Have your tried running mythfrontend with '-v all' logging output -
this should output all possible log output from mythfrontend and may
catch something. (Note that plugins such as MythMusic/MythWeather run
on the frontend).
From: Dewey Smolka
You could run two instances of mythtv I guess… ?
This works quite well but requires a keyboard attached to the Myth
machine or the ability to ssh in.
Start one instance of mythfrontend and play the music. Ctrl-tab to a
new desktop and start a second mythfrontend to show
TV/video/recordings, or whatever.
From: Yan Seiner
I've been playing around with MythMusic, and so far, so good. Myth
stores its music as .ogg files.
HD5500 - supported but with module issues
- The cx88_dvb module is not loaded on boot. modprobe and add cx88_dvb to /etc/modules to fix this:
$ sudo sh -c "echo "cx88_dvb" » /etc/modules"
From [http://parker1.co.uk/mythtv_dvb.php|http://parker1.co.uk/mythtv_dvb.php]
scan /usr/share/doc/dvb-utils/examples/scan/atsc/us-ATSC-center-frequencies-8VSB > ~mythtv/.tzap/channels.conf
Sound
Wiki
- List all soundcards and digital audio devices: {CODE()}aplay -l{CODE}
- List your available PCMs (device definitions): {CODE()}aplay -L{CODE}
- Test output to spdif: {CODE()}aplay -D ALSA:spdif test.ac3{CODE}
- Adjust channel volumes: {CODE()}alsamixer{CODE}
Digital sound at MythTV wiki
- Get your card number and device numbers from aplay -l, then create the following /etc/asound.conf with the appropriate changes
# ~/.asoundrc or /etc/asound.conf
# ALSA configuration file
##### USAGE #####
# Save this file as "~/.asoundrc" (for user-specific sound configuration) or
# "/etc/asound.conf" (for system-wide sound configuration) and specify ALSA
# device names ad described in the next section.
##### DEVICE NAMES #####
# This configuration file defines four devices for use by the user. Those
# devices are "analog", "mixed-analog", "digital", and "mixed-digital". The
# user may also re-define "default" to be identical to one of the above-named
# devices (i.e. to send all sound output to the digital output unless otherwise
# specified). Use the device names as described below:
# - "analog" outputs to the analog output directly and (at least on software
# sound cards) blocks other audio output. After playback completes, "queued"
# sounds are output in sequence.
# - "mixed-analog" mixes audio output from multiple programs into the analog
# output (so you can hear beeps, alerts, and other noises while playing back
# an audio stream).
# - "digital" outputs to the digital output directly. Since most (all?)
# digital outputs expect 48kHz PCM audio, this may not work for some playback
# (i.e. CD's--which are 44.1kHz PCM audio--or 32kHz audio streams from TV
# recordings, etc.).
# - "mixed-digital"
# All other devices created within this file are used only by the configuration
# file itself and should /not/ be used directly. In other words, do not use
# the devices "analog-hw", "dmix-analog", "digital-hw", or "dmix-digital".
##### IMPORTANT #####
# To make this ALSA configuration file work with your sound card, you will need
# to define the appropriate card and device information for the "analog-hw" and
# "digital-hw" devices below. You can find the card and device information
# using "aplay -l".
##### Configuration File #####
# Override the default output used by ALSA. If you do not override the
# default, your default device is identical to the (unmixed) "analog" device
# shown below. If you prefer mixed and/or digital output, uncomment the
# appropriate four lines below (only one slave.pcm line).
#
# Note, also, that as of ALSA 1.0.9, "software" sound cards have been modified
# such that their default "default" device is identical to the "mixed-analog"
# device. Whether using an ALSA version before or after 1.0.9, it does no harm
# and has no affect on performance to redefine the device (even if the
# redefinition does not change anything). Also, by using this ALSA
# configuration file, you once again have access to unmixed analog output using
# the "analog" device.
pcm.!default {
type plug
## Uncomment the following to use (unmixed) "analog" by default
# slave.pcm "analog-hw"
## Uncomment the following to use "mixed-analog" by default
slave.pcm "dmix-analog"
## Uncomment the following to use (unmixed) "digital" by default
# slave.pcm "digital-hw"
## Uncomment the following to use "mixed-digital" by default
# slave.pcm "dmix-digital"
}
# Control device (mixer, etc.) for the card
ctl.!default {
type hw
card 0
}
# Alias for (converted) analog output on the card
# - This is identical to the device named "default"--which always exists and
# refers to hw:0,0 (unless overridden)
# - Therefore, we can specify "hw:0,0", "default", or "analog" to access analog
# output on the card
# - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
# "default" to do mixing, meaning this device is different from "default" and
# allows playback while blocking other sound sources (until playback
# completes).
pcm.analog {
type plug
slave.pcm "analog-hw"
}
# Control device (mixer, etc.) for the card
ctl.analog {
type hw
card 0
}
# Alias for (converted) mixed analog output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the dmix plugin (in this case 48000Hz)
# - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
# "default" to do mixing, meaning this device is identical to "default" for
# "software" sound cards.
pcm.mixed-analog {
type plug
slave.pcm "dmix-analog"
}
# Control device (mixer, etc.) for the card
ctl.mixed-analog {
type hw
card 0
}
# Alias for (converted) digital (S/PDIF) output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the S/PDIF hardware (in this case 48000Hz)
pcm.digital {
type plug
slave.pcm "digital-hw"
}
# Control device (mixer, etc.) for the card
ctl.digital {
type hw
card 0
}
# Alias for mixed (converted) digital (S/PDIF) output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the S/PDIF hardware (in this case 48000Hz)
pcm.mixed-digital {
type plug
slave.pcm "dmix-digital"
}
# Control device (mixer, etc.) for the card
ctl.mixed-digital {
type hw
card 0
}
# The following devices are not useful by themselves. They require specific
# rates, channels, and formats. Therefore, you probably do not want to use
# them directly. Instead use of of the devices defined above.
# Alias for analog output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.analog-hw {
type hw
card 0
# The default value for device is 0, so no need to specify
# - Uncomment one of the below or create a new "device N" line as appropriate
# for your sound card or
# device 1
# device 4
}
# Control device (mixer, etc.) for the card
ctl.analog-hw {
type hw
card 0
}
# Alias for digital (S/PDIF) output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.digital-hw {
type hw
card 0
device 1
# - Comment out "device 1" above and uncomment one of the below or create a
# new "device N" line as appropriate for your sound card or
# device 2
# device 4
}
# Control device (mixer, etc.) for the card
ctl.digital-hw {
type hw
card 0
}
# Direct software mixing plugin for analog output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.dmix-analog {
type dmix
ipc_key 1234
slave {
pcm "analog-hw"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}
# Control device (mixer, etc.) for the card
ctl.dmix-analog {
type hw
card 0
}
# Direct software mixing plugin for digital (S/PDIF) output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.dmix-digital {
type dmix
ipc_key 1235
slave {
pcm "digital-hw"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}
# Control device (mixer, etc.) for the card
ctl.dmix-digital {
type hw
card 0
}
Links
- Fedora ALSA mini HOWTO
- ALSA Digital Out info
- SPDIF digital wav files
- Fedora Myth(TV)ology
- Streaming MythTv to your cell
- /usr/local/bin/myth3gp %DIR%/%FILE% %STARTTIME%~~~%TITLE~~~%SUBTITLE%"
- Stream MythTv recordings using MythWeb: Contains useful transcode information
- Nuv2Disc for creating DVDs of Myth recordings
- MythBurn to write recorded shows to DVD
- Tapeworm: "A MythTv parasite for Windows"
- MythDora: An all in one CD installation of MythTv on Fedora Core 4.
- MythTv mailing List Forum
- ffmpeg documentation
- Examples:
- -formats: Show available formats, codecs, protocols, ..
- ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
- Mythtranscode documentation
- Xine Video Player