[mythtv-users] Good system design documentation?

Michael T. Dean mtdean at thirdcontact.com
Sun Jun 5 05:05:51 UTC 2005

Steve Tate wrote:

> On Fri, 3 Jun 2005, Michael T. Dean wrote:
>> Steve Tate wrote:
>>> (which is why I'd want the tuner in the frontend box in the first
>>> place)?  And then I'd have problems using the remote control from the
>>> PVR-250 as well...   I'd really like a RAM-based ringbuffer for live
>>> TV, so that doesn't hit the network at all,
>> You could do the same with a HDD-based ring buffer.
> Not if my system doesn't have a HDD!  :-)

True.  You may have a completely diskless frontend, although the backend 
will need access to a HDD (either local or via a network filesystem).  
Remember that the tuner card will be on the backend and that the backend 
is used to "capture" both recordings and LiveTV.  If you have a combined 
frontend/backend, it will need access to a filesystem--perhaps a network 
filesystem--to save recordings.

>> Remember that MPEG-2 video will take up at least a GiB/hr, so you'd 
>> have to have a 512MB area of memory dedicated to the LiveTV Ring 
>> Buffer (i.e. above and beyond the memory required to run the system) 
>> to get a half hour buffer.  Besides saving a little wear on a HDD, 
>> the RAM buffer wouldn't provide any benefits (bandwidth is not a 
>> limitation for video playback).
> You're saying that a half hour buffer is small?????

More trying to say that dedicating 512MB above and beyond the RAM 
required to run the system exclusively for use as a LiveTV buffer is a 
lot.  (I will admit, though, that I have 5GiB on the same filesystem 
used for my recordings allowed for my LiveTV buffer--and I haven't 
watched LiveTV since I set up the Myth box.)  Also, it may not be the 
most efficient use of the RAM (considering how little LiveTV you'll 
probably watch once your set up a Myth box and the way that Myth's 
buffer works (see below)).

(To explain the not-watching-LiveTV part of it:  Once you get your 
recording schedules set, your Myth box will record anything and 
everything you might possibly want to watch, so whenever you sit down to 
watch TV, you have all your favorite shows to choose from and don't need 
to limit yourself to "whatever is on right now."  Also, by setting Myth 
to record even those things you want to watch "live" (as they're being 
aired), you don't have to worry about accidentally missing the beginning 
because you got home late from work thanks to bad traffic or 
something--as a matter of fact, getting home late becomes an advantage 
as you can enable timestretch or at least skip the commercials if you 
start watching 15-20 minutes after the start of a 1-hour show.)

> I'm having a hard time imagining any situation where I'd want to 
> rewind live tv that I
> was watching by more than 30 seconds or so.  I mean, how long does it
> take to grab a remote after you say "what did he say?" or "was that a
> wardrobe malfunction?"

Oh.  Just wait until that day when you're sitting there thinking about 
the ice cream in the freezer and--just after promising yourself you'll 
get some at the next commercial--you realize, "Hey, I can just pause it 
and get my ice cream now!"  And, if watching LiveTV, you have the added 
benefit that doing so allows you to skip some of the upcoming 
commercials (since you're a few minutes behind real time).  And then 
there's pausing to answer the phone, which is followed by 3 or 4 other 
interruptions--during which time you've had Myth paused for 40 minutes 
and never had to worry about missing anything...

> Ideally, I'd say that you'd get maybe a
> minute or two in RAM, and then if you hit pause or rewind or something
> then you'd hit the disk for a larger buffer.  But anyway, that's just
> something else for me to play with, I suppose...

Currently, Myth buffers video once to a file.  Since Myth runs on *nix 
systems, it's quite easy to set up an area of memory as a filesystem for 
Myth to use, but you wouldn't have any "overflow" capability.  Once the 
RAM-based filesystem is filled with LiveTV, Myth would begin overwriting 
the beginning of the ringbuffer.  And, for recordings, if using a 
RAM-based filesystem, Myth would stop recording once filled.

However, a 2-step buffer (one large buffer to disk and one small 
second-stage buffer in RAM) probably adds little benefit to the current 
setup.  Although it could save you re-downloading the last 30-seconds of 
video you mentioned, that's not much of a savings overall.  Assuming a 
bitrate of 2500kbps, 30 seconds is just over 9 megabytes of data.  And, 
since you'll need to download the whole program (at about 1.2 gigabytes 
per hour) over the length of the program (minus commercials you skip), a 
few more megabytes here and there is a small percentage of the total 

Put another way, a recording rate of 2500kbps is 2.5Mbps, which is not a 
large portion of a 100Mbps ethernet connection (even considering actual 
throughput of the network).

>>> Anyway, maybe some of those questions are confused, but it's mainly
>>> because I have a very poor mental image of the mythtv architecture,
>>> and can't find any documentation that explains this.  Does anyone know
>>> of something decent that's out there for me to read?
>> IMHO, the best way to learn is to set up your system.
> Yep, I've decided I just need to "take the plunge" and start mucking
> around with it.  The funny thing about all this is that I really don't
> watch TV, so would never consider buying a TiVo

I didn't watch much TV before, but having my choice of whatever TV I 
wanted when I wanted made it much more interesting.  This season I 
watched more TV shows than ever (although I will admit this was probably 
the best season in at least 10 years).  However, thanks to Mark Spieth 
(and his timestretch patch), I was able to do so while spending less 
time watching TV than before.  (When playing back a recording at 1.75x, 
I can watch a 1-hour show in 24 minutes!)

> -- I'm interested in
> this just because the technology looks very cool to play around with.
> I just wanted a clear picture so that I didn't spend lots of money and
> then later decide "Oh, I really don't want to do it like that..."

Yeah, but on the bright side, all of the computer equipment you buy for 
a Myth box is useful in other applications, with the exception of the 
tuner cards.  So, if you decide Myth isn't for you, at least you walk 
away with a fully functional computer.  If you try out a TiVo and decide 
it isn't for you, you walk away with a set-top paperweight and a useless 
subscription.   ;)

I think you'll be amazed at how much a Myth box changes your TV-watching 
habits (and TV-watching experience).  I completely agree with you on the 
technology part of it, though.  I've been saying for years that I have 
no need to upgrade to HDTV because SDTV is good enough for me--I watch 
TV for the stories, not the pictures--but here I am spec'ing out 
antennae, planning how to deal with my homeowner's assoc when I become 
the first resident to put up an outdoor antenna, and trying to figure 
out how to set up a storage array that allows me to make use of my 4 
pcHDTV 3000's...  All the time the timestretch functionality is saving 
me I'm putting into trying to make my Myth box better--all the while 
pushing the technology (or at least my understanding of it) farther...


More information about the mythtv-users mailing list