[mythtv-users] Correcting/Adjusting Overscan In X.org/MythTV

Aran Cox spin667 at mchsi.com
Fri Mar 11 21:49:04 UTC 2005

Correcting/Adjusting Overscan In X.org/MythTV

NOTE: I am not a video expert.  I believe what follows is useful for
someone trying to correct overscan in the context of running MythTV on
a CRT.  I don't own an LCD display, DFP, or projector.  This info may
or may not be useful to those trying to run MythTV on something other
than a CRT.  I'd welcome corrections to any of the info that follows.

What is Overscan and why is it a problem?
Overscan is the solution to the problem of completely filling the
screen edge to edge and avoiding distortions that appear in the video
image at the edge of the screen.  Essentially when you are watching TV
there is some portion of the image that is not viewable by you, it's
off the screen.  When watching TV you probably don't notice this and
in most cases it doesn't matter.  TV show producers, movie-makers,
set-top box designers, and even console video game makers are well
aware that they cannot expect to use the edges of the display and
expect viewers at home to be able to see it.  So, they confine
themselves to a rectangle in the middle of the screen.

This is a problem when using software designed for display on a
computer monitor.  The application designer often makes the (perfectly
reasonable) assumption that you can see every pixel.  So, when
traditional desktop applications collide with display on a TV, some
required portion of the image gets cut off, often a menu bar, panel or
set of icons.  It can also be a problem when interfacing a video card
to a TV.  Sometimes the overscan is so unreasonable that even when
playing video too much of the image is off the edge of the screen.

So, how do you fix this overscan issue?  Before we get to that I'll
talk briefly about three elements that you will see on your TV while
running MythTV and what if any amount of overscan might be

1. Application UI
This includes the general UI of MythTV but might also include
interfaces for applications launched from within MythTV like xine or
various game emulators, or possibly any other Linux application.  For
MythTV you can have some considerable overscan present and the MythTV
UI is still quite usable.  The exceptions are IMHO the Setup screens
and the Guide.  The setup menus are particularly hard to use with any
overscan because you often can't tell if a particular checkbox is
checked, or read the descriptions of various options, or see the
Cancel, Back, Next/Finish buttons at the bottom of the screen.  Now,
MythTV has some easily used options to put the UI within the viewable
area of the screen.  They're great but there are some downsides to
using them which we'll talk about later when we get to them.  Other
programs may or may not be adjustable in the same way.  Normal
desktop-type windowed applications can be resized to use only the
viewable portion of your screen, if you can get a hold of the edge in
the first place.  Most applications that can be used in fullscreen
mode (like the video game emulators) use the whole screen and that's
it therefore you're stuck.

For general application use you really don't want any overscan at all.
Ideally the viewable portion of the display would fill your TV edge to
edge with no overscan and no underscan.  Some slight underscan (where
there are black borders around the edge of the screen) would actually
be preferable to any overscan for normal application use.

2. Video
When watching video you could argue that having no over or underscan
would be ideal.  For various reasons, some slight overscan is probably
preferable and inevitable.  The reason that some overscan might be
preferable is that you may find black borders around the edge of the
screen to be distracting. Of course if you have no under and no over
scan, there shouldn't be black borders but usually that's nor
perfectly possible anyway.  Also, some programming (TV shows, movies,
etc.) don't use the whole display area.  They include black bars as a
portion of the video you are trying to play back.  If your TV has no
overscan at all noticeable black bands will appear when you play back
video like this.  You may or may not find this distracting.  If your
display is underscanned (like the default configuration of xbox xebian
is on my TV) then playing back video which already contains some black
bars can appear downright absurd.

In addition most TVs exhibit some distortion at the edges which make
the image appear bent or bowed at the edges, particularly in the
corners.  Sometimes you can correct this, depending on the TV.  In
other cases the only practical way to hide these is to push them off
the edge of the viewable screen.

For the reasons above I would prefer some slight amount of overscan
when watching video, others may disagree.

