Mailing List Archive

Capture Card Resolution -- was: Re: 2 Capture card questions
On Monday 17 March 2003 01:02 pm, Bruce Markey wrote:
> Unit3 wrote:
> > Brian Foddy wrote:
> >> 2nd question...
> >> There are several specs I've seen that the same WinTV series
> >> only has capture resolution of 320x240. I can't say I know
> >> for a fact if this is correct in Linux or not. Does anyone know
> >> for sure. I know I can set myth higher, but is the card really
> >> giving the higher resolution?
> >
> > I was under the impression that *all* bt878 cards could capture at
> > 720x480, given a proper set of drivers.
>
> AFAIK that is correct.
>
> > I'd say pump the res up in MythTV and see if the quality increases or
> > not.. it should be evident right away if you're getting 4x the
> > resolution or if it's just scaling up 320x240.
>
> http://www.mythtv.org/docs/mythtv-HOWTO-19.html#ss19.4
>
> In Setup->Playback, turn off Fixed Aspect Ratio then during
> playback, press "f". The picture will be in a window the size
> of the original recording dimensions.
>

Thanks for the reply, but I don't think your proof is valid. I'm sure
the Myth will replay whatever resolution it thinks its capturing, but
that says nothing to what the card is delivering...

Can someone clarify why all the specs state 320x240 for many of
these cards and where the confusion comes from?


Brian
Re: Capture Card Resolution -- was: Re: 2 Capture card questions [ In reply to ]
My understanding too is that cards like the WinTV series can capture up to
720x384 or thereabouts (whatever the full PAL resolution is, a bit higher
than the full NTSC 640x480); I'd certainly believe 720x480 is possible,
though I can't vouch for it.

I don't know what you've seen that you think are "all the specs", for the
WinTV cards, so I can't "clarify" what they say. The spec sheet produced by
Hauppauge for the WInTV Go card, for example, does not list a maximum
resolution. Perhaps if you would provide some references to what you are
reading, I or someone else here can assist.

The 320x240 (for NTSC) limit is often a practical one, set by the CPU's
processing speed and hard disk transfer rate. (And the fact that actual
NTSC signals consist of 59.94 fps, composed of interlaced pairs of 320x240
images.) As CPUs get better, buffer memory more plentiful, and hard disks
and controllers themselves faster, that limit becomes less binding, and the
equipment used in a typical MythTV setup (as I infer from reading this
list; I use wimpier hardware myself) should not be subject to this
constraint. This *may* be the source of what you refer to as the
"confusion" about resolution capabilities.

At 11:18 PM 3/18/2003 -0600, Brian Foddy wrote:
>On Monday 17 March 2003 01:02 pm, Bruce Markey wrote:
> > Unit3 wrote:
> > > Brian Foddy wrote:
> > >> 2nd question...
> > >> There are several specs I've seen that the same WinTV series
> > >> only has capture resolution of 320x240. I can't say I know
> > >> for a fact if this is correct in Linux or not. Does anyone know
> > >> for sure. I know I can set myth higher, but is the card really
> > >> giving the higher resolution?
> > >
> > > I was under the impression that *all* bt878 cards could capture at
> > > 720x480, given a proper set of drivers.
> >
> > AFAIK that is correct.
> >
> > > I'd say pump the res up in MythTV and see if the quality increases or
> > > not.. it should be evident right away if you're getting 4x the
> > > resolution or if it's just scaling up 320x240.
> >
> > http://www.mythtv.org/docs/mythtv-HOWTO-19.html#ss19.4
> >
> > In Setup->Playback, turn off Fixed Aspect Ratio then during
> > playback, press "f". The picture will be in a window the size
> > of the original recording dimensions.
> >
>
>Thanks for the reply, but I don't think your proof is valid. I'm sure
>the Myth will replay whatever resolution it thinks its capturing, but
>that says nothing to what the card is delivering...
>
>Can someone clarify why all the specs state 320x240 for many of
>these cards and where the confusion comes from?
Re: [mythtv] Capture Card Resolution -- was: Re: 2 Capture card questions [ In reply to ]
Brian Foddy wrote:
...
> Thanks for the reply, but I don't think your proof is valid. I'm sure
> the Myth will replay whatever resolution it thinks its capturing, but
> that says nothing to what the card is delivering...

This wasn't offered as a proof as you suggest but simply a
way of displaying the pixel for pixel resolution that is in
the file. MythTV doesn't 'think', it encodes the frames that
are mmapped from from bttv driver. The driver 'delivers'
frames that are the dimensions that were requested in ioctls
through the v4l interface.

