[mythtv-users] My experience with MythTV on a day-to-day basis

Yeechang Lee ylee at pobox.com
Sun Jun 11 07:43:13 UTC 2006


(This is part of an occasional series on how I've successfully [or
unsuccessfully] accomplished something in MythTV on my Fedora Core
4-based frontend/backend system using the ATrpms packages. I will
assume that readers can do basic Linux tasks, such as install RPMs,
edit /etc files, and generate xorg.conf. I hope to cover the mystery
areas where others may most often fall astray in.)

mythtv-users often makes depressing reading. Having done so daily for
the past six months, I find that 90% of messages can be filed into one
or more of these categories:

* "I've neither bothered to read the extensive online tutorials and
  walkthroughs, nor have I searched the comprehensive mailing-list
  archives or the Wiki. Thus I will ask a question that others hashed
  out just two days ago."
* "I top post and can't be bothered to only quote relevant portions of
  preceding messages."
* "I bottom post and can't be bothered to only quote relevant portions
  of preceding messages."
* "This message has nothing whatsoever to do with MythTV, but I will
  ask it here because I can't be bothered to find some more
  appropriate venue and believe that prefixing the subject line with
  'OT:' will magically make it right and proper."
* "I will say nothing of my particular financial circumstances,
  computing knowledge, or personal preferences, but nonetheless
  request recommendations on the 'right' set of hardware components to
  build a MythTV box."
* "My MythTV setup was working great. I then [made a major change to
  the box] without backing up and now nothing is right. WHY WON'T IT
  WORK?!??!"
* "I am trying to get a [grossly-underpowered CPU] to play HD video
  without XvMC. WHY WON'T IT WORK?!??!"
* "I am trying to get a [totally-unsupported video card] to play HD
  video. WHY WON'T IT WORK?!??!"

. . . And so on. I wouldn't blame anyone who's considering MythTV from
being scared off for life after perusing the list for a while.

Let this posting be a small bit of antidote. Let this offer hope to
those interested in MythTV and to those who have earnestly done their
research but are yet stuck somewhere short of the promised land. Let
me tell one and all of what I with 100% reliability[0] do with my
MythTV setup every day:

* Push a button on the remote to wake the 37" LCD panel from its DPMS
  slumber.[1]
* Pick from a gigantic library of high-definition programs that MythTV
  constantly adds to based on my choices.[2]
* While playing the program, rewind, fast-forward, and jump to
  arbitrary points as desired.[3] I can also adjust the playback speed
  anywhere from 0.5X to 2X without affecting audio pitch.[4]
* I can push a button to instantly and accurately skip over
  commercials.[5] If I've gone too far, another button will skip me
  back to the previous spot.
* If I exit a recording, the next time I watch it the playback will
  continue where I left off.[6]
* If I ever need to restart MythTV, pushing a button on my remote
  twice within three seconds will cause it to do so.[7]
* All this time, mythbackend is silently recording yet more for me to
  watch.

Let me tell you, future MythTV devotees, that having long ago arrived
at this stage, *IT IS WORTH IT*. Boy, it's worth it. What I can now
take for granted is so, so, so worth the (relatively minor, by
contrast) financial and time expenses that there's no comparison. So,
to those who are stumped and to those who haven't gotten far enough to
be stumped, all I can say is: Keep going!

--------------------------------------------

And now, here are the lengthy footnotes. Note that they are meant to
add detail, not disclaimers:

[0]For the few caveats to this statement, see "My experience with
MythTV annoyances," now playing at a list archive near you.

[1]The same button also puts it to sleep. Yes, I know I could push any
  button on my remote to wake the display from DPMS sleep, but being
  able to use the same button for both is more intuitively correct and
  b) I don't want mythfrontend to do whatever another button would
  cause it to do.

  The incredibly-kludgy shell script I use is:
-----------------------------------
#!/bin/sh

if [ `cat /tmp/mythsleeptogglestatus` == "off" ]
then
    xset dpms force on;
    echo "on" > /tmp/mythsleeptogglestatus
else
    sleep 1;
    xset dpms force off;
    echo "off" > /tmp/mythsleeptogglestatus
fi
--------------------------------
  Like I said, it's kludgy, but hey, it works. A dunce cap to the
  first person who asks why I don't simply use 'xset dpms force off'
  and nothing else without actually bothering to find out firsthand
  why.

[2]I rarely watch anything but high-definition programming. As I've
  previously written, here in the US there is no shortage of HD
  programs. Here is my Custom Search SQL query, named "HDTV movies."
  As the name says, it pulls up all the high-definition movies in the
  DataDirect scheduling feed:

(channel.callsign LIKE 'HBOHDP%' OR channel.callsign LIKE 'STRZHDP%'
OR channel.callsign LIKE 'MAXHDP%' OR channel.callsign LIKE 'SHOWHDP%'
OR program.hdtv > 0) AND program.category_type = 'movie'

  Why don't I just use program.hdtv > 0 and nothing else between the
  parentheses? Because I've found that the premium-movie HD channels
  don't always label HDTV movies as such. Unfortunately, the above
  approach also gives me the occasional movie on these channels that
  isn't in HD. CineMAX HD is the worst at this; it recently broadcast
  Superman II in HD but not Superman. False advertising, I say.

  Similarly, here's the query ("HDTV non-movies, non-series") I use
  for the likes of PBS, Discovery HD, and HDNet specials:

(channel.callsign LIKE 'HBOHDP%' OR channel.callsign LIKE 'STRZHDP%'
OR channel.callsign LIKE 'MAXHDP%' OR channel.callsign LIKE 'SHOWHDP%'
OR program.hdtv > 0) AND program.category_type != 'movie' AND
program.category_type != 'series'

  I set these custom-recording profiles to anything but "Do not record
  this program," then also "Inactive." Then, every two weeks I go to
  Manage Recordings|Set Priorities. For each of these two profiles, I
  view all episodes, then push '2' to alphabetize and remove
  duplicates. I pick the programs I am interested in. Here's the
  tricky part: I can't simply record these programs as I'd do anywhere
  else in MythTV, because these aforementioned dummy recording
  profiles I'm only using to view the SQL query results already have
  "grabbed" them and pushing 'R' to record would, in fact, kill the
  dummy profile. For premium- and network affiliate-channel movies, I
  again view all episodes for the program, pick a non-HD showing
  (which the dummy profile thus didn't grab), then pick "Record one
  showing of this title." Since I've set the HD channels in my lineup
  with a higher priority than their non-HD counterparts [see Setup|TV
  Settings|Recording Priorities|Channel Priorities], MythTV will
  automatically pick a HD version of the movie to record, bypassing
  the "grabbing" issue. For movies and other programs without a non-HD
  counterpart, I don't have a better solution than to, after viewing
  all episodes, picking an airing that seems less likely to interfere
  with others (generally after 4am and before 6pm), then "Record
  anyway." Suggestions appreciated. The ideal solution here, of
  course, is to either a) permit a recording profile to be live, but
  inactive, without the need for it to be set to record anything, or
  b) add a "Use only to search" choice to recording possibilities.

[3]I didn't learn until I'd had my MythTV box running for weeks that
  the "I" key permits random jumps. Both '100I' and '75I', for
  example, will jump to one hour and 15 minutes into the
  program. Similarly, '7->' will jump seven minutes forward.

  This also brings us to two minor glitches I've found in my MythTV
  setup:

  a) *All* HD recordings from the premium-movie channels have
     incorrect recording time lengths. A two-hour recording will
     typically show a total recording time of about 1:40, although the
     recording is complete with no missing chunks. For example, a
     snippet of _The Paper_ recorded from Showtime HD that, according
     to my watch, took 30 seconds to play, will according to the OSD
     have taken 26 seconds. This issue does *not* exist with
     recordings from any other source, whether 1080i/720p
     broadcast-network affiliates, 1080i all-HD channels like HDNet
     and Discovery HD, or analog cable channels. I presume it has
     something to do with the difference between films' 24fps and the
     NTSC/HD 29.97/59.94fps refresh rates.

  b) Fast-forwards at 5X or faster, and rewinds at 3X or faster,
     freeze after a few seconds' worth of fast-forwarding or
     rewinding. 3X fast-forwards seem to work indefinitely. Left/right
     skips (what I normally use, anyway) work fine.

[4]I am embarrassed to admit that I didn't discover this feature until
  a full six months after installing MythTV. It works remarkably well!
  I note that the TOGGLESTRETCH function in Setup|Edit Keys|TV
  Playback doesn't seem to do anything, even when bound to a key.

[5]I find that "Logo Detection" and "Strict Commercial Detection" work
  remarkably well in detecting commercials properly. I do see these
  settings fail on (most) UPN standard-definition and (about half of)
  WB programs; I think it's something to do with these networks' logos
  and how they stand out, or don't, from the picture.

[6]Setup|TV Settings|Playback|Action on playback exit really, really,
  really ought to be set to "Save position and exit" by default. TiVo
  has it this way and, I don't think there's even an option to make it
  worth otherwise; a decision I agree with.

[7]In my experience, mythfrontend has been very, very reliable and I
  never actually have to do this. The very few times it's crashed it's
  killed itself rather than freezing up. Since mythfrontend is the
  last program my GDM login startup script executes, killing it kills
  the entire login session and takes me back to the GDM login screen,
  where I have it set up to autolog back in within five seconds.

  Time for another kludgy shell script. This kills mythfrontend if
  executed twice (as in the remote button being pushed twice) within
  three seconds:

-----------------------------------------
#!/bin/bash
PROG=mythfrontend
STATUS=`ps -e | grep $PROG | grep -v grep | wc -l | awk '{print $1}'`

if [ `echo $DISPLAY | grep -c ":0"` -ge 1 ]
then
    if [ $STATUS -eq 0 ]
    then
        ( $PROG & )
    else
        
        if [ -a /tmp/mythpowerbutton-off ]
        then    
                touch /tmp/mythpowerbutton-on;
                exit;
        else    
                touch /tmp/mythpowerbutton-off;
                sleep 3;
                if [ -a /tmp/mythpowerbutton-on ]
                then
                    rm -rf /tmp/mythpowerbutton-o?
                    killall $PROG
                fi
                rm -rf /tmp/mythpowerbutton-o?
        fi
        rm -rf /tmp/mythpowerbutton-o?
    fi
fi
exit 0
--------------------------------------------------

-- 
Yeechang Lee <ylee at pobox.com> | +1 650 776 7763 | San Francisco CA US


More information about the mythtv-users mailing list