3. OSD/Video Overlay
When playing back video (whether via xine or MythTV or whatever) you
can usually bring up some kind of On Screen Display or overlay
(so-called because it's overlayed on top of the video you are
watching.)  In general you really want the whole OSD to fit on the
screen.  Many programs (like xine) assume that the whole display area
is visible to the user and consequently will position it's OSD in such
a way that it might be off the viewable edge of the screen.  MythTV
generally makes this assumption as well. (It might be possible to
adjust this without decreasing the size of the gui and using the GUI
size for playback, if it is I'd like to know about it.  I'll talk more
about this later.)  In any case having the OSD off the edge of the
screen may or may not be a problem.  If it's subtitles it could be a
big issue.  If it's just the lower edge of the pause display in
MythTV, it's probably no big deal. Mostly I dislike having the OSD off
the edge of the screen because it looks terribly tacky.  :)

OK, now to the meat.  You've got too much overscan or maybe not
enough.  You want to tinker with it but how do we change the amount of
overscan?  There are many methods.  I'll cover them in the order in
which you might want to try them.  Some are easier than others, some
may not be possible in all situations, because your TV doesn't allow
it or because you're driver doesn't support it, etc.

1. Service Menu Adjustments
You're all likely familiar with adjusting the size and position of the
display on your PC monitor.  Usually it's quite easy to enter an
on-screen menu system and make adjustments to the height, width and
position of the image.  It might be possible to do the same thing with
your TV.  Often times making adjustments of this sort requires that
you enter into a service menu.  How you get into the service menu is
highly brand and model dependent.  My Sanyo requires that you hold
down Volume- on the front panel while plugging the TV in. Most service
menus are very not-user friendly.  In order to have much of a chance
of adjusting your TV via the service menu you would be wise to acquire
the service manual for your TV.  Sometimes they can be downloaded from
the Internet (though often not directly from the manufacturer from the
same location as the the regular user manual.)  I'm not sure what
proportion of TV's have such menus or how available manuals are for
any given brand.  Probably avsforum.com is a good place to start
looking for information about your TV and of course google might come
in handy also.

Once you have a manual and are in the service menu you still may not
be able to adjust overscan perfectly.  You may not be able to directly
affect the size and position of the display.  Other parameters may
influence it and even with the service manual you aren't likely to get
clear instructions on how to achieve adjusting the overscan.  My TV
has hundreds of adjustable parameters mostly with very obscure names.
The size/position parameters were fairly clear, others less so.
Usually you can also adjust parameters relating to contrast,
sharpness, brightness, etc although usually some of those are
adjustable without going into the service menu.  I highly suggest you
take notes on what you changed, what the value was when you found it
and what you changed it to.  You're likely to regret it otherwise.

So, what if you have size/position adjustments?  Can we completely
eliminate overscan?  Probably... at the expense of some distortions at
the edge of the screen.  You may quickly find that adjusting the
size/position will reveal or exacerbate image distortions at the edge
of the screen.  Often there are other adjustable parameters in the
service menu that might help you correct them... if you can find them
and understand how to use them.  It's possible using them may fix some
distortion in one part of the screen and create them in another.  You
may have to be willing to compromise when making these adjustments.

What happens if you have no service menu, or no manual, or no desire
to monkey with it?

2) Scan Converter Adjustments
If you are using some kind of external converter to go from say, VGA
to S/Video or VGA to Component it's possible that the device may have
some over/under scan adjustments built in.  I owned a cheap
VGA->S/Video converter that had an overscan adjustment on it.  It
worked about as well as the converter did... which is not very well at
all.  The adjustments weren't very fine and there was no setting which
worked well for me.  Still, if you are using such a device it's worth
trying out as it's likely to be quite easy to test.

3) Video Card/Driver Adjustments
There are two parts to this.  One is direct driver option support for
adjusting overscan.  The second is playing games with the video

3a) Driver Options
The nVidia corp. binary driver for Linux has an Overscan option called
TVOverScan.  My understanding is this increases the amount of overscan
but cannot be used to decrease it.  It also seems only work on
Composite and S/Video outputs with supported cards, not every nVidia
based card.  It may also be possible to adjust overscan with the
nvidia-settings tool included with the binary driver.

