Difference between revisions of "User Manual:JudderFree"

From MythTV Official Wiki
Jump to: navigation, search
(Basic scenario)
(Basic scenario)
Line 36: Line 36:
  
 
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:
 
<code>
 
<code>
 
  Option      "FlatPanelProperties" "Scaling = Native"
 
  Option      "FlatPanelProperties" "Scaling = Native"

Revision as of 07:13, 7 June 2010

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 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 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”

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"

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.

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.

With Intel and ATI graphic adapters ; 24, 50 and 60Hz is the best you will get. 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).

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: Option "ExactModeTimingsDVI" "True" Option "UseEDIDFreqs" "False"

For True-HD (1920x1080) they are:

   # 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)
   ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 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 @ 50Hz (EIA/CEA-861B)
   ModeLine "1280x720@50" 74.400 1280 1720 1760 1984 720 725 730 750 +hsync +vsync
   #1280x720p @ 59.94Hz (EIA/CEA-861B)
   ModeLine "1280x720@59.94" 74.400 1280 1390 1430 1612 720 725 730 770 +hsync +vsync
   #1280x720p @ 60Hz (EIA/CEA-861B)
   ModeLine "1280x720@60" 74.400 1280 1390 1420 1623 720 725 730 764 +hsync +vsync

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

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 @ 50Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@50" 148.500 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync 
	# 1920x1080p @ 60Hz (EIA/CEA-861B) 
	ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 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" 
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" 
	Option      "ModeValidation"      "NoVesaModes, NoXServerModes" 
	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" 
	Option	    "TwinView" "0" 
	SubSection "Display" 
		Depth     24 
		Modes "1920x1080@50" "1920x1080@60" "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	    "TwinView" "0" 
	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.

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...

Section "Monitor" 
	Identifier   "Monitor0" 
	VendorName   "Sony" 
	ModelName    "46X3100" 
	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) 
	ModeLine "1920x1080@60" 148.500 1920 2008 2052 2200 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" 
EndSection 

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

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

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.