Difference between revisions of "Overscan"

From MythTV Official Wiki
Jump to: navigation, search
m (Making MythTV fit the screen on a TV)
 
(14 intermediate revisions by 8 users not shown)
Line 2: Line 2:
 
... is a question which crops up a lot.
 
... is a question which crops up a lot.
  
The reason that the PC's TV output/VGA/DVI output doesn't fit _exactly_ on the screen is more than likely because of overscan.  Most GUI elements _should_ fit the screen properly because the theme design guide specifies that a minimum of 5% of the screen's outer area be left empty.
+
The reason that the PC's TV output/VGA/DVI output doesn't fit _exactly_ on the screen is more than likely because of '''overscan'''.  Most GUI elements _should_ fit the screen properly because the theme design guide specifies that a minimum of 5% of the screen's outer area be left empty.
  
 
'''A little bit of history'''
 
'''A little bit of history'''
  
The actual display area of early TVs varied due to manufacturing tolerance problems.  TV set makers needed to ensure that people didn't see 'fuzzy lines' or 'black bars' on the picture.  The reason they might see parts of the picture they weren't intended to see was due to the aforementioned manufacturing tolerance problems.  Displaying video signals to any degree of accuracy relies on rock-solid timing - something that just wasn't possible in the 1950s when TV sets first appeared on the market.  By making TVs 'zoom in' to the picture to a small degree (sometimes as much as 10% or more), manufacturers effictively guaranteed every corner of screen would be filled with a watchable picture.
+
The actual display area of early TVs varied due to manufacturing tolerance problems.  TV set makers needed to ensure that people didn't see 'fuzzy lines' or 'black bars' on the picture.  The reason they might see parts of the picture they weren't intended to see was due to the aforementioned manufacturing tolerance problems.  Displaying video signals to any degree of accuracy relies on rock-solid timing - something that just wasn't possible in the 1950s when TV sets first appeared on the market.  By making TVs 'zoom in' to the picture to a small degree (sometimes as much as 10% or more), manufacturers effectively guaranteed every corner of screen would be filled with a watchable picture.
  
 
Sadly, overscan is still very much prevalent on modern TVs - even on some HD sets.
 
Sadly, overscan is still very much prevalent on modern TVs - even on some HD sets.
Line 15: Line 15:
 
'''With Nvidia GF4 (or greater) VGA cards'''
 
'''With Nvidia GF4 (or greater) VGA cards'''
  
If TV-out (composite or s-video) is being used, check out the nvidia-settings utility.  This handy little program has a slider to control the amount of overscan applied to the TV output.  A great deal of adjustment is possible..  
+
If TV-out (composite or s-video) is being used, check out the [[nvidia-settings]] utility.  This handy little program has a slider to control the amount of overscan applied to the TV output.  A great deal of adjustment is possible..  
  
It may even be possible to get almost all the desktop to show on TV without any black lines at the egdes.  There is no guarantee that the screen can be resized or centred well enough to be able to see _all_ of the desktop .
+
It may even be possible to get almost all the desktop to show on TV without any black lines at the edges.  There is no guarantee that the screen can be resized or centred well enough to be able to see ''all'' of the desktop.
  
 
To restore any nvidia-settings changes upon starting or restarting X, add the line
 
To restore any nvidia-settings changes upon starting or restarting X, add the line
 +
<pre>
 +
nvidia-settings -l
 +
</pre>
 +
to .xinitrc or the X server startup script (or maybe even the desktop manager session file) so that it executes before your window manager or the frontend.
  
<tt>nvidia-settings -l</tt>
+
'''With NVidia Cards and more recent nVidia drivers (greater than version 300)'''
  
to .xinitrc or the X server startup script (or maybe even the desktop manager session file).
+
nVidia has recently changed their drivers to allow much finer control of the overscan in X11. See the below document for details:
 +
 
 +
http://us.download.nvidia.com/XFree86/Linux-x86/304.64/README/configtwinview.html
 +
 
 +
<pre>
 +
Section "Screen"
 +
        Identifier      "DefaultScreen"
 +
        Monitor        "SamsungHDTV"
 +
        Device          "Videocard0"
 +
 
 +
        SubSection "Display"
 +
                Depth 24
 +
                Modes "1280x720"
 +
        EndSubSection
 +
 
 +
        Option "metamodes" "DFP-0: 1280x720 { ViewPortIn=1280x720, ViewPortOut=1045x675+120+15 }"
 +
EndSection
 +
</pre>
 +
 
 +
The above line in the "Screen" section of /etc/X11/xorg.conf will put a 120 pixel left margin and a 15 pixel top margin to a 1045x675 relative dimension.  The 1280x720 screen size will remain intact but will be scaled to this new size.  It's a little confusing at first.  Start with small numbers and work your way up.  The result is a fine tuned overscan.  I made myself a black and white image with a big X and white lines on the edge borders to use as my X background when I was tuning the television.  It is at http://i.imgur.com/oHoy4dL.png
 +
 
 +
