Mailing List Archive

Frames per second?
I have mythtv running great, however it seems certain shows seem like the
frames per second needs a bit of a boost. I notice this the most in shows
where the camera moves around, like sporting events. Is there anyway to
adjust the FPS, or is there a setting I am missing that would help
eliminate this?

Thanks,
Jeff
Re: Frames per second? [ In reply to ]
On Mon, Apr 21, 2003 at 08:46:27AM -0400, jeff@burstable.net wrote:
> I have mythtv running great, however it seems certain shows seem like the
> frames per second needs a bit of a boost. I notice this the most in shows
> where the camera moves around, like sporting events. Is there anyway to
> adjust the FPS, or is there a setting I am missing that would help
> eliminate this?

Is it dropping frames, or does the image look 'torn'? You might need to
turn on the deinterlace filter.

What's your typical cpu usage?

>
> Thanks,
> Jeff

--
Matthew S. Hallacy FUBAR, LART, BOFH Certified
http://www.poptix.net GPG public key 0x01938203
Re: Frames per second? [ In reply to ]
It doesnt appear to be 'torn'. The best I can describe it would be if
playing a PC game on a underpowered pc and the FPS drop under 20 fps or
so. Typical CPU usage is about 60% - 70% when watching live tv. Oh and
the deinterlace filter is one.

--Jeff

On Mon, 21 Apr 2003, Matthew S. Hallacy wrote:

> On Mon, Apr 21, 2003 at 08:46:27AM -0400, jeff@burstable.net wrote:
> > I have mythtv running great, however it seems certain shows seem like the
> > frames per second needs a bit of a boost. I notice this the most in shows
> > where the camera moves around, like sporting events. Is there anyway to
> > adjust the FPS, or is there a setting I am missing that would help
> > eliminate this?
>
> Is it dropping frames, or does the image look 'torn'? You might need to
> turn on the deinterlace filter.
>
> What's your typical cpu usage?
>
> >
> > Thanks,
> > Jeff
>
>
Re: Frames per second? [ In reply to ]
At 03:32 PM 4/21/2003 -0400, jeff@burstable.net wrote:
>It doesnt appear to be 'torn'. The best I can describe it would be if
>playing a PC game on a underpowered pc and the FPS drop under 20 fps or
>so. Typical CPU usage is about 60% - 70% when watching live tv. Oh and
>the deinterlace filter is one.

It is always hard to be certain from these sorts of descriptions (the one
above and your earlier one), but what you describe sounds like the capture
process is dropping frames for some reason. The usual one is that the image
is sufficiently rich in complexity that the encoder can't work fast enough
on one frame before it has to get the next one, so some are lost. In this
context, "complexity" is anything that makes encoding harder to do,
including simple noise (I get a 50% drop rate in frames when there is
nothing connected to the Television input, for example).

Panning motion is a good way to introduce this sort of complexity ... I
don't tape sporting events, but I've seen similar sorts of problems in The
Simpsons, at the beginning where the "camera" (the animation PoV) pans over
the field full of supporting characters, or a bit earlier where sometimes
it pans and zooms to the school for a Bart Blackboard Quote.

If I'm right, I think your only options are (A) get a faster computer or
(B) reduce the pixel size of the capture.

Oh, one thing you should check: when you load the bttv module, are you
including a suitable gbuffers= argument? (I usually use gbuffers=32 with my
non-Myth systems, and I expect I'll do the same when I finally get Myth
running here. If MythTV doesn't work the way I'm assuming here, I hope
someone will correct me.) This can help buffer against brief bursts of
complexity in the frame sequence.
Re: Frames per second? [ In reply to ]
Thanks, I'll try the gbuffers option tonight when I get home.

--Jeff


On Mon, 21 Apr 2003, Ray Olszewski wrote:

> At 03:32 PM 4/21/2003 -0400, jeff@burstable.net wrote:
> >It doesnt appear to be 'torn'. The best I can describe it would be if
> >playing a PC game on a underpowered pc and the FPS drop under 20 fps or
> >so. Typical CPU usage is about 60% - 70% when watching live tv. Oh and
> >the deinterlace filter is one.
>
> It is always hard to be certain from these sorts of descriptions (the one
> above and your earlier one), but what you describe sounds like the capture
> process is dropping frames for some reason. The usual one is that the image
> is sufficiently rich in complexity that the encoder can't work fast enough
> on one frame before it has to get the next one, so some are lost. In this
> context, "complexity" is anything that makes encoding harder to do,
> including simple noise (I get a 50% drop rate in frames when there is
> nothing connected to the Television input, for example).
>
> Panning motion is a good way to introduce this sort of complexity ... I
> don't tape sporting events, but I've seen similar sorts of problems in The
> Simpsons, at the beginning where the "camera" (the animation PoV) pans over
> the field full of supporting characters, or a bit earlier where sometimes
> it pans and zooms to the school for a Bart Blackboard Quote.
>
> If I'm right, I think your only options are (A) get a faster computer or
> (B) reduce the pixel size of the capture.
>
> Oh, one thing you should check: when you load the bttv module, are you
> including a suitable gbuffers= argument? (I usually use gbuffers=32 with my
> non-Myth systems, and I expect I'll do the same when I finally get Myth
> running here. If MythTV doesn't work the way I'm assuming here, I hope
> someone will correct me.) This can help buffer against brief bursts of
> complexity in the frame sequence.
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
Re: Frames per second? [ In reply to ]
Looks like the gbuffers option in bttv has fixed the fps problem. Thanks
again.

