I am trying to understand the relationship between frame sizes, aspect
ratios and all that sort.  For reference, I am in North America here
so NTSC applies.

I have a Matrox G400 Marvel.  I capture using lavrec with -d21.  My
captured MJPEG winds up being 352x480.  This is my first puzzle.  Why
is a decimation of "2" 352 pixels wide?  That would imply no
decimation is 704 pixels wide.  But I though an NTSC frame was 720
pixels wide.  So why 704?

Next, my captured MJPEG appears to have no aspect ratio information in
it.  When I play it with mplayer, I have to use "-aspect" (or "-x ,,,
-y ...") to get something resembling the original picture.  So given
the capture size, I thought an aspect of 704:480 (1.4666667:1) would
be correct, and on my computer screen it looks about right.

So, using that aspect ratio (704:480) I convert my MJPEG to an MPEG4
AVI with mencoder (-ovc lavc -lavcopts
vcodec=mpeg4:aspect=704/480:vbitrate=3000") and display that to my TV
using the G400's TV-Out CRTC2 with DirectFB.

However when I play using that aspect ratio on my G400's TV output
(DirectFB with CRTC2 support), I get small black borders at the top
and bottom of the screen (like letterbox display), which is not
surprising considering the aspect ratio is not quite the 4:3
(1.3333:1) standard of the television screen.

With the TV-Out, I also get some inverted field parity artifacts
throughout (although not a complete field inversion) the display.  To
give an example, if I cpature a television broadcast with a horizontal
running text banner on the bottom of the screen, like CNN, the top
half of the text in the banner has proper field parity while the lower
half is inverted -- so only some lines of the display are inverted,
not all.  If I override the aspect ratio when playing to the
television with -aspect 4:3, the picture looks good again with no
top/bottom borders and field parity looks correct.  So the aspect
seems to want to be 4:3.

So what values should I be using for aspect given a 352x480 NTSC
capture at -d21?  If I should be using 4:3, how is that justified
considering the capture dimensions?  Or rather, how do I get to a
value of 4:3 mathematically given the cpature dimensions are 352 and
480?

The reason for the last question is that I need to apply an "aspect
determination formula" to video captures that I want to crop the top
and bottom black borders off of.  Obviously, a 4:3 aspect ratio needs
to be recalculated when you remove some of the vertical dimension of a
capture.  But if I can't mathematically determine a 4:3 aspect from
352x480, how do I do it given an arbitrary video height (after
cropping)?

Thanx,
b.

-- 
Brian J. Murrell

Attachment: msg00675/pgp00000.pgp
Description: PGP signature

Reply via email to