The suggestion that somehow the capture mistakenly recorded at
a different resolution than the card delivered is bizarre. But
if you want proof that there is more information than 320x240,
consider the following. Turn off deinterlace. See the jagged
edges of things in motion? That's because it is grabbing both
halves of the interlaced frames. There are 480 unique scan
lines in a full frame. For horizontal resolution, grab a frame
with xawtv, display it and use xmag to blow it up. Single pixels
are unique in the 640x480 image.

> Can someone clarify why all the specs state 320x240 for many of
> these cards and where the confusion comes from?

No. No one can explain the unreferenced documents that you
vaguely allude to which you believe you saw. Anything that
suggests that a bt878 is only capable of 320x240 is either
wrong or is being misinterpreted. Google bt878 720x480 to
find dozens of references.

-- bjm
Re: Capture Card Resolution [ In reply to ]
Ray Olszewski wrote:
> My understanding too is that cards like the WinTV series can capture up
> to 720x384 or thereabouts (whatever the full PAL resolution is, a bit
> higher than the full NTSC 640x480); I'd certainly believe 720x480 is
> possible, though I can't vouch for it.

PAL half interlaced frames are 288. The max PAL/SECAM 25 fps
is 768x576 for the bt878 chips.

> The 320x240 (for NTSC) limit is often a practical one, set by the CPU's
> processing speed and hard disk transfer rate. (And the fact that actual
> NTSC signals consist of 59.94 fps, composed of interlaced pairs of
> 320x240 images.)

I agree with everything that you say except the last comment.
While there are a finite number of scan lines, each scan line
is an analog wave. I don't believe there is anything in an analog
NTSC signal which defines a digital width. When digitizing the
analog signal, what determines that horizontal resolution is
clocking when to sample the signal. The horizontal resolution
could be sampled at any arbitrary rate. The bttv driver accepts
multiples of 16 up to the maximum width.

-- bjm
Re: Capture Card Resolution -- was: Re: 2 Capture card questions [ In reply to ]
Brian Foddy wrote:

>Thanks for the reply, but I don't think your proof is valid. I'm sure
>the Myth will replay whatever resolution it thinks its capturing, but
>that says nothing to what the card is delivering...
>
>
I believe that someone had a good idea about deinterlacing which would
be adequate.

>Can someone clarify why all the specs state 320x240 for many of
>these cards and where the confusion comes from?
>
>
I think I can actually answer this! ;)

When trying to find better software for my TV Wonder under Windows, I
found some documentation that basically said that if you were using the
video overlay mode of your video card for display, the card could only
capture one field of the incoming video, but not both. Essentially,
limiting the maximum vertical resolution to 240 pixels. The
documentation suggested that it was easily possible to capture both
fields if you didn't use overlay mode directly from the card, but
instead captured both, did some processing, and then output the result
back to the screen (which is what MythTV, Descalar, and WinDVR all do).
However, most companies who make these cards would like them to run
smoother on lower end systems (for purely marketing reasons I'm sure),
and so their supplied software uses overlay mode for display and is
limited to 240 vertical pixels. Not suprisingly, most companies then
also limit their software to capturing 320 horizontal pixels, since
capturing at 640 or 720x240 would be just silly. :)