Jeff
----- Original Message -----
From: <jeff@burstable.net>
To: "Discussion about mythtv" <mythtv-users@snowman.net>
Sent: Monday, April 21, 2003 4:18 PM
Subject: Re: [mythtv-users] Frames per second?


> Thanks, I'll try the gbuffers option tonight when I get home.
>
> --Jeff
>
>
> On Mon, 21 Apr 2003, Ray Olszewski wrote:
>
> > At 03:32 PM 4/21/2003 -0400, jeff@burstable.net wrote:
> > >It doesnt appear to be 'torn'. The best I can describe it would be if
> > >playing a PC game on a underpowered pc and the FPS drop under 20 fps or
> > >so. Typical CPU usage is about 60% - 70% when watching live tv. Oh
and
> > >the deinterlace filter is one.
> >
> > It is always hard to be certain from these sorts of descriptions (the
one
> > above and your earlier one), but what you describe sounds like the
capture
> > process is dropping frames for some reason. The usual one is that the
image
> > is sufficiently rich in complexity that the encoder can't work fast
enough
> > on one frame before it has to get the next one, so some are lost. In
this
> > context, "complexity" is anything that makes encoding harder to do,
> > including simple noise (I get a 50% drop rate in frames when there is
> > nothing connected to the Television input, for example).
> >
> > Panning motion is a good way to introduce this sort of complexity ... I
> > don't tape sporting events, but I've seen similar sorts of problems in
The
> > Simpsons, at the beginning where the "camera" (the animation PoV) pans
over
> > the field full of supporting characters, or a bit earlier where
sometimes
> > it pans and zooms to the school for a Bart Blackboard Quote.
> >
> > If I'm right, I think your only options are (A) get a faster computer or
> > (B) reduce the pixel size of the capture.
> >
> > Oh, one thing you should check: when you load the bttv module, are you
> > including a suitable gbuffers= argument? (I usually use gbuffers=32 with
my
> > non-Myth systems, and I expect I'll do the same when I finally get Myth
> > running here. If MythTV doesn't work the way I'm assuming here, I hope
> > someone will correct me.) This can help buffer against brief bursts of
> > complexity in the frame sequence.
> >
> >
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users@snowman.net
> > http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
> >
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Frames per second? [ In reply to ]
At 05:34 PM 4/21/2003 -0400, Jeff Burricelli wrote:
>Looks like the gbuffers option in bttv has fixed the fps problem. Thanks
>again.

After I sent this answer, I took a quick look to see where in the MythTV
documentation this was mentioned, since it is kind of basic to getting any
vidcap app working, not just mythtv. I didn't find it anywhere I looked
(though I admit not looking very hard).

