Next Previous Contents

11. Using MythTV.

NOTE to Red Hat/Fedora users:Red Hat Linux and Fedora Core ship with Gnome as the default desktop environment. However, Gnome seems to have issues with window focus and window switching which sometimes cause mythfrontend to obscure the video. KDE does not seem to have any such issues. Therefore you will need to switch to KDE by selecting RedHatMenu>Extras>System Settings>Desktop Switching Tool and choose "KDE".

11.1 Keyboard commands

The keys.txt file describes what the various keyboard commands are. If you have loaded mythweb, you may change the default keys to your liking.

mythfrontend


Arrow keys used to move the highlight point around
ALT-F4 exit out of the application
Space/Enter take action on the item under the highlight point
P play in both "Watch a Recording" and "Delete a Recording"
D delete in both "Watch a Recording" and "Delete a Recording"
U to view details for the currently selected show on the Watch or Delete screens, EPG, "Program Finder", "Fix Scheduling Conflicts" or search results screens
O to list the upcoming episodes for the currently selected show on the EPG, "Program Finder", "Program Recording Priorities", "Fix Scheduling Conflicts" or search results screens
I edit recording options from the EPG, "Program Finder", "Program Recording Priorities", or "Fix Scheduling Conflicts" screens. From the Playback and Delete screens, 'I' presents options for recorded shows such as Auto Expire or Stop Recording. Pressing 'I' while on the Recording Options screen will take you to the Advanced Recording Options screen.

Watching TV or a recording