SIS based cards also have support for adjusting overscan and
position.  I have no experience with it though so I direct you to 
http://www.winischhofer.at/linuxsisvga.shtml for more details.

As for other brands, including ATI, I simply don't know one way or
another.  Look to the gatos (http://gatos.sourceforge.net/) or X.org
documentation for what options may be available for your video driver.

The xbox has (had?) a tool for making adjustments to over/underscan
called xbv.  No idea if it's still supported or if it's been replaced.

Usually these options are worth looking into because it's relatively
painless to experiment with them.

3b) Video Timings
This route requires some experimentation and a little knowledge of how
X modelines are constructed.  In essence you are creating a video mode
that uses timings which are the same (or substantially the same) as a
mode your TV will support, but the resolution is reduced.  This has
the effect of decreasing the usable resolution of your screen but
since the resolution as presented to X applications is also reduced
they all naturally fall within (you hope) the viewable portion of your
display.  The drawback is that you usually end up using a very odd
screen resolution.  This may or may not be a problem.  Some
applications might not like a non-standard resolution, like windows
games running under emulation. (They may not like HD resolutions
anyway, so it may be moot.)  MythTV has no problem with it though.
Also, if you are running say 1902x1064 in order to be close to 1080i
(1920x1080) that means that when playing back 1080i HDTV recordings
they have to be scaled.  You may never notice though, or it may bother
you.  In any case the definitive reference is the relevant, then
largely irrelevant, then relevant again Video Timings HOWTO written by
Eric S. Raymond in 2000.  It's archived variously about the Internet,
here's one link:


The Video Timings HOWTO is chock full of useful information on how
video works from the perspective of X.  It's informative even if you
don't plan on trying to concoct your own modeline.

4) Application Adjustments
MythTV has the ability to fix your overscan problems without resorting
to any of the above messing about.  It works really really well,
especially if you only run MythTV and aren't worried about emulators,
xine, etc.  In fact, many people could be happy just adjusting some
mythfrontend settings and forgetting all about the above.  There are
some drawbacks, but they aren't generally worse than 3b above and are
far easier to achieve.

In the Setup menu of mythfrontend enter the Appearance menu.  The
second page has options for adjusting the size and position of the
Myth UI.  Initially it's set to 0 for all which means to use the whole
display.  If you have overscan, start by setting the width and height
to your screen resolution-20 or so.  Then set the offsets to 10 to
keep the image centered.  When you're done finish your changes by
skipping through the other menu options and mythfrontend will try out
your new settings.  Keep tweaking until everything is within the the
viewable display area. Another option in this menu is to use the GUI
size for TV playback.  This may or may not be what you want.  If your
TV is only slightly overscanned you might switch it off.  If your TV
is badly overscanned turning it on might be a better choice.  Since
it's so relatively painless to change compared to everything we've
discussed up until now you can experiment away until you get it like
you want it.

So why wouldn't you want to do it this way?  In some ways you are
casting away some resolution... choosing not to use it.  However, if
you can't get rid of the overscan via other methods then you can't use
those pixels anyway so who cares, right?  Plus these adjustments don't
carry to other applications you may launch from MythTV, like game
emulators, etc.

There are other options which affect overscan/underscan during
playback in MythTV.  It's in Setup/TV/Playback several pages in.  Here
you can adjust the vertical and horizontal over/under scan.  I don't
know exactly how mythfrontend uses either of these values.  Underscan
might be implemented by using less of the screen during playback.  How
is overscan done?  Clipping of the edges?  Perhaps someone can comment
on the way MythTV uses these options.

There is actually quite a bit of info on the net about making
adjustments to TVs and the tools to do it with.  I found the following
article which includes some useful links at the bottom in addition to
discussing overscan and so on.  Two of the links are to images
designed to be displayed while making adjustments.


More information about the mythtv-users mailing list