So ... Robert ... might it make sense to add a discussion to, say, section
3.2 of the HowTo (which is where I'd look for info on bttv) about
configuration of modules ... at least bttv? Maybe also add something there
referring readers to the later section on btaudio, since that comes up a
lot on this list as well, and it's easy to miss stuff down in "Miscellaneous".
RE: Frames per second? [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> So ... Robert ... might it make sense to add a discussion to,
> say, section
> 3.2 of the HowTo (which is where I'd look for info on bttv) about
> configuration of modules ... at least bttv? Maybe also add
> something there
> referring readers to the later section on btaudio, since that
> comes up a
> lot on this list as well, and it's easy to miss stuff down in
> "Miscellaneous".

Sure; write something up and I'll look at getting it included in the
HOWTO.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPqVT5Pc1NpCTlP0JEQLkwQCfewr7+s9zCF8S3/Or9bWfVSqONewAnj4A
XOBh4mi3P68saX4ghK4vpSQQ
=i787
-----END PGP SIGNATURE-----
Re: Frames per second? [ In reply to ]
FWIW, it took me considerable time (a few days! :-( ) to get my
SAA7143-based card (Terraterc Cinergy 400 TV) to work as well. E.g.
there is a switch oss=1, which seems to switch sound support on (at
least that's what was needed here), but it defaults to off and is
nowhere documented, I found it in the source code (!). I was unhappy, to
say the least.

Here is what I had to do, maybe you want to add that to any possible
how-to or list, given that the saa7134 cards are a good deal now (better
than bt878a, probably):

1. Use kernel 2.4.20, enabled sound and V4L support, but no specific
drivers (IIRC).
2. Use latest (0.2.7) driver from <http://bytesex.org/saa7134/>
3. Add the stuff below to modules.conf (or /etc/modutils/tv,
removing /etc/modutils/bttv and then running update-modules)
4. Any other things I did during these days but forgot now

However, I still have problems with the sound occasionally. It seems
that the first time watch livetv or something records after boot, I get
no sound at all (lost a few episodes, incl. Enterprise, to that :-( ).
If I go to LiveTV, exit, go to LiveTV again, it usually works.
Sometimes, I get no sound at all and have to reboot. I have no clue why
this could be.

modules.conf:
# i2c
alias char-major-89 i2c-dev
options i2c-core i2c_debug=1
options i2c-algo-bit bit_test=1

# saa7134
alias char-major-81 videodev
alias char-major-81-0 saa7134
options saa7134 oss=1
pre-install saa7134 modprobe tvaudio
post-remove saa7134 rmmod tvaudio

# lsmod
Module Size Used by Not tainted
tuner 10848 1 (autoclean)
saa7134 59008 0 (autoclean)
tvaudio 14012 0 (unused)
video-buf 10932 0 (autoclean) [saa7134]
i2c-core 13508 0 (autoclean) [tuner saa7134 tvaudio]
v4l2-common 2880 0 (autoclean) [saa7134]
v4l1-compat 11972 0 (autoclean) [saa7134]
videodev 6176 2 (autoclean) [saa7134]
soundcore 3844 2 (autoclean) [saa7134]


Robert Kulagowski wrote:

>>So ... Robert ... might it make sense to add a discussion to,
>>say, section 3.2 of the HowTo (which is where I'd look for info on bttv) about configuration of modules ... at least bttv?
>>
>>
>Sure; write something up and I'll look at getting it included in the
>HOWTO.
>
RE: Frames per second? [ In reply to ]
At 09:38 AM 4/22/2003 -0500, Robert Kulagowski wrote:
[...]

>Sure; write something up and I'll look at getting it included in the
>HOWTO.

Try this (in an appropriate spot in section 3.2) --

If your video-capture card uses the bttv kernel module (the common ones
do), you will want to be sure that when it loads, it loads with the option
"gbuffers=16" or "gbuffers=32" (exactly how to do this is a bit
distribution-specific). These settings give the bttv module enough buffer
space to store 16 or 32 capture frames, instead of the default value of 2.
The added buffering helps to minimize frame loss at times when the capture
stream is changing rapidly (fast pans, for example) in ways that slow down
the encoding process.

May I ofer a couple of other suggestions as well?

First, I can't find where the HowTo is explicit about which *version* of
MythTV it is discussing. Since the current Debian-Sid version (which I'm
attempting to install and configure) seems to be a bit different from that
latest CVS version, this lack of information makes it hard for me to use
the HowTo with confidence. You might want to clarify this in some very
obvious place.

Second, a specific section I had trouble with yesterday is section 9.1,
particularly where it reads:

>Switch to the setup directory and run the setup program:
>
> $ cd setup
> $ ./setup

I had two problems with this:

1. The command "cd setup" is itself meaningless if the reader does not know
what PWD he or she is supposed to execute it *from* (since it is a relative
path). Neither earlier in this section, nor anywhere else I read (I admit I
haven't read every word) can I find this clarified. In fact, in my reading
I found other places (e.g., the mysql section) where relative paths are
specified but no prior indication of the PWD appears, at least not close by.

2. On my Debian-Sid distribution, I can't find a program or directory
called "setup" anywhere on the system (exccpt for some setup scripts
related to dpkg). I can, however, find "/usr/bin/mythtv-setup", which when
run seems to be the program the HowTo section goes on to document. This is
what occasioned my first suggestion above, since it implies either that (a)
the Debian-Sid binaries do not reflect current, or standard, MythTV
practice or (b) the HowTo itself does not reflect current, or standard,
MythTV practice. I'd offer a fix, but since I don't know *which* problem
exists, I can't.
Re: Frames per second? [ In reply to ]
Ray Olszewski wrote:

> 2. Debian-Sid [...] "setup" [vs] "/usr/bin/mythtv-setup"

> it implies either that (a) the Debian-Sid binaries do not reflect
> current, or standard, MythTV practice or (b) the HowTo itself does not
> reflect current, or standard, MythTV practice. I'd offer a fix, but
> since I don't know *which* problem exists, I can't.

It's rather that MythTV doesn't refect current or standard Debian
practices :). Debian binaries (incl setup/configure stuff) are in
/usr/bin/. Because that is a system-global space, a name like "setup"
does not make sense (and is not allowed by Debian). Thus the name-change
in the Debian package.
RE: Frames per second? [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> First, I can't find where the HowTo is explicit about which
> *version* of MythTV it is discussing.

Section 1 - been there practically forever.

> Second, a specific section I had trouble with yesterday is
> section 9.1,
> particularly where it reads:
>
> >Switch to the setup directory and run the setup program:
> >
> > $ cd setup
> > $ ./setup
>
> I had two problems with this:
>
> 1. The command "cd setup" is itself meaningless if the reader
> does not know
> what PWD he or she is supposed to execute it *from*

I will re-look at the HOWTO for assumptions WRT path.

> 2. On my Debian-Sid distribution, I can't find a program or
> directory called "setup" anywhere on the system

There isn't really any documentation for the debian packages other
than what mdz has put together. I don't run Debian; if someone wants
to write Debian specific instructions for inclusion in the HOWTO I'm
more than willing to accept them.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPqWa0fc1NpCTlP0JEQJsOACfTEAQoA88ZQMJq/MeSW4T+Me0YAsAn3lf
11HgPFVZZDVu3hX6G8YpFrRO
=pz3u
-----END PGP SIGNATURE-----
Re: Frames per second? [ In reply to ]
I'm currently getting up to speed running mythtv on debian unstable (I
started with stable / Woody), but needed the later nvtv versions in
unstable).

I'm writing down basic steps as I go, and I'd be interested in filling
in details if you feel like collaborating ...

On Tue, Apr 22, 2003 at 11:59:28AM -0700, Ray Olszewski wrote:
> At 09:38 AM 4/22/2003 -0500, Robert Kulagowski wrote:
> [...]
>
> >Sure; write something up and I'll look at getting it included in the
> >HOWTO.
>
> Try this (in an appropriate spot in section 3.2) --
>
> If your video-capture card uses the bttv kernel module (the common ones
> do), you will want to be sure that when it loads, it loads with the option
> "gbuffers=16" or "gbuffers=32" (exactly how to do this is a bit
> distribution-specific). These settings give the bttv module enough buffer
> space to store 16 or 32 capture frames, instead of the default value of 2.
> The added buffering helps to minimize frame loss at times when the capture
> stream is changing rapidly (fast pans, for example) in ways that slow down
> the encoding process.
>
> May I ofer a couple of other suggestions as well?
>
> First, I can't find where the HowTo is explicit about which *version* of
> MythTV it is discussing. Since the current Debian-Sid version (which I'm
> attempting to install and configure) seems to be a bit different from that
> latest CVS version, this lack of information makes it hard for me to use
> the HowTo with confidence. You might want to clarify this in some very
> obvious place.
>
> Second, a specific section I had trouble with yesterday is section 9.1,
> particularly where it reads:
>
> >Switch to the setup directory and run the setup program:
> >
> > $ cd setup
> > $ ./setup
>
> I had two problems with this:
>
> 1. The command "cd setup" is itself meaningless if the reader does not know
> what PWD he or she is supposed to execute it *from* (since it is a relative
> path). Neither earlier in this section, nor anywhere else I read (I admit I
> haven't read every word) can I find this clarified. In fact, in my reading
> I found other places (e.g., the mysql section) where relative paths are
> specified but no prior indication of the PWD appears, at least not close by.
>
> 2. On my Debian-Sid distribution, I can't find a program or directory
> called "setup" anywhere on the system (exccpt for some setup scripts
> related to dpkg). I can, however, find "/usr/bin/mythtv-setup", which when
> run seems to be the program the HowTo section goes on to document. This is
> what occasioned my first suggestion above, since it implies either that (a)
> the Debian-Sid binaries do not reflect current, or standard, MythTV
> practice or (b) the HowTo itself does not reflect current, or standard,
> MythTV practice. I'd offer a fix, but since I don't know *which* problem
> exists, I can't.
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
Re: Frames per second? [ In reply to ]
At 09:08 PM 4/22/2003 +0200, Ben Bucksch wrote:
>Ray Olszewski wrote:
>
>>2. Debian-Sid [...] "setup" [vs] "/usr/bin/mythtv-setup"
>
>>it implies either that (a) the Debian-Sid binaries do not reflect
>>current, or standard, MythTV practice or (b) the HowTo itself does not
>>reflect current, or standard, MythTV practice. I'd offer a fix, but since
>>I don't know *which* problem exists, I can't.
>
>It's rather that MythTV doesn't refect current or standard Debian
>practices :). Debian binaries (incl setup/configure stuff) are in
>/usr/bin/. Because that is a system-global space, a name like "setup" does
>not make sense (and is not allowed by Debian). Thus the name-change in the
>Debian package.

Thanks. That's actually pertty much what I had guessed. But since the name
mythtv-setup makes *so* much more sense than just plain setup (no matter
where the program is put), I at least wanted to hold out the hope that the
standard name had in fact been changed ... especially since Isaac does his
development work on Sid.

So ... where does one turn to for information on the Debian-specific
variations? Clearly not the HowTo (Robert - is that just a matter of
someone drafting the needed pieces to drop in? or do you have a more
fundamental reason than the need for help for its not being there?). The
README.Debian document included with the package is terse to the point of
uselessness. Where else does one turn?

For example, the Debian instructions in the HowTo for setting up the mysql
database (section 6.4) read:

>To setup the initial mysql databases:
>
> $ cd database
[...]
>Debian 3.0
>
> $ mysql < mc.sql


Aside from the problem of using a relative path without previously
specifying a PWD, this is out of date, at least for Sid, where the relevant
file is (I think)

/usr/share/mythtv/sql/mc.sql

Please don't get me wrong ... my intent is not simply to complain. Once
I've managed to get Myth working here, I'll be happy to use my notes from
the install to offer a set of proposed updates for the HowTo that fill in
omitted details and correct errors. It's just that until I work through all
of this stuff, I don't know enough to propose correct changes to the
Debian-Sid installation procedure. So for now, I'm bringing up things in a
fragmentary way because that reflects my current state of uncertainty ... I
can see where something is wrong or missing much more easily than I can see
what the needed correction is.
RE: Frames per second? [ In reply to ]
At 02:41 PM 4/22/2003 -0500, Robert Kulagowski wrote:
>
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
> > First, I can't find where the HowTo is explicit about which
> > *version* of MythTV it is discussing.
>
>Section 1 - been there practically forever.

No wonder I didn't see it.

May I suggest finding a better place for this information than the section
called "How to obtain this document"? Even when I read a HowTo (almost)
from to to bottom, I normally skip this section ... after all, if I'm
reading the HowTo, I *already* have it.

Perhaps moving this information to, or repeating it in, Section 2
("Introduction") would be worthwhile?

[...]
>There isn't really any documentation for the debian packages other
>than what mdz has put together. I don't run Debian; if someone wants
>to write Debian specific instructions for inclusion in the HOWTO I'm
>more than willing to accept them.

I'll be pleased to do this once I actually manage to get Myth running. In
the meantime, I fear I will continue to ask silly-sounding questions as I
try to bridge the gap between what I have and what is documented.
RE: Frames per second? [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> May I suggest finding a better place for this information
> than the section
> called "How to obtain this document"? Even when I read a
> HowTo (almost)
> from to to bottom, I normally skip this section ... after all, if
> I'm reading the HowTo, I *already* have it.

Added there because googling for a document doesn't always tell you
where the definitive source is.

> >There isn't really any documentation for the debian packages other
> >than what mdz has put together. I don't run Debian; if someone
> >wants to write Debian specific instructions for inclusion in the
> >HOWTO I'm more than willing to accept them.
>
> I'll be pleased to do this once I actually manage to get Myth
> running.

Sure, go for it.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPqWmH/c1NpCTlP0JEQK0IQCfdDzL1CUHCpTL3I6ZJxCUxfJc4WkAoO6A
OWHIB5eG01mh6xDTZouETkeY
=42wC
-----END PGP SIGNATURE-----
Re: Frames per second? [ In reply to ]
Ray Olszewski wrote:
> At 09:38 AM 4/22/2003 -0500, Robert Kulagowski wrote:
> [...]
>
>> Sure; write something up and I'll look at getting it included in the
>> HOWTO.
>
>
> Try this (in an appropriate spot in section 3.2) --
>
> If your video-capture card uses the bttv kernel module (the common ones
> do), you will want to be sure that when it loads, it loads with the
> option "gbuffers=16" or "gbuffers=32" (exactly how to do this is a bit
> distribution-specific). These settings give the bttv module enough
> buffer space to store 16 or 32 capture frames, instead of the default
> value of 2. The added buffering helps to minimize frame loss at times
> when the capture stream is changing rapidly (fast pans, for example) in
> ways that slow down the encoding process.

I've seen "gbuffers=32" posted often recently and have been
biting my tounge but if it might go in the docs I guess I
should speak up ;-).

This could be a huge number if there was no trade-off but
there is. Each buffer allocates about 2MB so 32 would need
64MB if they were all used. The need for additional memory
may cause virtual memory paging to occur which would kill
performance. As memory thrashes, the buffers fill causing
the need to page them in and... well, you get the idea ;-).

I've been happily using "gbuffers=8" since long before
discovering MythTV. If the encoder can't keep up with the
incoming frames, no number of buffers will save it (see
Lucy in the chocolate factory), it will just keep a longer
backlog while it drops frames. If it can keep up and there
are a few difficult frames or latency due to the process
scheduler, I/O events, etc. it could get a few frames
behind and still catch up. I doubt that it would fall more
than a second behind very often but still catch up without
dropping frames.

However, I haven't done any specific testing (yet ;-) to
see how much buffer space is needed to handle normal
behavior. I'm not even sure that there is one to one
relationship between number of buffers and number of frames
(the buffers are chuncks of memory and the framesize depends
on the resolution, etc.).

Still I'd think that 8 is a big win over the default of
2 and would fix the vast majority of problems. Higher
numbers may cause memory paging (unless you have lots
of spare memory) to handle the few remaining border cases.

-- bjm
Re: Frames per second? [ In reply to ]
Bruce Markey wrote
> I've been happily using "gbuffers=8" since long before
> discovering MythTV.

I've been using 8 since I installed my tuner card, too.

-Chris
RE: Frames per second? [ In reply to ]
At 03:29 PM 4/22/2003 -0500, Robert Kulagowski wrote:
[...]
> > >There isn't really any documentation for the debian packages other
> > >than what mdz has put together. I don't run Debian; if someone
> > >wants to write Debian specific instructions for inclusion in the
> > >HOWTO I'm more than willing to accept them.
> >
> > I'll be pleased to do this once I actually manage to get Myth
> > running.
>
>Sure, go for it.

Will do. In the meantime, it strikes me that the HowTo would benefit from
expanded discussion of hardware and software prerequisites. Though I am a
newcomer to MythTV, I've been doing vidcaps for over a year now (with
avifile for capturing, xine and mplayer for playback), so I know the
hardware side moderately well.

So here is a first draft of an expanded section on hardware. It
incorporates the old material, adds a lot of new material, and includes a
few pieces that someone else will have to write. It also includes a guess
or two, so others should read it for accuracy.

If you like it, I'll do something similar for software ... but I'll wait on
that for some feedback on this attempt.

------------------BEGIN DRAFT-----------------------

3.3 Hardware

Hardware selection is a complex topic, one this HowTo can touch on only
briefly and in general terms. The following subsections offer some general
guidence but stop short of offering specific recommendations.

For more detail about actual configurations that others have used, Mark
Cooper has setup a hardware database at
http://www.goldfish.org/~mcooper/pvrhw/. The website will let you browse
what other users have reported as their hardware configuration, and how
happy they are with the results.

To find out more about the suitability of specific hardware choices, you
can also consult the archives of the mythtv-users mailing list, or post a
question on that list.


3.3.1 CPU Type and Speed

Selection of CPU type and speed is the trickiest element of hardware
selection, mainly because there are so many tradeoffs one can make, among
number of things the MythTV device can do simultaneously, capture size, and
encoding quality.

MythTV has two modes of operation. It can function as a software video
encoder, which means that it uses a fairly generic "dumb" video capture
card to get frames of video, encodes them using the CPU on your motherboard
and writes them to disk. High-end video capture cards and devices like the
Tivo and RePlay have dedicated encoder chips which use specialized hardware
to convert the video stream to the MPEG-2 format without using the
motherboard CPU. The main CPU has the responsibility of running the
Operating System and reading and writing the encoded frames to the disk.
These tasks have fairly low CPU requirements compared to encoding video,
which is why a device like a Series 1 Tivo can run with only 16MB of RAM
and a 54Mhz CPU.

There are many variables that go into the question: "How fast a CPU do I
need to run MythTV"? Obviously, the faster your CPU, the better your
experience will be with MythTV. If you are using the software MPEG-4
encoder and performing the "Watch TV" function, where the CPU is both
encoding and decoding video simultaneously to allow Pause, Fast Forward and
Rewind functions for live TV requires more CPU then just encoding or
decoding. MythTV also supports multiple encoder cards in a single PC,
thereby increasing the CPU requirements if you plan on simultaneously
encoding multiple programs.

NOTE: As of 2003-04-15 the current IVTV driver does not support multiple
hardware encoder cards in the same chassis.

Here are a few data points:

A PIII/733Mhz system can encode one video stream using the MPEG-4
codec using 480x480 capture resolution. This does not allow for live TV
watching, but does allow for encoding video and then watching it later.
The developer states that his AMD1800+ system can almost encode
two MPEG4 video streams and watch one program simultaneously.
A PIII/800Mhz system with 512MB RAM can encode one video stream
using the RTJPEG codec with 480x480 capture resolution and play it back
simultaneously, thereby allowing live TV watching.
A dual Celeron/450Mhz is able to view a 480x480 MPEG4/3300Kbps
file created on a different system with 30% CPU usage.
A P4 2.4Ghz machine can encode two 3300Kbps 480x480 MPEG4 files
and simultaneously serve content to a remote frontend.


3.3.2 Memory

A MythTV host that is both a backend and a frontend, and that uses software
encoding with a single capture card, should run fine in 128 MB of RAM. Any
common type of RAM in use today is fast enough. Additional RAM is useful,
but it mainly serves as buffer space to smooth the process of sync'ing to
the hard disk. For that reason, a swap partition is effectively useless.


3.3.3 Hard Disk(s)

Encoded video takes up a lot of hard disk space. The exact amount depends
on the encoding scheme, the size of the raw images, and the frames per
second, but a typical value for MythTV is 2 GB/hour. Allow enough space.

Because a lot of data is being written to disk, the disk used for video
storage must support DMA transfers. This is not just a disk issue. The
Linux kernel must be set tp use DMA, and the motherboard's IDE chipset must
support it. These are kernel-level issues, so all we will say here is that
you need to be sure that your kernel will support DMA and your
motherboard's chipset (look in the "ATA/IDE/MFM/RLL support" section in
"make menuconfig" for more information).

If DMA works but is not active in the kernel ... these days, this is the
default of most Limux distributions ... you can change that from the
command line or during the boot/init sequence. You do this with the command
"hdparm". As root, or from a suitable init script, run it as follows

hdparm -d 1 /dev/hdc

replacing "hdc" with the appropriate device entry for your capture drive
(the drive, not the partition). For more on this, see the Troubleshooting
Section for instructions <href ???>.


3.3.4 Video Capture Card

The system needs one of more video-capture cards for which Linux kernel
modules exist. For a complete list of viedo-capture cards known to work
with Linux, please see <add a reference here>. The most common, inexpensive
cards available are cards that use the bt848 or bt878 vidcap chip; examples
are the "Hauppauge WinTV Go" card and the "AverTV Desktop PVR" card. They
use the bttv kernel module.

After you have installed a suitable card in a pci slot, you can check that
the kernel sees it with "lspci". Look for an entry labeled "Multimedia
video controller". To get more detailed information about the card, use
"lspci -v" or "lspci -vv".

While inexpensive video-capture cards just capture raw frames, leaving
encoding to software, some higher-end cards incorporate hardware-level
encoding. Using either a G200 MJPEG encoder card, or a WinTV PVR-250 or 350
from Hauppauge and the driver from the IvyTV project
http://ivtv.sourceforge.net/ will allow you to use dedicated hardware
encoders rather than your CPU. As of 2003-04-15, the CVS version MythTV is
now able to use the PVR-250/350 cards as an input device for live TV and
for scheduled recordings. Seek support is still being written. Using the
onboard MPEG-2 encoder drastically reduces the CPU requirements for
encoding. Here are some data points:

An Athlon 1800XP can decode a 720x480 8Mbps MPEG-2 file using 10% CPU
An Athlon 1Ghz can decode a 720x480 16Mbps MPEG-2 file using
30-50% CPU, can decode a 480x480 16Mbps
MPEG-2 using 30% CPU and approximately 30% for Live TV at 416x480.
<This section needs more work, but I lack the required expertise.>


3.3.5 Sound card

The system needs a sound card, or an onboard equivalent on the motherboard,
to play back sound and, in most cases, to record sound. Any sound card that
can be operated by the alsa (Advanced Linux Sound Architecture) kernel
modules will work with MythTV.

The usual practice for recording the audio associated with video captures
is to run a jumper cable from an audio output on the video-capture card to
the Line input on the sound card. Some video-capture cards use internal
audio tuners that work with the Linux kernel's btaudio module, but a
definitive list of these cards is hard to come by (in part because card
makers often change tuners without changing card model designations, a
practice called "slipstreaming").


3.3.6 Video Display Card

If you want to view television on a computer monitor, then you can use any
video card for which there is an XFree86 driver that supports xVideo (xv)
extensions. Check the XFree86 documentation for details if you are
uncertain about your preferred card.

Most people, though, want to view television on a television set. For this,
you need either (a) one of the relatively small number of cards with TV-out
outputs that are supported by Linux and XFree86, or (b) an external
VGA-to-TV converter.

For choice (a), recent nVidea cards (<would someone who uses nVidea provide
examples, please?>) are reported to work with the nvtv drivers, available
at http://sourceforge.net/projects/nv-tv-out/; and recent Matrox cards
(the G450 and G550) are reported to work with kernel patches (for Linux
2.4.19) available at http://www.bglug.ca/matrox_tvout/. <Someone who uses
nVidea needs to confirm ALL the nVidea stuff here. I use a Matrox
Millennium 550GX so can confirm it.>

Cards made by ATI have no official support for TV out under Linux and
XFree86, though some people report making them work with the experimental
version of the GATOS drivers, available at
http://gatos.sourceforge.net/watching_tv.php. Savage card with TV out are
completely unsupported under Linux and XFree86.

For choice (b), <someone who has done it this way should write this part>.



------------------END DRAFT-------------------------
Re: Frames per second? [ In reply to ]
At 03:04 PM 4/22/2003 -0700, Chris Palmer wrote:
>Bruce Markey wrote
> > I've been happily using "gbuffers=8" since long before
> > discovering MythTV.
>
>I've been using 8 since I installed my tuner card, too.


I stated out using 16 but switched to 32 when I had some problems. But then
I do this on systems with 1 GB of RAM and no swap partition, so the
thrashing Bruce worries about doesn't arise.

While a high gbuffers setting doesn't help with an continuing lag problem
(Lucy in the chocolate factory; yeah, I saw that ad last night too), it
does help with a transient one. Remember that the original poster described
a problem that occurred during rapid panning of the camera, a behavior
which often lasts just for a second or two, not an all-the-time problem.

Since the change did fix his problem, he can now experiment with lower
values to do the sort of fine-tuning you both suggest.
RE: Frames per second? [ In reply to ]
Ray Olszewski <ray@comarre.com> wrote:
>Savage card with TV out are
>completely unsupported under Linux and XFree86.

Waitasec. What about this?

http://www.probo.com/timr/savage40.html

As a matter of fact, I have a friend who set up
his Myth box with the Savage/IX and TVout to his
antique 53" NTSC big screen. As a matter of fact,
he's
on this mailing list. Jee, care to share your
experiences?

-Dennis

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com
Re: Frames per second? [ In reply to ]
Dennis Lou wrote:

>Ray Olszewski <ray@comarre.com> wrote:
>
>
>>Savage card with TV out are
>>completely unsupported under Linux and XFree86.
>>
>>
>
>Waitasec. What about this?
>
>http://www.probo.com/timr/savage40.html
>
>As a matter of fact, I have a friend who set up
>his Myth box with the Savage/IX and TVout to his
>antique 53" NTSC big screen. As a matter of fact,
>he's
>on this mailing list. Jee, care to share your
>experiences?
>
>-Dennis
>
>__________________________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo
>http://search.yahoo.com
>_______________________________________________
>mythtv-users mailing list
>mythtv-users@snowman.net
>http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
>
Yeah, I get fantastic Linux TV-out support with my Savage 2000 cards
(see
http://www.gossamer-threads.com/perl/mailarc/gforum.cgi?post=58030), but
unfortunately the that chip has absolutely no XV support and is unusable
for MythTV. From the site you referenced above:
"xvideo on the Savage2000 still seems to be broken. I don't know when
I'll be able to get around to this."
RE: Frames per second? [ In reply to ]
At 04:57 AM 4/23/2003 -0700, Jason James wrote:
>Great job!
>
>One suggestion: since so many people ask about the
>All-In-Wonder cards, I think you might want to mention
>in this section that it isn't well supported for tv
>capture.

This is a very good suggestion, and I almost did something like this when I
was drafting. I didn't because I need some help in implementing it correctly.

My understanding of the situation is that the ATI AIW 7500 will not capture
TV signals under Linux, because it uses an i2c setup (chip, probably) that
the Linux i2c stuff does not support. My understanding is also that other
ATI AIW cards (the 8500 and 9500) do not have this flaw.

But I know none of this firsthand, and what I've read (that I infer the
prior paragraph from) is often reported so imprecisely that I do not trust
my understanding well enough to put it in a HowTo. So if someone who
understands the details of the various ATI AIW cards better than me would
write up a summary of what does and does not work, I'd be pleased to add it
to my draft (what happens after that is, of course, up to Robert, and I
haven't heard back from him yet).

So others can see this sumary and request, I've cc'd the myth-users list in
my response to you, James ... though your message was a private response, I
trust you have no objection to my doing this.
Re: Frames per second? [ In reply to ]
On Tuesday, April 22, 2003, at 07:41 PM, Ray Olszewski wrote:
> Savage card with TV out are completely unsupported under Linux and
> XFree86

Untrue. Most savage TV-Out cards are supported. I have a ProSavage DDR
(built into the motherboard chipset) that's working perfectly.

Don't get a Savage 2000, because XV doesn't work on it, but other than
that one model, all the Savages should work fine for mythtv.
http://www.probo.com/timr/savage40.html

James
RE: Frames per second? [ In reply to ]
At 07:39 AM 4/23/2003 -0700, Dennis Lou wrote:
>Ray Olszewski <ray@comarre.com> wrote:
> >Savage card with TV out are
> >completely unsupported under Linux and XFree86.
>
>Waitasec. What about this?
>
>http://www.probo.com/timr/savage40.html
>
>As a matter of fact, I have a friend who set up
>his Myth box with the Savage/IX and TVout to his
>antique 53" NTSC big screen. As a matter of fact,
>he's
>on this mailing list. Jee, care to share your
>experiences?


My own (unsuccessful) experience is with the Savage 2000. Its TV-out port
works fine for consoles but fails completely for X. As the Savage 2000 has
other problems (it doesn't support xv; that info is at the URL you refer me
to) I didn't pursue it hard.

I do see that the X driver has an "ption "TvOnly"" setting, which implies
that for at least *some* cards, it supports TV out. But I don't see
anything specific about which cards do and do not work, and I'm told that
many laptops use Savage chipsets (none of the problems we commonly discuss
about TV out apply to laptops).

Much better than relying on the vague information at the probo site would
be your friend reporting his actual, positive experience, indicating what
card he or she used and what steps were needed to make it work.

Down the road a bit (but not too far down), I'd like to compile a directory
of what AGP cards do and do not work with TV out for Linux and XFree86.This
will mostly have to be a compilation of others' reports, since I don't have
the resources to buy a bunch of cards for testing (I have a Matrox card
that works, an ATI that doesn't work yet ... but I haven't instatted
ati2-experimental ... and the Savage 2000 card I referred to above). A
report from your friend would be nice for this.

So would some reports from people who actually have nVidea cards running,
discussing the steps needed to make nvtv or the drivers from nVIdea work.
And if anyone is actually using an ATI card with the GATOS-ati-2
experimental drivers, a step-by-step for that would be nice ... something
as one-two-buckle-my-shoe in style as the site for using the Matrox cards,
perhaps.

If people posted such reports here, I'd could fairly easily compile them
into a mini-HowTo, and I can probably even find a place to host it if the
MythTV site is not suitable.

1 2  View All