[mythtv-users] An option for watching tv

f-myth-users at media.mit.edu f-myth-users at media.mit.edu
Wed Nov 29 04:49:23 UTC 2006


    > Date: Tue, 28 Nov 2006 19:42:29 -0500
    > From: "Dylan Semler" <dylan.semler at gmail.com>

    > On 11/28/06, Brian Wood <beww at beww.org> wrote:
    > >
    > > If I wanted to do what you describe I'd buy a cheap frame-grabber
    > > card and just have a TVTIME or XAWTV window. Using Myth to do that is
    > > like swatting a fly with a howitzer.

    > From what I'm understanding, the OP doesn't want his live-tv watching to
    > conflict with recordings.  With this feature, one would be able to keep the
    > tv on all the time without having to manually turn it off when recordings
    > begin, as this conflict would be resolved in mythtv's normal manner.  While
    > I have absolutely no use for such a feature, it would at least be a
    > funcionality that no other app/dvr could do.

    > Furthermore, in the case of one who wants the TV on all the time, there
    > would be great benefit in not continually writing/reading/deleting data
    > to/from the disk.

Here's a gross hack that might accomplish this, but it will require
running SVN -after- the Storage Groups functionality goes in (and SG
still might not quite be able to support it):

(a) Create a 500+meg RAMdisk.  [I can hear the groaning starting already...]
(b) Tell SG that LiveTV goes into the RAMdisk's filesystem.  [Is there
    some way of pinning a card to a filesystem?  Or of pinning a rule
    to a filesystem?  Otherwise, you might have to use pliers on it by
    making it believe that all the other filesystems are nonlocal or
    are otherwise of lower desireability, but only for LiveTV.]
(c) Go into the database (I assume it's in the database; I haven't
    checked recently) and twiddle the setting for "how much LiveTV
    will be recorded before opening a new recording file" from 4 hours
    (8 hours?) down to 15 minutes or less (I'm assuming SD resolution
    here).  I don't know if this will work in the face of LiveTV for a
    source that -does- have program data; will it be ignored?  Will
    the "break here" override a longer program?  Easy enough to look
    up or experiment with.

Of course, you'll be running a totally unsupported configuration.  And
you'll eat a 512 memory stick (or portion of a larger one) as your
buffer, even though you really only wanted a few seconds and not 15
minutes.  But it won't thrash the disk heads -or- use up precious PCI
or I/O bandwidth, and if (big if) all my assumptions above are true,
it doesn't require anyone to write any new code.

And this strategy -does- have the advantage of interacting painlessly
and correctly with the scheduler, since if Myth needs to grab the
tuner for a recording, it'll follow the same rules as with "normal"
LiveTV recording, since this -is- a normal LiveTV recording, albeit
on a volatile block device.

(I assume Myth won't get upset if the backend comes up and various
LiveTV recordings it thought were on disk aren't there any more?  No
leftover crap in the database?  Otherwise, booting the machine could
prove...  interesting.  Though it'd be trivial to write a script that
checks once a minute (or whatever) and just records the names of the
RAMdisk LiveTV files to a file on a normal disk, then, on boot and
after the RAMdisk exists again, just touches 0-length files of the
same names on the disk to fake out Myth.  [We don't just want to
record on shutdown in case we crash instead.]  Kluge upon kluge...)


More information about the mythtv-users mailing list