This television's native resolution is 1920x1080.  A modeline was used to change it.  Instructions for doing this were found on the Ubuntu forum: http://ubuntuforums.org/showthread.php?t=1003099&page=2
  
 
'''For everything else'''
 
'''For everything else'''
Line 31: Line 56:
 
The GUI width (px) and GUI height (px) settings are 0 by default but can be changed by the PgUp and PgDn keys for coarse adjustment and the Left & Right arrow keys for fine adjustment.  The default settings of 0 in the width & height fields make MythTV use the entire screen area, whose size will depend on the resolution X is currently running at.
 
The GUI width (px) and GUI height (px) settings are 0 by default but can be changed by the PgUp and PgDn keys for coarse adjustment and the Left & Right arrow keys for fine adjustment.  The default settings of 0 in the width & height fields make MythTV use the entire screen area, whose size will depend on the resolution X is currently running at.
  
A good starting point for the GUI size to make it fit a TV screen is 5% less than the resolution X is running at (e.g. 760x580 in the case of 800x600 screen res.).
+
A good starting point for the GUI size to make it fit a TV screen is 5% less than the resolution X is running at (e.g. 760x570 in the case of 800x600 screen resolution, or 972x730 in the case of 1024x768).
  
If the GUI is off-centre, the 'GUI X offset' and 'GUI Y offset' fields can be used.  Again, PgUp & PgDn keys give coarse adjustment while the Left & Right arrow keys provide fine adjustment.
+
If the GUI is off-centre, the 'GUI X offset' and 'GUI Y offset' fields can be used (20 and 15 if you're using 800x600, or 26 and 19 if you're using 1024x768 and the figures above for GUI size settings).  Again, PgUp & PgDn keys give coarse adjustment while the Left & Right arrow keys provide fine adjustment.
 +
 
 +
''Note - for some window managers (like gnome) the menubar may appear at the top of the screen with the resized GUI below it. Using another window manager like blackbox or fluxbox will eliminate this problem since they do not have a menubar at the top of the screen. This will also make it easier to access a menubar that is off screen because of overscan. The main menu can be accessed in blackbox or fluxbox anywhere on the screen by right clicking the mouse.  HOWEVER if you do want to keep gnome, just right click on the menubar at the top, click "customize panel" and check off autohide.  Now MythTV will run fullscreen correctly.''
  
 
''Please note: changes made to the above settings do not take effect immediately.  GUI elements need to be resized and the whole screen has to be redrawn before changes can be seen''
 
''Please note: changes made to the above settings do not take effect immediately.  GUI elements need to be resized and the whole screen has to be redrawn before changes can be seen''
Line 64: Line 91:
  
 
Shift the video image up (negative) or down (positive) by 'x' number of pixels
 
Shift the video image up (negative) or down (positive) by 'x' number of pixels
 +
 +
 +
== MPlayer Overscan Adjustment ==
 +
 +
To adjust your overscan in MPlayer when using MythVideo, you can use the dsize and expand video filters.  The following mplayer options will adjust a 720p display down to 1200x680 instead of 1280x720:
 +
 +
<code>-monitoraspect 16:9 -vf dsize=1200:680:0,expand=1200:680</code>
 +
 +
The dsize filter sets the size of the mplayer window to 1200x680 if the video aspect ratio is exactly 16:9.  Otherwise it will be smaller than that, so we need to use the expand filter to draw black bars around the video to fill the screen.
 +
 +
 +
== Xine Overscan Adjustment ==
 +
 +
Anyone have any ideas on how to adjust overscan in xine?
 +
 +
== HDTV ==
 +
If you have a newer HDTV display if might be worthwhile checking out if your TV has the capability to turn off overscan, which means you will not need any s/w changes ie your TV will show your entire desktop natively.
 +
[[Category:Glossary]]

Latest revision as of 19:59, 16 February 2013

"Why doesn't the desktop/MythTV interface fit properly on my TV screen?"

... is a question which crops up a lot.

The reason that the PC's TV output/VGA/DVI output doesn't fit _exactly_ on the screen is more than likely because of overscan. Most GUI elements _should_ fit the screen properly because the theme design guide specifies that a minimum of 5% of the screen's outer area be left empty.

A little bit of history

The actual display area of early TVs varied due to manufacturing tolerance problems. TV set makers needed to ensure that people didn't see 'fuzzy lines' or 'black bars' on the picture. The reason they might see parts of the picture they weren't intended to see was due to the aforementioned manufacturing tolerance problems. Displaying video signals to any degree of accuracy relies on rock-solid timing - something that just wasn't possible in the 1950s when TV sets first appeared on the market. By making TVs 'zoom in' to the picture to a small degree (sometimes as much as 10% or more), manufacturers effectively guaranteed every corner of screen would be filled with a watchable picture.

Sadly, overscan is still very much prevalent on modern TVs - even on some HD sets.

Making MythTV fit the screen on a TV

With Nvidia GF4 (or greater) VGA cards

If TV-out (composite or s-video) is being used, check out the nvidia-settings utility. This handy little program has a slider to control the amount of overscan applied to the TV output. A great deal of adjustment is possible..