I hope this makes some amount of sense. Also, I don't know if this "can
only capture one field when using overlay" issue is simple a windows
driver issue, a WDM issue, or a chipset issue. All I know is that it
does exist under Windows, as even generic DirectShow capturing software
will refuse to capture full frames when using video overlay. (I know,
I've tried)

Graeme
Re: Capture Card Resolution -- was: Re: 2 Capture card questions [ In reply to ]
This is great info, but I can't seem to capture above 320x240. I have a WinTV
Go on a P4 1.5G system. I try anything higher than 320x240 the quality gets
worse. It appears to be capturing at 320x240 and scaling up. Do you think
that is what is happening? I would really like some guidance. Is it possible
to force it to not use overlay mode?

Any help would be appreciated.

Thanks,
--Ken


Quoting Unit3 <unit3@demoni.ca>:

> Brian Foddy wrote:
>
> >Thanks for the reply, but I don't think your proof is valid. I'm sure
> >the Myth will replay whatever resolution it thinks its capturing, but
> >that says nothing to what the card is delivering...
> >
> >
> I believe that someone had a good idea about deinterlacing which would
> be adequate.
>
> >Can someone clarify why all the specs state 320x240 for many of
> >these cards and where the confusion comes from?
> >
> >
> I think I can actually answer this! ;)
>
> When trying to find better software for my TV Wonder under Windows, I
> found some documentation that basically said that if you were using the
> video overlay mode of your video card for display, the card could only
> capture one field of the incoming video, but not both. Essentially,
> limiting the maximum vertical resolution to 240 pixels. The
> documentation suggested that it was easily possible to capture both
> fields if you didn't use overlay mode directly from the card, but
> instead captured both, did some processing, and then output the result
> back to the screen (which is what MythTV, Descalar, and WinDVR all do).
> However, most companies who make these cards would like them to run
> smoother on lower end systems (for purely marketing reasons I'm sure),
> and so their supplied software uses overlay mode for display and is
> limited to 240 vertical pixels. Not suprisingly, most companies then
> also limit their software to capturing 320 horizontal pixels, since
> capturing at 640 or 720x240 would be just silly. :)
>
> I hope this makes some amount of sense. Also, I don't know if this "can
> only capture one field when using overlay" issue is simple a windows
> driver issue, a WDM issue, or a chipset issue. All I know is that it
> does exist under Windows, as even generic DirectShow capturing software
> will refuse to capture full frames when using video overlay. (I know,
> I've tried)
>
> Graeme
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://www.snowman.net/mailman/listinfo/mythtv-users
>
>
Re: Capture Card Resolution -- was: Re: 2 Capture card questions [ In reply to ]
Ken VanDine wrote:

>This is great info, but I can't seem to capture above 320x240. I have a WinTV Go on a P4 1.5G system. I try anything higher than 320x240 the quality gets worse. It appears to be capturing at 320x240 and scaling up. Do you think that is what is happening? I would really like some guidance. Is it possible to force it to not use overlay mode?
>
>
Is the WinTV Go card a bt8x8 card? If so, it shouldn't be doing this,
especially in MythTV since AFAIK MythTV doesn't use overlay mode
directly from the card, it does compression first and then outputs it.
I'd change the compression settings for "Live TV" and see if that makes
a difference in your quality, it could be that it's just compressing the
snot out of the video and that's producing what you see. Also, if you
turn off deinterlacing, you should be able to see right away whether or
not it's capture the full 480 vertical pixels based on whether you can
see the interlacing artifacts or not.

Graeme
Re: Capture Card Resolution -- was: Re: 2 Capture card questions [ In reply to ]
Ken VanDine wrote:

>Thanks, what do you mean by changing the compression? Do you mean the bitrate?
> I have tried it as low as 2200 with no real improvement. It actually looks
>pretty good at 320x240, but goes down quickly as I increase it. It is a bt8x8 card.
>
>
Hmmm... bitrate is a function of the MPEG4 codec. Try the RTJpeg at
about 180-190, and see what it looks like. My system produces much worse
video using MPEG4 than RTJPEG, I think it's because it can't keep up
with the encoding.

Graeme
Re: Capture Card Resolution -- was: Re: 2 Capture card questions [ In reply to ]
Thanks, what do you mean by changing the compression? Do you mean the bitrate?
I have tried it as low as 2200 with no real improvement. It actually looks
pretty good at 320x240, but goes down quickly as I increase it. It is a bt8x8 card.

Thanks,
--Ken

Quoting Unit3 <unit3@demoni.ca>:

> Ken VanDine wrote:
>
> >This is great info, but I can't seem to capture above 320x240. I have a
> WinTV Go on a P4 1.5G system. I try anything higher than 320x240 the quality
> gets worse. It appears to be capturing at 320x240 and scaling up. Do you
> think that is what is happening? I would really like some guidance. Is it
> possible to force it to not use overlay mode?
> >
> >
> Is the WinTV Go card a bt8x8 card? If so, it shouldn't be doing this,
> especially in MythTV since AFAIK MythTV doesn't use overlay mode
> directly from the card, it does compression first and then outputs it.
> I'd change the compression settings for "Live TV" and see if that makes
> a difference in your quality, it could be that it's just compressing the
> snot out of the video and that's producing what you see. Also, if you
> turn off deinterlacing, you should be able to see right away whether or
> not it's capture the full 480 vertical pixels based on whether you can
> see the interlacing artifacts or not.
>
> Graeme
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://www.snowman.net/mailman/listinfo/mythtv-users
>
>


--
Ken VanDine
biZrace Inc.
http://www.biZrace.com
kvandine@biZrace.com
Re: Capture Card Resolution -- was: Re: 2 Capture card questions [ In reply to ]
Well, I have some interesting (yet frustrating) results. It seems the problem
for me is the height. I can record at 720x240 using mpeg4 at only like 33% cpu,
rtjpeg works great too. However, if I select 480 for the height, the quality is
terrible no matter what the width is and the cpu usuage is very high. I have a
P4 1.5Ghz using a WinTV Go for capture and NVidia 440MX for TV out (3123 drivers).

Anyone have any ideas?

Thanks,
--Ken

Quoting Unit3 <unit3@demoni.ca>:

> Ken VanDine wrote:
>
> >Thanks, what do you mean by changing the compression? Do you mean the
> bitrate?
> > I have tried it as low as 2200 with no real improvement. It actually
> looks
> >pretty good at 320x240, but goes down quickly as I increase it. It is a
> bt8x8 card.
> >
> >
> Hmmm... bitrate is a function of the MPEG4 codec. Try the RTJpeg at
> about 180-190, and see what it looks like. My system produces much worse
> video using MPEG4 than RTJPEG, I think it's because it can't keep up
> with the encoding.
>
> Graeme
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://www.snowman.net/mailman/listinfo/mythtv-users
>
>
Re: Capture Card Resolution -- was: Re: 2 Capturecard questions [ In reply to ]
> Well, I have some interesting (yet frustrating) results. It seems the
problem
> for me is the height. I can record at 720x240 using mpeg4 at only like
33% cpu,
> rtjpeg works great too. However, if I select 480 for the height, the
quality is
> terrible no matter what the width is and the cpu usuage is very high. I
have a
> P4 1.5Ghz using a WinTV Go for capture and NVidia 440MX for TV out (3123
drivers).

Define "quality is terrible"? Do you mean lost frames, ie jerky video or
that the picture is grainy and horrible?

Lost frames would seem to imply a performance problem. Check for DMA on the
hard disk (hdparm /dev/hda) first. Does switching to rtjpeg help?

The other thing that I have found is that adding a "gbuffers=lots" option to
the bttv module options helps quite a bit, although this seems to be against
the general advice that I have seen elsewhere (this file is usually
/etc/modules.conf - google on gbuffers= for more documentation)

Did you find it fairly easy getting tv out on your NVidia? Is the 440MX
fast enough for myth game and general video duties? I am assuming that it
runs cool enough to air cool? I am thinking about getting a cheap one to
replace my ATI Radeon which I have so far failed to get TVout working...
Re: Capture Card Resolution -- was: Re: 2 Capturecard questions [ In reply to ]
Thanks, adding gbuffers=16 helps considerably. But, gbuffers=32 just hangs
mythfrontend. It still appears as if it is dropping frames in both rtjpeg and
mpeg4, but it is much better than before. If the height for capture is set to
240 it doesn't appear to drop any frames. CPU load is fine, always at least 25%
idle. I am using DMA for hd access and get ~30MB/s. I did find some references
to gbuffers=32 on the web and people seem to have success. Not me. Any other
ideas? Would it help to go to the v4l2 stuff and the lastest bttv driver? I am
willing to try anything. One thing I have observed is the CPU usage of X. If I
capture at 720x240 X uses about 6-8% cpu. Capturing at 352x480 X uses about 22%
cpu. I don't think this is the issue, but might be something wrong. I am
pretty sure the dropped frames are on the capture side, I always of idle % of 10+.

The NVidia card was no problem. I found someones example XF86config that just
worked for me. Very little tweaking. I am attaching mine, it does seem to
work. I would recommend using the older drivers, 3123. The latest have some
performance problems.

Thanks,
--Ken


Quoting Edward Wildgoose <edward.wildgoose@frmhedge.com>:

>
>
> > Well, I have some interesting (yet frustrating) results. It seems the
> problem
> > for me is the height. I can record at 720x240 using mpeg4 at only like
> 33% cpu,
> > rtjpeg works great too. However, if I select 480 for the height, the
> quality is
> > terrible no matter what the width is and the cpu usuage is very high. I
> have a
> > P4 1.5Ghz using a WinTV Go for capture and NVidia 440MX for TV out (3123
> drivers).
>
> Define "quality is terrible"? Do you mean lost frames, ie jerky video or
> that the picture is grainy and horrible?
>
> Lost frames would seem to imply a performance problem. Check for DMA on
> the
> hard disk (hdparm /dev/hda) first. Does switching to rtjpeg help?
>
> The other thing that I have found is that adding a "gbuffers=lots" option
> to
> the bttv module options helps quite a bit, although this seems to be
> against
> the general advice that I have seen elsewhere (this file is usually
> /etc/modules.conf - google on gbuffers= for more documentation)
>
> Did you find it fairly easy getting tv out on your NVidia? Is the 440MX
> fast enough for myth game and general video duties? I am assuming that it
> runs cool enough to air cool? I am thinking about getting a cheap one to
> replace my ATI Radeon which I have so far failed to get TVout working...
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
>
Re: Capture Card Resolution -- was: Re: 2 Capturecard questions [ In reply to ]
> Thanks, adding gbuffers=16 helps considerably. But, gbuffers=32 just
hangs
> mythfrontend. It still appears as if it is dropping frames in both rtjpeg
and
> mpeg4, but it is much better than before. If the height for capture is
set to
> 240 it doesn't appear to drop any frames. CPU load is fine, always at
least 25%
> idle. I am using DMA for hd access and get ~30MB/s. I did find some
references
> to gbuffers=32 on the web and people seem to have success. Not me. Any
other
> ideas? Would it help to go to the v4l2 stuff and the lastest bttv driver?
I am
> willing to try anything. One thing I have observed is the CPU usage of X.
If I
> capture at 720x240 X uses about 6-8% cpu. Capturing at 352x480 X uses
about 22%
> cpu. I don't think this is the issue, but might be something wrong. I am
> pretty sure the dropped frames are on the capture side, I always of idle %
of 10+.

I can use gbuffers=64 without a problem, so it sounds like a memory buffer
problem somewhere. I am using a vanilla 2.4.20 kernel (under gentoo), and
settings in the BIOS seem quite normal, but fairly optimised. AGP Window is
64MB I think.

What I would suggest is that you try recording without using myth, try using
lavrec (part of mjpegtools) and play with settings to see what works. For
instructions on using lavrec see the sourceforge site under the documents
section - there is a howto there with a command line which works (you need
the --software-encoding switch basically). Lavrec shows clearly when frames
are being dropped.
Re: Capture Card Resolution -- was: Re: 2 Capturecard questions [ In reply to ]
OK, much better now. I increased the value of VMALLOC_RESERVE from 128 to 256.
Now I can add gbuffers=64 without a problem. Now, the quality is pretty good
at 480x480 and can't do any higher. I do notice a little frame loss and will
try your test later on. It is almost as good as my digital cable box now.
Almost ready to use it full time. :-)

