Difference between revisions of "User Manual:JudderFree"

From MythTV Official Wiki
Jump to: navigation, search
(Created page with '=How to achieve judder free perfectly synced playback= You can make mythtv set your display to best match the video being played. This is something commonly done by your bluray p…')
 
 
(24 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
{{Template:User_Manual_TOC}}
 
=How to achieve judder free perfectly synced playback=
 
=How to achieve judder free perfectly synced playback=
 +
 +
==Overview==
 
You can make mythtv set your display to best match the video being played.
 
You can make mythtv set your display to best match the video being played.
 
This is something commonly done by your bluray player, PS3 etc..
 
This is something commonly done by your bluray player, PS3 etc..
Line 5: Line 8:
 
If you watch a 24fps video, it usually sets your display at 24Hz..
 
If you watch a 24fps video, it usually sets your display at 24Hz..
  
This is a two cases scenario however, for most, the basic one will be sufficient ; if you want the best result however, you will be interested with the advanced case.
+
This is a two cases scenario however, for most, the basic one will be sufficient ; if not or if you want the best result however, you will be interested with the advanced case.
  
 
In both cases, there’s only one configuration to set in MythTV.
 
In both cases, there’s only one configuration to set in MythTV.
Line 12: Line 15:
  
 
[[File:syncscreencapture.jpg]]
 
[[File:syncscreencapture.jpg]]
For GUI and Video Output, enter the native resolution of your screen ; for a full HD TV, that is 1920x1080. Rate should be set as “Any”
+
 
 +
For GUI and Video Output, enter the native resolution of your screen ; for a full HD TV, that is 1920x1080.
 +
 
 +
Rate should be set as '''“Any”''' so Myth will select the best available one.
  
 
Select Next until you reach the end of the configuration screen.
 
Select Next until you reach the end of the configuration screen.
Line 36: Line 42:
  
 
or edit /etc/X11/xorg.conf
 
or edit /etc/X11/xorg.conf
and add in the screen or adapter section:
+
and add in the screen or device section:
Option      "FlatPanelProperties" "Scaling = Native"
+
<code>
 +
Option      "FlatPanelProperties" "Scaling = Native"
 +
</code>
 +
 
 +
If the basic configuration doesn't lead to judder-free playback, you will need to adjust setting for your monitor and/or graphics card (as described in the advanced scenario).
  
 
==Advanced Scenario==
 
==Advanced Scenario==
  
One problem with the scenario described above ; is that the Earth isn’t flat and standard refresh rates aren’t integers in all part of the world.
+
One problem with the scenario described above ; is that the Earth isn’t flat and standard refresh rates aren’t integers in all part of the world. The other is that not all TVs properly report their capabilities through EDID.
  
 +
===The pain with frequencies===
 
You may have read that PAL is 50Hz and NTSC is 60Hz... Not quite so. some PAL standards are 50Hz, but NTSC (and PAL-M/N) is 59.94Hz (actually 60Hz * 1000 / 1001)
 
You may have read that PAL is 50Hz and NTSC is 60Hz... Not quite so. some PAL standards are 50Hz, but NTSC (and PAL-M/N) is 59.94Hz (actually 60Hz * 1000 / 1001)
 
The signal being interlaced, the effective frame rate is 29.97fps.
 
The signal being interlaced, the effective frame rate is 29.97fps.
Line 48: Line 59:
 
24Hz in NTSC countries is actually 23.976Hz (60Hz * (1000 /  1001) / 2.5).
 
24Hz in NTSC countries is actually 23.976Hz (60Hz * (1000 /  1001) / 2.5).
  
The problem is that the X11 framework that allows changing resolution and refresh rates on the fly (called XRANDR) only supports integers. So it can not easily tell the difference between 24Hz and 23.976Hz.
+
The problem is that the X11 framework that allows changing resolution and refresh rates on the fly (called XRANDR) only supports integers. So it can not easily tell the difference between 24Hz and 23.976Hz or 60 and 59.94. If you want Myth to be able to differentiate between those rates, follow the instructions below.
  
With Intel and ATI graphic adapters ; 24, 50 and 60Hz is the best you will get.
+
===You can get more with nvidia adapters===
 +
With Intel and ATI graphic adapters 24, 50 and 60Hz is the best you will get. It's not ideal, but it can usually achieve good replay quality.
 
With nvidia adapters however, nvidia has put a work around this limitation by presenting a unique refresh rate per screen configuration.
 
With nvidia adapters however, nvidia has put a work around this limitation by presenting a unique refresh rate per screen configuration.
 
So it will show as the list of available rates: 50, 51, 52, 53 etc... when 50 is 50Hz, 51 is 59.97, 52 is 60Hz etc...
 
So it will show as the list of available rates: 50, 51, 52, 53 etc... when 50 is 50Hz, 51 is 59.97, 52 is 60Hz etc...
Line 56: Line 68:
 
To get access to those “rates”, you must make sure the “Dynamic TwinView” is active (that’s the default).
 
To get access to those “rates”, you must make sure the “Dynamic TwinView” is active (that’s the default).
  
 +
===The pain with TVs reporting incomplete EDID===
 
In the ideal world, whatever your TV reports through the EDID should be sufficient. Unfortunately, it is common for a TV to not properly reports all its capabilities, or that X11 failed to work properly with the information provided.
 
In the ideal world, whatever your TV reports through the EDID should be sufficient. Unfortunately, it is common for a TV to not properly reports all its capabilities, or that X11 failed to work properly with the information provided.
  
The idea is to ignore the EDID rates; and use the EIA/CEA-861B standard modelines. This is done with the X option:
+
To find out which ones your TV actually reports; run xrandr.
Option "ExactModeTimingsDVI" "True"
+
 
Option "UseEDIDFreqs" "False"
+
It will show something like:
 +
<code>
 +
Screen 0: minimum 640 x 480, current 1920 x 1080, maximum 1920 x 1080
 +
default connected 1920x1080+0+0 0mm x 0mm
 +
  1920x1080      50.0*    60.0
 +
  800x600        60
 +
</code>
 +
 
 +
You need 50 and/or 25 rates to properly view common recording formats. If your TV doesn't report them, it might still support them.
 +
The idea is to ignore the EDID rates; and use the EIA/CEA-861B standard modelines in /etc/X11/xorg.conf. This is done in the "Monitor" section with the options:
 +
<code>
 +
    Option "ExactModeTimingsDVI" "True"
 +
    Option "UseEDIDFreqs" "False"
 +
    Option "UseEDIDDpi" "False"
 +
    #To use Unity (aka "ubuntu session"), with drivers 3xx, comment the ModeValidation Line
 +
    Option "ModeValidation" "NoEdidModes"
 +
    #UseHotplugEvents is required for 3xx nvidia drivers
 +
    Option "UseHotplugEvents" "False"
 +
</code>
  
 
For True-HD (1920x1080) they are:
 
For True-HD (1920x1080) they are:
 
<code>
 
<code>
    # 1920x1080p @ 50Hz (EIA/CEA-861B)
 
    ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
 
 
     # 1920x1080p @ 60Hz (EIA/CEA-861B)
 
     # 1920x1080p @ 60Hz (EIA/CEA-861B)
 
     ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
 
     ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
 +
    # 1920x1080p @ 50Hz (EIA/CEA-861B)
 +
    ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
 
     # 1920x1080p @ 24Hz (EIA/CEA-861B)
 
     # 1920x1080p @ 24Hz (EIA/CEA-861B)
 
     ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
 
     ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
Line 90: Line 121:
 
For 1280x720, they are
 
For 1280x720, they are
 
<code>
 
<code>
     #1280x720p @ 50Hz (EIA/CEA-861B)
+
     #1280x720p @ 60Hz
     ModeLine "1280x720@50" 74.400 1280 1720 1760 1984 720 725 730 750 +hsync +vsync
+
     ModeLine "1280x720@60" 74.25 1280 1320 1376 1650 720 722 728 750
     #1280x720p @ 59.94Hz (EIA/CEA-861B)
+
     #1280x720p @ 50Hz
     ModeLine "1280x720@59.94" 74.400 1280 1390 1430 1612 720 725 730 770 +hsync +vsync
+
     ModeLine "1280x720@50" 74.100 1280 1720 1760 1976 720 731 736 750 +hsync +vsync
     #1280x720p @ 60Hz (EIA/CEA-861B)
+
     #1280x720p @ 48Hz / for display 24p video
     ModeLine "1280x720@60" 74.400 1280 1390 1420 1623 720 725 730 764 +hsync +vsync
+
     ModeLine "1280x720@48" 71.135 1280 1720 1760 1976 720 731 736 750 +hsync +vsync
 
</code>
 
</code>
  
Here is the xorg configuration for a dual monitor setup: a Panasonic PT-AE4000 projector, and a 17” Viewsonic LCD screen.
+
Here is the xorg configuration for a dual monitor setup: a Panasonic PT-AE4000 projector, and a 17” Viewsonic LCD screen (below is a single monitor sample).
  
 
<code>
 
<code>
Line 116: Line 147:
 
  ModelName    "Panasonic AE-4000"  
 
  ModelName    "Panasonic AE-4000"  
 
  Option     "DPMS"  
 
  Option     "DPMS"  
# 1920x1080p @ 50Hz (EIA/CEA-861B)
 
ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
 
 
  # 1920x1080p @ 60Hz (EIA/CEA-861B)  
 
  # 1920x1080p @ 60Hz (EIA/CEA-861B)  
 
  ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync  
 
  ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync  
 +
# 1920x1080p @ 50Hz (EIA/CEA-861B)
 +
ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
 
  # 1920x1080p @ 24Hz (EIA/CEA-861B)  
 
  # 1920x1080p @ 24Hz (EIA/CEA-861B)  
 
  ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync  
 
  ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync  
Line 140: Line 171:
 
  HorizSync 20.0 - 150.0  
 
  HorizSync 20.0 - 150.0  
 
  VertRefresh    23.0 - 90.0  
 
  VertRefresh    23.0 - 90.0  
Option "ExactModeTimingsDVI" "True"  
+
        Option "ExactModeTimingsDVI" "True"
Option "UseEDIDFreqs" "False"  
+
        Option "UseEDIDFreqs" "FALSE"
  EndSection  
+
        Option "UseEDIDDpi" "FALSE"
 +
        #To use Unity (aka "ubuntu session"), with drivers 3xx, comment the ModeValidation Line
 +
        Option "ModeValidation" "NoEdidModes"
 +
        #UseHotplugEvents is required for 3xx nvidia drivers
 +
        Option "UseHotplugEvents" "False"
 +
 
 +
        #For 3xx nvidia, duplicate the first entry to work around a bug causing the modeline to be ignored
 +
# 1920x1080p @ 60Hz (EIA/CEA-861B)
 +
ModeLine "1920x1080@602" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
 +
 
 +
  EndSection
 
   
 
   
 
  Section "Monitor"  
 
  Section "Monitor"  
Line 158: Line 199:
 
  Option     "UseDisplayDevice" "DFP-1"  
 
  Option     "UseDisplayDevice" "DFP-1"  
 
  Option     "UseEvents" "True"  
 
  Option     "UseEvents" "True"  
Option      "ModeValidation"      "NoVesaModes, NoXServerModes"
 
 
  BusID      "PCI:1:0:0"  
 
  BusID      "PCI:1:0:0"  
 
  EndSection  
 
  EndSection  
Line 180: Line 220:
 
  DefaultDepth    24  
 
  DefaultDepth    24  
 
  Option     "FlatPanelProperties" "Scaling = Native"  
 
  Option     "FlatPanelProperties" "Scaling = Native"  
Option     "TwinView" "0"
 
 
  SubSection "Display"  
 
  SubSection "Display"  
 
  Depth    24  
 
  Depth    24  
  Modes "1920x1080@50" "1920x1080@60" "1920x1080@24" "1920x1080@23.976" "1920x1080@50i"
+
  Modes "1920x1080@60" "1920x1080@602" "1920x1080@50" "1920x1080@24" "1920x1080@23.976" "1920x1080@50i"
 
  Modes "1920x1080@60i" "1920x1080@59.94" "1920x1080@59.94i"  
 
  Modes "1920x1080@60i" "1920x1080@59.94" "1920x1080@59.94i"  
 
  EndSubSection  
 
  EndSubSection  
Line 193: Line 232:
 
  Monitor    "Monitor1"  
 
  Monitor    "Monitor1"  
 
  DefaultDepth    24  
 
  DefaultDepth    24  
Option     "TwinView" "0"
 
 
  Option     "FlatPanelProperties" "Scaling = Native"  
 
  Option     "FlatPanelProperties" "Scaling = Native"  
 
  Option     "metamodes" "DFP-0: nvidia-auto-select +0+0"  
 
  Option     "metamodes" "DFP-0: nvidia-auto-select +0+0"  
Line 215: Line 253:
  
 
xrandr -r 51
 
xrandr -r 51
 +
 
You’ll see the screen flicker. Usually the TV has an info button, that will show the refresh rate in use.
 
You’ll see the screen flicker. Usually the TV has an info button, that will show the refresh rate in use.
 
doing: tail /var/log/Xorg.0.log
 
doing: tail /var/log/Xorg.0.log
Line 220: Line 259:
 
Jun 07 13:29:40 NVIDIA(0): Setting mode "1920x1080@60"
 
Jun 07 13:29:40 NVIDIA(0): Setting mode "1920x1080@60"
 
so you now rate 51 is 1920x1080 at 60Hz.
 
so you now rate 51 is 1920x1080 at 60Hz.
 +
 +
In the "Screen" section, as shown in the /etc/X11/xorg.conf above, list all the modes your monitor/TV actually supports.
  
 
Now that X has been configured to see all the possible refresh rates ; MythTV will be able to switch to the most suitable rate as required...
 
Now that X has been configured to see all the possible refresh rates ; MythTV will be able to switch to the most suitable rate as required...
 +
 +
This is an example of xorg.conf for a single screen system (Sony 46X3100 and nvidia ION)
  
 
<code>
 
<code>
Line 229: Line 272:
 
  ModelName    "46X3100"  
 
  ModelName    "46X3100"  
 
  Option     "DPMS"  
 
  Option     "DPMS"  
# 1920x1080p @ 50Hz (EIA/CEA-861B)
 
ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
 
 
  # 1920x1080p @ 60Hz (EIA/CEA-861B)  
 
  # 1920x1080p @ 60Hz (EIA/CEA-861B)  
 
  ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync  
 
  ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync  
 +
# 1920x1080p @ 50Hz (EIA/CEA-861B)
 +
ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
 
  # 1920x1080p @ 24Hz (EIA/CEA-861B)  
 
  # 1920x1080p @ 24Hz (EIA/CEA-861B)  
 
  ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync  
 
  ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync  
Line 246: Line 289:
 
  Modeline "1920x1080@59.94i" 74.175 1920 2008 2052 2200 1080 1085 1095 1125 +hsync +vsync Interlace  
 
  Modeline "1920x1080@59.94i" 74.175 1920 2008 2052 2200 1080 1085 1095 1125 +hsync +vsync Interlace  
 
  # 1920x1080p @ 25Hz (EIA/CEA-861B)  
 
  # 1920x1080p @ 25Hz (EIA/CEA-861B)  
  #ModeLine "1920x1080@25" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync  
+
  ModeLine "1920x1080@25" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync  
 
  # 1920x1080p @ 29.97Hz (EIA/CEA-861B)  
 
  # 1920x1080p @ 29.97Hz (EIA/CEA-861B)  
  #ModeLine "1920x1080@29.97" 74.175 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync  
+
  ModeLine "1920x1080@29.97" 74.175 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync  
 
  # 1920x1080p @ 30Hz (EIA/CEA-861B)  
 
  # 1920x1080p @ 30Hz (EIA/CEA-861B)  
  #ModeLine "1920x1080@30" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync  
+
  ModeLine "1920x1080@30" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync  
 
  HorizSync 20.0 - 150.0  
 
  HorizSync 20.0 - 150.0  
 
  VertRefresh    23.0 - 90.0  
 
  VertRefresh    23.0 - 90.0  
Option "ExactModeTimingsDVI" "True"  
+
        Option "ExactModeTimingsDVI" "True"
Option "UseEDIDFreqs" "False"  
+
        Option "UseEDIDFreqs" "False"
 +
        Option "UseEDIDDpi" "False"
 +
        #To use Unity (aka "ubuntu session"), with drivers 3xx, comment the ModeValidation Line
 +
        Option "ModeValidation" "NoEdidModes"
 +
        #UseHotplugEvents is required for 3xx nvidia drivers
 +
        Option "UseHotplugEvents" "False"
 +
 
 +
        #For 3xx nvidia, duplicate the first entry to work around a bug causing the modeline to be ignored
 +
# 1920x1080p @ 60Hz (EIA/CEA-861B)
 +
ModeLine "1920x1080@602" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
 
  EndSection  
 
  EndSection  
 
   
 
   
Line 261: Line 313:
 
  Driver      "nvidia"  
 
  Driver      "nvidia"  
 
  VendorName  "NVIDIA Corporation"  
 
  VendorName  "NVIDIA Corporation"  
  BoardName  "GeForce 8600 GT"  
+
  BoardName  "GeForce 9400M"  
 
  Option      "ModeValidation"      "NoVesaModes, NoXServerModes"  
 
  Option      "ModeValidation"      "NoVesaModes, NoXServerModes"  
 
  BusID      "PCI:1:0:0"  
 
  BusID      "PCI:1:0:0"  
Line 272: Line 324:
 
  DefaultDepth    24  
 
  DefaultDepth    24  
 
  Option     "FlatPanelProperties" "Scaling = Native"  
 
  Option     "FlatPanelProperties" "Scaling = Native"  
Option     "TwinView" "0"
 
 
  SubSection "Display"  
 
  SubSection "Display"  
 
  Depth    24  
 
  Depth    24  
  Modes "1920x1080@50" "1920x1080@60" "1920x1080@24" "1920x1080@23.976" "1920x1080@50i"
+
  Modes "1920x1080@60" "1920x1080@602" "1920x1080@50" "1920x1080@24" "1920x1080@23.976" "1920x1080@50i"
  Modes "1920x1080@60i" "1920x1080@59.94" "1920x1080@59.94i"  
+
  Modes "1920x1080@60i" "1920x1080@59.94" "1920x1080@59.94i"
 +
Modes "1920x1080@25" "1920x1080@29.97" "1920x1080@30"
 
  EndSubSection  
 
  EndSubSection  
 
  EndSection  
 
  EndSection  
 
</code>
 
</code>
  
Important notes:
+
==Common problems==
 +
 
 +
===Mouse pointer appearing over the video===
 +
On some systems, once the refresh rate has changed, you see the mouse pointer suddenly appearing over the video.
 +
 
 +
In /etc/X11/xorg.conf, in the "Device" section add the line:
 +
<code>
 +
Option "HWCursor" "false"
 +
</code>
 +
 
 +
The other work around, is to position the mouse pointer to a position where it can not be seen using a utility such as ""xwit""
 +
If you have a 1920x1080 TV, before starting mythfrontend you would do:
 +
<code>
 +
/usr/bin/xwit -root -warp 1920 1080
 +
</code>
 +
 
 +
==Important notes==
 
For TVs not using the exact 1920x1080 or 1280x720 resolution, and instead have a screen of say 1366x768 pixels ; you will often find that when using the native screen resolution, it will not accept anything but a 60Hz signal, while it will accept 50, 60 and 59.94 for 1280x720 signal.
 
For TVs not using the exact 1920x1080 or 1280x720 resolution, and instead have a screen of say 1366x768 pixels ; you will often find that when using the native screen resolution, it will not accept anything but a 60Hz signal, while it will accept 50, 60 and 59.94 for 1280x720 signal.
 
If this is the case, you are better off using the 1280x720 resolution. The human brain is more sensitive to motion than pure resolution and a smooth and judder free motion is going to be a more noticeable improvement.
 
If this is the case, you are better off using the 1280x720 resolution. The human brain is more sensitive to motion than pure resolution and a smooth and judder free motion is going to be a more noticeable improvement.

Latest revision as of 15:23, 25 May 2014

How to achieve judder free perfectly synced playback

Overview

You can make mythtv set your display to best match the video being played. This is something commonly done by your bluray player, PS3 etc..

If you watch a 24fps video, it usually sets your display at 24Hz..

This is a two cases scenario however, for most, the basic one will be sufficient ; if not or if you want the best result however, you will be interested with the advanced case.

In both cases, there’s only one configuration to set in MythTV. Go to Utilities / Setup -> Setup -> Appearance Go to the “Video Mode Settings” page, and check “Separate video modes for GUI and TV playback”

Syncscreencapture.jpg

For GUI and Video Output, enter the native resolution of your screen ; for a full HD TV, that is 1920x1080.

Rate should be set as “Any” so Myth will select the best available one.

Select Next until you reach the end of the configuration screen.

At this stage, it is assumed that MythTV will perform the required de-interlacing of the signal ; you can not force MythTV to output an interlaced signal through this mechanism.

Basic scenario

Most TV reports their capabilities via the EDID. This includes the resolutions and refresh rates supported. Like: 1920x1080 24Hz 1920x1080 50Hz 1920x1080 60Hz 1280x720 60Hz ...

MythTV can extract this information, and will then automatically set up the screen refresh rate to best match the content being played. So if watching a 24fps video, and if your TV supports 24Hz this is what it will use. If there’s no matching refresh rate, it will use the highest one available (usually 60Hz). MythTV gives higher priority to rates that are twice the required frame rate ; e.g. for a 25fps video (50Hz interlaced) ; if you TV supports both 25Hz and 50Hz, 50Hz will be used.

No additional configuration is required except when using nvidia graphic adapters. You need to either run the nvidia-settings application and uncheck in the GPU section “Force Full GPU scaling”

or edit /etc/X11/xorg.conf and add in the screen or device section:

Option      "FlatPanelProperties" "Scaling = Native"

If the basic configuration doesn't lead to judder-free playback, you will need to adjust setting for your monitor and/or graphics card (as described in the advanced scenario).

Advanced Scenario

One problem with the scenario described above ; is that the Earth isn’t flat and standard refresh rates aren’t integers in all part of the world. The other is that not all TVs properly report their capabilities through EDID.

The pain with frequencies

You may have read that PAL is 50Hz and NTSC is 60Hz... Not quite so. some PAL standards are 50Hz, but NTSC (and PAL-M/N) is 59.94Hz (actually 60Hz * 1000 / 1001) The signal being interlaced, the effective frame rate is 29.97fps.

24Hz in NTSC countries is actually 23.976Hz (60Hz * (1000 / 1001) / 2.5).

The problem is that the X11 framework that allows changing resolution and refresh rates on the fly (called XRANDR) only supports integers. So it can not easily tell the difference between 24Hz and 23.976Hz or 60 and 59.94. If you want Myth to be able to differentiate between those rates, follow the instructions below.

You can get more with nvidia adapters

With Intel and ATI graphic adapters 24, 50 and 60Hz is the best you will get. It's not ideal, but it can usually achieve good replay quality. With nvidia adapters however, nvidia has put a work around this limitation by presenting a unique refresh rate per screen configuration. So it will show as the list of available rates: 50, 51, 52, 53 etc... when 50 is 50Hz, 51 is 59.97, 52 is 60Hz etc...

To get access to those “rates”, you must make sure the “Dynamic TwinView” is active (that’s the default).

The pain with TVs reporting incomplete EDID

In the ideal world, whatever your TV reports through the EDID should be sufficient. Unfortunately, it is common for a TV to not properly reports all its capabilities, or that X11 failed to work properly with the information provided.

To find out which ones your TV actually reports; run xrandr.

It will show something like:

Screen 0: minimum 640 x 480, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm
  1920x1080      50.0*    60.0
  800x600        60

You need 50 and/or 25 rates to properly view common recording formats. If your TV doesn't report them, it might still support them. The idea is to ignore the EDID rates; and use the EIA/CEA-861B standard modelines in /etc/X11/xorg.conf. This is done in the "Monitor" section with the options:

   Option "ExactModeTimingsDVI" "True"
   Option "UseEDIDFreqs" "False"
   Option "UseEDIDDpi" "False"
   #To use Unity (aka "ubuntu session"), with drivers 3xx, comment the ModeValidation Line
   Option "ModeValidation" "NoEdidModes"
   #UseHotplugEvents is required for 3xx nvidia drivers
   Option "UseHotplugEvents" "False"

For True-HD (1920x1080) they are:

   # 1920x1080p @ 60Hz (EIA/CEA-861B)
   ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
   # 1920x1080p @ 50Hz (EIA/CEA-861B)
   ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
   # 1920x1080p @ 24Hz (EIA/CEA-861B)
   ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
   # 1920x1080p @ 23.976Hz (EIA/CEA-861B)
   ModeLine "1920x1080@23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
   # 1920x1080i @ 50Hz (EIA/CEA-861B)
   Modeline "1920x1080@50i" 74.250 1920 2448 2492 2640 1080 1085 1095 1125 +hsync +vsync Interlace
   # 1920x1080i @ 60Hz (EIA/CEA-861B)
   Modeline "1920x1080@60i" 74.250 1920 2008 2052 2200 1080 1085 1095 1125 +hsync +vsync interlace
   # 1920x1080p @ 59.94Hz (EIA/CEA-861B)
   ModeLine "1920x1080@59.94" 148.350 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
   # 1920x1080i @ 59.94Hz (EIA/CEA-861B)
   Modeline "1920x1080@59.94i" 74.175 1920 2008 2052 2200 1080 1085 1095 1125 +hsync +vsync Interlace
   # 1920x1080p @ 25Hz (EIA/CEA-861B)
   ModeLine "1920x1080@25" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
   # 1920x1080p @ 29.97Hz (EIA/CEA-861B)
   ModeLine "1920x1080@29.97" 74.175 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
   # 1920x1080p @ 30Hz (EIA/CEA-861B)
   ModeLine "1920x1080@30" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync

For 1280x720, they are

   #1280x720p @ 60Hz
   ModeLine "1280x720@60" 74.25 1280 1320 1376 1650 720 722 728 750
   #1280x720p @ 50Hz
   ModeLine "1280x720@50" 74.100 1280 1720 1760 1976 720 731 736 750 +hsync +vsync
   #1280x720p @ 48Hz / for display 24p video
   ModeLine "1280x720@48" 71.135 1280 1720 1760 1976 720 731 736 750 +hsync +vsync

Here is the xorg configuration for a dual monitor setup: a Panasonic PT-AE4000 projector, and a 17” Viewsonic LCD screen (below is a single monitor sample).

Section "ServerLayout"
	Identifier     "Layout0"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" LeftOf "Screen0"
EndSection

Section "ServerFlags" 
	Option	    "Xinerama" "0" 
EndSection 

Section "Monitor" 
	Identifier   "Monitor0" 
	VendorName   "Unknown" 
	ModelName    "Panasonic AE-4000" 
	Option	     "DPMS" 
	# 1920x1080p @ 60Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 50Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 24Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 23.976Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080i @ 50Hz (EIA/CEA-861B) 
	Modeline "1920x1080@50i" 74.250 1920 2448 2492 2640 1080 1085 1095 1125 +hsync +vsync Interlace 
	# 1920x1080i @ 60Hz (EIA/CEA-861B) 
	Modeline "1920x1080@60i" 74.250 1920 2008 2052 2200 1080 1085 1095 1125 +hsync +vsync interlace 
	# 1920x1080p @ 59.94Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@59.94" 148.350 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080i @ 59.94Hz (EIA/CEA-861B) 
	Modeline "1920x1080@59.94i" 74.175 1920 2008 2052 2200 1080 1085 1095 1125 +hsync +vsync Interlace 
	# 1920x1080p @ 25Hz (EIA/CEA-861B) 
	#ModeLine "1920x1080@25" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 29.97Hz (EIA/CEA-861B) 
	#ModeLine "1920x1080@29.97" 74.175 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 30Hz (EIA/CEA-861B) 
	#ModeLine "1920x1080@30" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	HorizSync	20.0 - 150.0 
	VertRefresh     23.0 - 90.0 
       Option "ExactModeTimingsDVI" "True"
       Option "UseEDIDFreqs" "FALSE"
       Option "UseEDIDDpi" "FALSE"
       #To use Unity (aka "ubuntu session"), with drivers 3xx, comment the ModeValidation Line
       Option "ModeValidation" "NoEdidModes"
       #UseHotplugEvents is required for 3xx nvidia drivers
       Option "UseHotplugEvents" "False"
       #For 3xx nvidia, duplicate the first entry to work around a bug causing the modeline to be ignored
	# 1920x1080p @ 60Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@602" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
EndSection

Section "Monitor" 
	Identifier   "Monitor1" 
	VendorName   "Unknown" 
	ModelName    "ViewSonic VX715" 
	Option	    "DPMS" 
EndSection 

Section "Device" 
	Identifier  "Videocard0" 
	Driver      "nvidia" 
	VendorName  "NVIDIA Corporation" 
	BoardName   "GeForce 8600 GT" 
	Option	    "UseDisplayDevice" "DFP-1" 
	Option	    "UseEvents" "True" 
	BusID       "PCI:1:0:0" 
EndSection 
 
Section "Device" 
	Identifier  "Videocard1" 
	Driver      "nvidia" 
	VendorName  "NVIDIA Corporation" 
	BoardName   "GeForce 8600 GT" 
	Option	    "ConnectedMonitor" "DFP-0,DFP-1" 
	Option	    "UseDisplayDevice" "DFP-0" 
	Option	    "UseEvents" "True" 
	BusID       "PCI:1:0:0" 
	Screen      1 
EndSection 

Section "Screen" 
	Identifier "Screen0" 
	Device     "Videocard0" 
	Monitor    "Monitor0" 
	DefaultDepth     24 
	Option	    "FlatPanelProperties" "Scaling = Native" 
	SubSection "Display" 
		Depth     24 
		Modes "1920x1080@60" "1920x1080@602" "1920x1080@50" "1920x1080@24" "1920x1080@23.976" "1920x1080@50i"
		Modes "1920x1080@60i" "1920x1080@59.94" "1920x1080@59.94i" 
	EndSubSection 
EndSection 

Section "Screen" 
	Identifier "Screen1" 
	Device     "Videocard1" 
	Monitor    "Monitor1" 
	DefaultDepth     24 
	Option	    "FlatPanelProperties" "Scaling = Native" 
	Option	    "metamodes" "DFP-0: nvidia-auto-select +0+0" 
	SubSection "Display" 
		Depth     24 
	EndSubSection 
EndSection 

You’ll see in the “Monitor” section, that "1920x1080@25", "1920x1080@29.97" and "1920x1080@30" are commented out. That’s because the Panasonic PT-AE4000 doesn’t support those rates. To find out which ones your TV actually supports ; run xrandr.

It will show something like:

Screen 0: minimum 640 x 480, current 1920 x 1080, maximum 1920 x 1080
default connected 1920x1080+0+0 0mm x 0mm
  1920x1080      50.0*    51.0     52.0     53.0     54.0     55.0     56.0     57.0     58.0     59.0     60.0     61.0     62.0     63.0     64.0  

Now go through all values using xrandr and see which one your screen supports. It it doesn’t support it, it will usually displays nothing, or something like “signal not supported”. so type:

xrandr -r 51

You’ll see the screen flicker. Usually the TV has an info button, that will show the refresh rate in use. doing: tail /var/log/Xorg.0.log yield: Jun 07 13:29:40 NVIDIA(0): Setting mode "1920x1080@60" so you now rate 51 is 1920x1080 at 60Hz.

In the "Screen" section, as shown in the /etc/X11/xorg.conf above, list all the modes your monitor/TV actually supports.

Now that X has been configured to see all the possible refresh rates ; MythTV will be able to switch to the most suitable rate as required...

This is an example of xorg.conf for a single screen system (Sony 46X3100 and nvidia ION)

Section "Monitor" 
	Identifier   "Monitor0" 
	VendorName   "Sony" 
	ModelName    "46X3100" 
	Option	     "DPMS" 
	# 1920x1080p @ 60Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 50Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 24Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 23.976Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080i @ 50Hz (EIA/CEA-861B) 
	Modeline "1920x1080@50i" 74.250 1920 2448 2492 2640 1080 1085 1095 1125 +hsync +vsync Interlace 
	# 1920x1080i @ 60Hz (EIA/CEA-861B) 
	Modeline "1920x1080@60i" 74.250 1920 2008 2052 2200 1080 1085 1095 1125 +hsync +vsync interlace 
	# 1920x1080p @ 59.94Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@59.94" 148.350 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080i @ 59.94Hz (EIA/CEA-861B) 
	Modeline "1920x1080@59.94i" 74.175 1920 2008 2052 2200 1080 1085 1095 1125 +hsync +vsync Interlace 
	# 1920x1080p @ 25Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@25" 74.250 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 29.97Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@29.97" 74.175 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 30Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@30" 74.250 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
	HorizSync	20.0 - 150.0 
	VertRefresh     23.0 - 90.0 
       Option "ExactModeTimingsDVI" "True"
       Option "UseEDIDFreqs" "False"
       Option "UseEDIDDpi" "False"
       #To use Unity (aka "ubuntu session"), with drivers 3xx, comment the ModeValidation Line
       Option "ModeValidation" "NoEdidModes"
       #UseHotplugEvents is required for 3xx nvidia drivers
       Option "UseHotplugEvents" "False"
       #For 3xx nvidia, duplicate the first entry to work around a bug causing the modeline to be ignored
	# 1920x1080p @ 60Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@602" 148.500 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync 
EndSection 

Section "Device" 
	Identifier  "Videocard0" 
	Driver      "nvidia" 
	VendorName  "NVIDIA Corporation" 
	BoardName   "GeForce 9400M" 
	Option      "ModeValidation"      "NoVesaModes, NoXServerModes" 
	BusID       "PCI:1:0:0" 
EndSection 

Section "Screen" 
	Identifier "Screen0" 
	Device     "Videocard0" 
	Monitor    "Monitor0" 
	DefaultDepth     24 
	Option	    "FlatPanelProperties" "Scaling = Native" 
	SubSection "Display" 
		Depth     24 
		Modes "1920x1080@60" "1920x1080@602" "1920x1080@50" "1920x1080@24" "1920x1080@23.976" "1920x1080@50i"
		Modes "1920x1080@60i" "1920x1080@59.94" "1920x1080@59.94i"
		Modes "1920x1080@25" "1920x1080@29.97" "1920x1080@30"
	EndSubSection 
EndSection 

Common problems

Mouse pointer appearing over the video

On some systems, once the refresh rate has changed, you see the mouse pointer suddenly appearing over the video.

In /etc/X11/xorg.conf, in the "Device" section add the line:

	Option "HWCursor" "false"

The other work around, is to position the mouse pointer to a position where it can not be seen using a utility such as ""xwit"" If you have a 1920x1080 TV, before starting mythfrontend you would do:

/usr/bin/xwit -root -warp 1920 1080

Important notes

For TVs not using the exact 1920x1080 or 1280x720 resolution, and instead have a screen of say 1366x768 pixels ; you will often find that when using the native screen resolution, it will not accept anything but a 60Hz signal, while it will accept 50, 60 and 59.94 for 1280x720 signal. If this is the case, you are better off using the 1280x720 resolution. The human brain is more sensitive to motion than pure resolution and a smooth and judder free motion is going to be a more noticeable improvement.