It may even be possible to get almost all the desktop to show on TV without any black lines at the edges. There is no guarantee that the screen can be resized or centred well enough to be able to see all of the desktop.

To restore any nvidia-settings changes upon starting or restarting X, add the line

nvidia-settings -l

to .xinitrc or the X server startup script (or maybe even the desktop manager session file) so that it executes before your window manager or the frontend.

With NVidia Cards and more recent nVidia drivers (greater than version 300)

nVidia has recently changed their drivers to allow much finer control of the overscan in X11. See the below document for details:

http://us.download.nvidia.com/XFree86/Linux-x86/304.64/README/configtwinview.html

Section "Screen"
        Identifier      "DefaultScreen"
        Monitor         "SamsungHDTV"
        Device          "Videocard0"

        SubSection "Display"
                Depth 24
                Modes "1280x720"
        EndSubSection

        Option "metamodes" "DFP-0: 1280x720 { ViewPortIn=1280x720, ViewPortOut=1045x675+120+15 }"
EndSection

The above line in the "Screen" section of /etc/X11/xorg.conf will put a 120 pixel left margin and a 15 pixel top margin to a 1045x675 relative dimension. The 1280x720 screen size will remain intact but will be scaled to this new size. It's a little confusing at first. Start with small numbers and work your way up. The result is a fine tuned overscan. I made myself a black and white image with a big X and white lines on the edge borders to use as my X background when I was tuning the television. It is at http://i.imgur.com/oHoy4dL.png

This television's native resolution is 1920x1080. A modeline was used to change it. Instructions for doing this were found on the Ubuntu forum: http://ubuntuforums.org/showthread.php?t=1003099&page=2

For everything else

If nvidia-settings did not solve the problem (or it cannot be used) help is still at hand. MythTV's GUI can be resized and repositioned from within the 'Screen Settings' section of the Appearance menu.

The GUI width (px) and GUI height (px) settings are 0 by default but can be changed by the PgUp and PgDn keys for coarse adjustment and the Left & Right arrow keys for fine adjustment. The default settings of 0 in the width & height fields make MythTV use the entire screen area, whose size will depend on the resolution X is currently running at.

A good starting point for the GUI size to make it fit a TV screen is 5% less than the resolution X is running at (e.g. 760x570 in the case of 800x600 screen resolution, or 972x730 in the case of 1024x768).

If the GUI is off-centre, the 'GUI X offset' and 'GUI Y offset' fields can be used (20 and 15 if you're using 800x600, or 26 and 19 if you're using 1024x768 and the figures above for GUI size settings). Again, PgUp & PgDn keys give coarse adjustment while the Left & Right arrow keys provide fine adjustment.

Note - for some window managers (like gnome) the menubar may appear at the top of the screen with the resized GUI below it. Using another window manager like blackbox or fluxbox will eliminate this problem since they do not have a menubar at the top of the screen. This will also make it easier to access a menubar that is off screen because of overscan. The main menu can be accessed in blackbox or fluxbox anywhere on the screen by right clicking the mouse. HOWEVER if you do want to keep gnome, just right click on the menubar at the top, click "customize panel" and check off autohide. Now MythTV will run fullscreen correctly.

Please note: changes made to the above settings do not take effect immediately. GUI elements need to be resized and the whole screen has to be redrawn before changes can be seen

A note about "Use GUI size for TV playback"

This setting will scale video playback to fit the same area the GUI occupies.

Broadcasters now take it for granted that TV sets will overscan the image they display (i.e. allow the image to spill 'off the edges'), so more often than not, strange artifacts (or even things like microphones) may be seen in the outer 5% of the image.

Other notes

Adjusting the GUI width & height is almost essential for running MythTV in 'windowed' mode - with those settings the size of the 'window' can be determined.

TV Playback Overscan Adjustment Settings

Vertical Over/underscan percentage

If the TV video image is too tall to fit your screen, enter a negative number here. Conversely, if it is too short, a positive number will 'zoom' in to the image (subject to clipping).

Horizontal Over/underscan percentage

If the TV video image is too fat to fit your screen, enter a negative number here. Conversely, if it is too thin, a positive number will 'zoom' in to the image (subject to clipping).

Scan displacement (X)

Shift the video image left (negative) or right (positive) by 'x' number of pixels

Scan displacement (Y)

Shift the video image up (negative) or down (positive) by 'x' number of pixels


MPlayer Overscan Adjustment

To adjust your overscan in MPlayer when using MythVideo, you can use the dsize and expand video filters. The following mplayer options will adjust a 720p display down to 1200x680 instead of 1280x720:

-monitoraspect 16:9 -vf dsize=1200:680:0,expand=1200:680

The dsize filter sets the size of the mplayer window to 1200x680 if the video aspect ratio is exactly 16:9. Otherwise it will be smaller than that, so we need to use the expand filter to draw black bars around the video to fill the screen.


Xine Overscan Adjustment

Anyone have any ideas on how to adjust overscan in xine?

HDTV

If you have a newer HDTV display if might be worthwhile checking out if your TV has the capability to turn off overscan, which means you will not need any s/w changes ie your TV will show your entire desktop natively.