Thanks for all the help.
--Ken


Quoting Edward Wildgoose <edward.wildgoose@frmhedge.com>:

>
>
> > Thanks, adding gbuffers=16 helps considerably. But, gbuffers=32 just
> hangs
> > mythfrontend. It still appears as if it is dropping frames in both
> rtjpeg
> and
> > mpeg4, but it is much better than before. If the height for capture is
> set to
> > 240 it doesn't appear to drop any frames. CPU load is fine, always at
> least 25%
> > idle. I am using DMA for hd access and get ~30MB/s. I did find some
> references
> > to gbuffers=32 on the web and people seem to have success. Not me. Any
> other
> > ideas? Would it help to go to the v4l2 stuff and the lastest bttv
> driver?
> I am
> > willing to try anything. One thing I have observed is the CPU usage of
> X.
> If I
> > capture at 720x240 X uses about 6-8% cpu. Capturing at 352x480 X uses
> about 22%
> > cpu. I don't think this is the issue, but might be something wrong. I
> am
> > pretty sure the dropped frames are on the capture side, I always of idle
> %
> of 10+.
>
> I can use gbuffers=64 without a problem, so it sounds like a memory buffer
> problem somewhere. I am using a vanilla 2.4.20 kernel (under gentoo), and
> settings in the BIOS seem quite normal, but fairly optimised. AGP Window
> is
> 64MB I think.
>
> What I would suggest is that you try recording without using myth, try
> using
> lavrec (part of mjpegtools) and play with settings to see what works. For
> instructions on using lavrec see the sourceforge site under the documents
> section - there is a howto there with a command line which works (you need
> the --software-encoding switch basically). Lavrec shows clearly when
> frames
> are being dropped.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@snowman.net
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
>


--
Ken VanDine
biZrace Inc.
http://www.biZrace.com
kvandine@biZrace.com