Up or down keys change the channel
num pad Type a number to enter a channel number or jump amount (HHMM format)
P pause / play. You may also add an explicit keybinding for 'Play' through MythWeb, returning you to normal speed if you are in slow motion, rewind fast forward or pause mode.
C change inputs on TV Tuner card
ESC quits
I puts the On-screen Display up again. During playback, 'I' toggles between position and show description info. If a jump amount is entered, jump to that position.
M brings up the electronic program guide (Grid) -- see the EPG section
Page Up jump back the configured number of minutes (default is 10)
Page Down jump ahead the configured number of minutes (default is 10)
End or Z skip to next commercial break marker
Home or Q skip back to previous commercial break marker
T toggle close caption support
F rotate between the various Picture Adjustments (Colour, Hue, etc.) While Picture Adjustment is on-screen, use Left and Right arrows to adjust. These settings adjust the look of the video playback, and are independent of the G-key settings used at record-time.
[ or F10 decrease volume
] or F11 increase volume
| or F9 toggle mute
/ jump to the next "favorite" channel
? mark/unmark the current channel as a "favorite"
U increase the play speed
J decrease the play speed
A Adjust time stretch (speed up or slow down normal play of audio and video
W cycle through 4:3 aspect ratio, 16:9, 4:3 Zoom (like Pan and Scan), 16:9 Zoom, and 16:9 Stretch (eliminates black sidebars in TV signal)
F8 toggle the sleep timer 30m->1hr->1hr30m->2hr->Off
CTRL-B Jump to the beginning of the recording / ringbuffer
Left (if a jump amount is entered) to jump back that amount
Right (if a jump amount is entered) to jump ahead that amount
Without the stickykeys option selected
Left rewind the configured number of seconds (default is 5)
Right fast forward the configured number of seconds (default is 30)
< starts rewind mode as if stickykeys are selected
> starts fast forward mode as if stickykeys are selected
With Stickykeys option selected
Right starts fast forward mode
Left starts rewind mode
In fast forward or rewind mode:
Left/Right increases the ff/rew speed
0 plays at normal speed, but leaves the time indicator on screen
1 or 2 plays back more slowly than normal ff/rew speed (1 is slowest)
3 plays back at normal ff/rew speed
4-9 plays back faster than normal ff/rew speed (9 is fastest)
Space exits fast forward or rewind mode
While video is paused:
Left rewind 1 frame
< rewind 1 second
Right advance 1 frame
> advance 1 second

Watching TV only


G rotate between the various Picture Adjustments (Colour, Hue, etc.) for recording. These values affect the look of the resulting .nuv file, and are independent of the playback picture settings. While Picture Adjustment is on-screen, use Left and Right arrows to adjust.
H Channel history. Each repeat steps back through the previous channels.
O Turns on 'Browse' mode, allowing user to browse channels and program info while watching current show FullScreen.
Y switch between multiple capture cards.  NOTE:you will lose your LiveTV buffer on your current card. Useful for different-sourced cards (such as Dish Network on one, HDTV over-the-air on another card.)

LiveTV Browse Mode


Left browse program prior to current listed program
Right browse program following current listed program
Up browse program on channel above current listed channel/program
Down browse program on channel below current listed channel/program
/ browse program on next favorite channel
0-9 enter a channel number to browse
Space/Enter change channel to channel of current listed program
R/r Toggle recording of current program (cycles through types)
ESC/O Exit Browse mode

Playback Recording Zoom Mode


Left Move video to Left
Right Move video to Right
Up Move video Up
Down Move video Down
PageUp Zoom In
PageDown Zoom Out
Space/Enter Exit Zoom mode leaving picture at current size and position
ESC Exit Zoom mode and return to original size

If you have two or more tuner cards


V toggle Picture-in-picture on or off
B toggles the window focus (lets you change channels on the PiP window)
N swaps the two channels by changing channels on both cards

Watching a recording only


Space/Enter set a bookmark at that point. Next time you start the recording, you will automatically jump forward to this point and clear the bookmark.
X queues the current recording for transcoding
O brings up menu to allow toggling settings such as Commercial Auto-Skip, Auto-Expire, etc.
D exits the current recording and displays the Delete menu
E or M enters/exits edit mode.
In edit mode
Left/Right move forward and backward
Up/Down alter the amount of time you jump forward and backward. Increments are: nearest cutpoint, nearest video keyframe, 1 frame, 0.5 seconds, 1 second, 20 seconds, 1 minute, 5 minutes, and 10 minutes.
PageUp/PageDown move forward and backward to the nearest cut point
< or > move forward or backward by 10 times the normal jump amount
Space/Enter allows you to set or delete a cut point
Z loads the commercial skip list (if one exists) into the cutlist
C or Q clear all cut points in the cutlist
I Inverts the cutlist

EPG


Arrows are used to move the highlighted program point around
A, D, S, W perform the same as left, right, down and up
PageUp/PageDown move the channel list up or down a page
Home/End move the highlight left or right by one day
Ctrl+Left or < move the highlight left by one page
Ctrl+Right or > move the highlight right by one page
9, 3, 7, 1 (like a numeric keypad) perform the same as PageUp, PageDown, Home and End
I bring up more information about a show, and allow you to schedule a recording. If you select "Record this showing" while watching Live TV you can "Instant Record" a program.
Space/Enter allow you resolve conflicts or change overrides. If the program is not already scheduled to record, it will instead act like pressing 'I'.
M when on a channel will change to that channel
ESC or C exits without changing the channel
R change the current item from Recording/Not-Recording. Successive keypresses cycle through the scheduled recording type list.
X change the channel to the currently selected channel without leaving the EPG (Most useful in the alternate EPG)
? mark/unmark the current channel as a "favorite"
/ or 4 toggle the guide listing between all channels and filtered "favorites"

Setting Program or Channel Recording Priorities


Right increases priority value
Left decreases priority value
1 sorts by title
2 sorts by priority
Home/End toggle sort priority
I edit recording options
ESC commits changes and exits

Viewing Scheduled Recordings/Resolving Conflicts


1 show all recordings
2 show only important recordings
Home/End toggle show showing all/important
I edit recording options
Space/Enter resolve conflict or override

Viewing Search Listings


Home change to the previous view if applicable
End change to the next view if applicable
M select another view if applicable. In the title and description search popup, press M again to edit or delete the selected view.

Recording Profiles Setup Screen


D on a custom profile group displays a popup to delete the group

Recording Groups

In the Watch Recordings screen, Recording Groups allow you to separate programs into user-defined categories, such as "Kids", "Alice", "Bob", etc. This can be used to reduce clutter, or to segregate content if you use the PIN function.

M change the view or to set a group password
I move a program from one Recording Group to another

Watch Recordings Screen


1 or F1 Meaning of the icons
/ Tags a recording. Tagged recordings can be played either in order or shuffled and deleted as a group. You can also change the recording group for several recordings at once by tagging them and using the popup INFO menu to change the recording group.
? Clear the tagged list.

Remote Controls

If you are using MythTV with just a remote control then it is suggested that you map the remote control keys as described below. Your remote control may not have the same set of keys as those named below, the names are only a suggestion that roughly correspond to the function.

If you are adding new key bindings to the program then consideration of this suggested list will help users with remote controls.

This list assumes a minimal remote control that only has 20 keys, nearly all features can be used with this configuration. If you have more keys then you can access all of the features. With only 16 keys most features are usable.

REMOTE CONTROL LIRC KEYSTROKE FUNCTION
0 - 9 0 - 9 channel selection, EPG navigation, ff/rew speed setting (with stickykeys)
Left Arrow Left scroll left, rewind
Right Arrow Right scroll right, fast forward
Up Arrow Up scroll up, channel change up
Down Arrow Down scroll down, channel change down
Select / OK / Play Space Select item, play (with stickykeys) set bookmark
Cancel Escape Cancel, quit playback
Menu m EPG (from watching TV) edit (from playback).
Pause p Pause
Other key 1 i Information
Other key 2 c Change tuner card input

11.2 Using themes with MythTV

MythTV is "themeable", meaning that the visual appearance of the program can be modified by the user without re-compiling or altering the program functionality. The MythTV website has a Themes section; pick a theme you'd like to use and download it to your system.

Once it's on your machine, you must move the file and untar it:

$ su
# cp funhouse.tar.gz /usr/local/share/mythtv/themes
# cd /usr/local/share/mythtv/themes
# tar -xzf funhouse.tar.gz
# exit

The theme will now be available in the mythfrontend Appearance section.

NOTE: if the theme file you downloaded is a bz2 file, use tar -xjf rather than tar -xzf.

11.3 Adding DirecTV information to the database

A script for adding DirecTV information into the database has been written by tarek Lubani mailto:tarek@tarek.2y.net and is available at http://tarek.2y.net/myth/ppv.pl. This is currently an external user-supplied program, so if you have issues with the script, please contact the author.

11.4 Adding support for an external tuner

MythTV supports changing the channel on an external tuner. If you have an external tuner, such as a DirecTV or digital cable set top box, you should add /usr/local/bin/changechannel to your Input Connections in the mythbackend configuration GUI.

The changechannel program is not supplied with MythTV, so this is going to be dependent on what sort of external tuner you have. Example scripts for Sony and RCA receivers can be obtained from http://tarek.2y.net/myth/. This is currently an external user-supplied program, so if you have issues with the script, please contact the author.

Feel free to browse some of what sort of hardware is available at http://shop.store.yahoo.com/snapstreammedia/cablepacks.html, or if you wish to assemble your own, rather than purchase, the following may be helpful: http://www.snapstream.com/products/irblaster/sonydss.htm for cable pinouts for RCA DSS receivers.

11.5 Using Shutdown/Wakeup

What does the MythTV Shutdown/Wakeup function do? The scheduler on the Master backend (MBE) keeps track of the idle status of the entire MythTV system, including the Slave backends (SBE). If it considers the system to be idle, and thus ready to shutdown, it sets the wakeuptime to the time of the next recording and then proceeds to shut down all Slave backends and then itself. Once it is time to begin recording, the Master backend and the Slave Backends are automatically woken up. This system allows MythTV to record like a normal VCR, thereby conserving power when not in active use.

In order to use the Shutdown/Wakeup function there must be some method of waking up the Master backend. There are any number of solutions, but we will discuss in detail two possibilities:

A deeper look into the operation

The scheduler keeps track of the idle status of the MythTV system. To determine whether or not the MythTV system is idle, the following conditions must be met for a period of time defined in the "Idle timeout (secs)" parameter.

If we get to this idle state the Master backend will set the wakeuptime using the "Set wakeuptime command", which is the same for WOL and BIOS wakeup. The Master backend will then shut down the Slave backends and itself using the "Server halt command".

One caveat is that the scheduler tries to guess if the Master backend was started by a wakeup call or by the user. If it thinks it was woken up by a user, it blocks shutdown until a client connects to the Master backend, after which it will behave as described above. To disable this feature, unset "Block shutdown before client connected" in the mythfrontend Setup->Setup->General screen.

Once it is time to startup the system, the Master backend is woken up first and will wakeup the Slave backends using the "Wake command for slaves". At this time, there is no support for starting only the required Slave backend, so all Slave backends will startup.

Setting up the MythTV side of this extension.

There are a number of options that are used to control the Shutdown / Wakeup feature.

Shutdown/Wakeup Options:

The "WakeOnLan settings": These settings have nothing to do with using BIOS or WOL wakeup, they are the same for both.

Using WOL to wake your Master backend.

To use WOL to wake your Master backend you will need a WOL capable Master backend, a machine that runs 24/7 which can execute an at-job and nc (netcat) on the Master backend. I use some little bash scripts to make my DSL router wakeup my mythbox if required.

Replace $SERVER and $PORT with your own settings! On my Master backend I have a script that gets called as 'setwakeuptime command' which looks like the following:

#! /bin/sh
echo $@ | nc $SERVER $PORT
This simply cats the parameters (that is $time) to my 24/7 server. On my $SERVER I have (x)inetd listening on $PORT starting a little script which cares about setting the at-job. The following additions are necessary on the $SERVER:

If you use inetd:

In /etc/inetd.conf add:

mythwake stream tcp nowait mythtv /usr/sbin/tcpd /usr/local/bin/mythwake
If you use xinetd, save the following as mythwake in your /etc/xinet.d/ directory:
service mythwake
  {    
        socket_type     = stream
        wait            = no
        user            = mythtv        
        protocol        = tcp
        id              = mythwake
        server          = /usr/local/bin/mythwake
  }
and add the following to /etc/services:
mythwake        $PORT/tcp

Finally, /usr/local/bin/mythwake looks like:

#! /bin/bash
#this should be a command to wake your server
WAKECMD="#!/bin/sh\n /usr/local/bin/wakeMBE"
#first we need to delete all wake jobs in queue
for JOB in atq | cut -f 1 ; do
    atrm $JOB;
done
#now we read the date from 'nc'
read date;
#now set the atjob
echo -e "$WAKECMD" | at $date ;
SECURITY WARNING: Be sure to secure $SERVER:$PORT from untrusted networks, because this allows 3rd parties to run arbitrary code on your server!

Using BIOS wakeup to wake your Master backend.

Since I don't use this, I cannot say much about this. If your motherboard supports any wakeup tool you have to call that tool as "Set wakeuptime command" with the "Wakeup time format" suitable for that tool.

Wakeup the MySQL server using WOL

If your MySQL server and your Master backend are not on the same machine, you can have the Master backend wake your MySQL server using WOL. You will find the settings for this in the second page of the setup program, or at the end of mysql.txt. The meanings are the same as discussed in "The WakeOnLan settings" above.

Tips/Tricks:

If, for example, one of the Slave backends is also your desktop computer, you could simply use a little script as 'server halt command' which first calls /sbin/shutdown -t TIMEOUT where TIMEOUT is a value sufficient for you to react. You could then popup a window using *dialog, asking for permission to shutdown. If you cancel the shutdown, simply call /sbin/shutdown -c.

If you get "nvram-wakeup: /dev/rtc: Device or resource busy" your set-wakeuptime-script should stop the program that uses /dev/rtc before setting the wakeuptime.

11.6 Scheduling Recordings

The MythTV master backend is responsible for managing the schedule for all TV tuner cards on the master and any slave. It's job is to search the TV listing for the shows you have requested and assign recordings to the TV tuner cards. If none of the shows that you've chosen overlap, it simply records all of the shows. However, if there are shows where the beginning and end times overlap, the scheduler follows rules that you've specified or makes logical decisions about what would be best if you haven't express your preference. Further, the "Upcoming Recordings" page allows you make specific decisions about what you really do and don't want to record.

Record Types

When you choose a show that you would like to record from the Options Page, there are eight different types of rules to help the scheduler find which showings you would like to record.

Duplicates

Singles will record without regard to duplicate matching.

The standard recurring methods of All, Channel, Weekly and Daily use the descriptive information in the TV listings to try to record only one showing of each unique episode. However, This goal is sometimes complicated by the fact that the stations may not include a description for a specific episode but use a generic description for the series instead. When there is a generic description, the default behavior is to assume that it may be an episode that you have not seen and to record it for you. One of the duplicate matching options is "Record new episodes only". If this is selected, listing that have an original air date of more than 14 days earlier are considered repeats and are not eligible to record. Generally, generic episodes will be marked as repeats also.

Because of generic episodes and other situations, MythTV offers an alternative approach where shows may be recorded by choosing from multiple showings even when the descriptive information is not reliable. All of the "Find" record types look for matching titles in the listings. If there is a showing with specific episode information and that episode has recorded before, that showing is marked as previously or currently recorded. The scheduler will then choose to record the earliest non-conflicting showing from any of other remaining showings regardless of the descriptive information. Generally, Find One is most useful for movies or specials and the Find Daily and Find Weekly rules are best for news or current events shows that are repeated. However, these may be useful in other situations where the standard recording rules may not work correctly.

Conflicts

As you add more shows that you would like to record, the scheduler will eventually encounter conflicts. If there are two shows at the same time and you have two or more TV tuner cards, both shows will record. However, if there are more shows than cards, the scheduler will have to decide what it thinks it should not record based on the information you have given. If you see an unexpected situation you are not "stuck" with the scheduler's choice. You can still tell the scheduler exactly which shows you do want to record and/or don't want to record in any situation.

Priority

By default, all shows you select are have equal value to the scheduler. There are a set of rules to to make good choices when two or more shows are in conflict. However, priority values let the scheduler know what you want so that it can set the schedule based on your preferences.

Initially all priority values are set to zero. You may choose to leave everything at "0" and let the scheduler follow rules to guess what you might prefer when there are conflicts. However, if you have one or two favorite shows, you may want to increase the priority value so the scheduler will know that you would prefer recording these over other shows. You might use certain values to rate shows so that all favorites are 2. good shows are 1 and extra 'filler' shows are all -1 for example. You could sort each title on the "Set Priorities" to have a unique value so the scheduler can always know which show you'd prefer verses any other show. The choice and style are entirely up to you. However, the more information you give to the scheduler, the more likely it will make the choices you would like in the first place.

The scheduler choices are based on the total priority for a showing by adding up four different priority factors. By default, all of these factors are "0" but you may use any combination to express your likes and needs.

Per record rule -- this is the "priority" field in the "Scheduling Options" section of the options page and this values is included for any showings that match the recording rule. You may choose to only use these values and not use the other factors for the sake of simplicity and clarity.

Per record type -- Setup->TV Settings->Recording Priorities->General allows you to add to the priority based on the type. It may make sense to increase the value for "Single" so that by default they have an extra advantage over other shows. You may want to decrease the value for Find rules so that they will be less likely to interfere with regular shows and will be more likely to record in a non-conflicting time instead.

Per channel -- Setup->TV Settings->Recording Priorities->Channel Priorities can be useful if you believe that you prefer any of the shows on certain channels. This would give all shows on a channel an advantage by default.

Input preference -- in the MythTV "setup" program, the "Input Connections" section allows you to add additional priority in the "Input preference". This is simply another priority factor but has an interesting effect. If a card input has a higher value than the other cards, the scheduler will see that you would rather record showings of episodes on this card rather than a showing on another card. If you have multiple cards of different quality, you may want to set input preference to encourage the scheduler to record shows on your best card(s) whenever possible. This can also be useful if you have multiple video sources which include the same stations. For example, with digital and analog cable you could increase the digital cable input preference by 1 to tell the scheduler that you want to record from the digital station whenever possible but the station on the analog input could still be used when the digital input is busy.

For any single showing of any show you've chosen to record, these factors are added together to find the "total priority". This is the priority that the scheduler uses to decide which shows are given the first choice when filling in the schedule.

Scheduling decisions

Here are the actual decisions made by the scheduler as it fills in the schedule.

Reschedule Higher Priorities

Setup->TV Settings->Recording Priorities->General has a checkbox for "Reschedule Higher Priorities" which tells the scheduler to try to be a little smarter in certain situations. If this is checked, the scheduler will look for situations where a show cannot record because all inputs for the channel are used for higher priority shows. It will check to see if any of the other shows could be recorded at another time so that the conflicting show can be recorded in it's place.

Generally, this is a good strategy but there are tradeoffs. If a higher priority show is postponed, you will not get to watch it until it is recorded in the later timeslot. There is also a risk that the TV listings may change and the later showing may go away. In this rare case the higher priority show may never record. On the other hand, if you do not use this option you will miss recording some lower priority shows unnecessarily unless you make similar these changes manually.

By using Reschedule Higher Priorities, the scheduler will do a better job of recording as many of your shows as possible when left unattended. It will also be easy to see that shows have been marked to record at a later time. You can then decide for yourself when you would prefer to record the first showing.

Controlling Your Schedule

The Manage Recordings->Upcoming Recordings page is your control center for the MythTV scheduler. Unlike other DVR systems, this one page gives you all of the information and tools you need to see all of your alternatives and make whatever adjustments you desire.

The upper half of the screen has a scrollable box listing items that match your record rules sorted by time. The lower half shows the details for the highlighted item. There are two 'views' available. Press "1" to include all of the items that match record rules even if they do not need to be recorded. Press "2" to focus on just the things that will record and items that may need your attention. The message in the upper right-hand corner will remind you when there are conflicts that would prevent one or more shows from being recorded.

The items in the list are colored white for things that will record, gray for those that do not need to record and yellow when there is a time conflict. Items at the top of the list may also be highlighted indicating that the recording is in progress.

Along with the channels, start times and titles, the right-hand column has a status code. Numbers indicate which card number has been assigned to record the show. Letters are used to indicate the reason that something will not be recorded. Just below the box is a short status message for the highlighted item that indicates the type of record rule that was matched and a one or two word explanation of the status code. If you press SELECT, you will see more information about the status.

There are a few status codes that may require your attention. "C" indicates that there are more overlapping shows to record than there are TV tuners to record them. "L" indicates that the scheduler found that it may be better to record a later showing of this episode. These states happen as a result of your choices and should normally reflect your preferences. However, you may notice situations where you would like to modify the scheduler's initial choices.

The first thing you can do is to highlight an item and press INFO once or twice to see the Recording Options page. From this page you can change the record rule type, the duplicate matching rules, or raise or lower the priority to resolve whatever problem you noticed.

Additionally, you can treat any individual showing as an exception that you do want to record or don't want to record. To use these "override" features, highlight the item and press SELECT. You will see a message explaining the current status and at least an "OK" button to exit without making changes.

For items scheduled to record, there will be a button for "Don't record" which will prevent recording this showing but will still allow the same episode to record in the future. If there is episode description information, you may also see a button for "Never record". This prevents recording this showing and tells MythTV to remember that this is an episode that you've seen or don't need to see if it is ever in the TV listings again.

For items that are not scheduled to record, the message will describe the reason and in the case of "C" or "L" it will include a list of the shows that are scheduled to record instead. For any item that could potentially be recorded there will be buttons for "Edit Options" and "Add Override". "Edit Options" will allow you to change the options for the existing record rule such as raising the priority so that the show will record. These changes would apply to this and all future showings that match this record rule. "Add Override" will allow you to set options that apply to the specific showing without affecting the existing record rule.

If you return to an override page after an override has already been set, you will also see a "Clear override" to undo your changes. This option makes it very easy to try out some "what if" attempts when deciding on your best strategy in a difficult situation.


Next Previous Contents