Kodi Community Forum
Linux HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
+--- Thread: Linux HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware (/showthread.php?tid=70068)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36


- Laundro - 2010-08-08

Hi -

I have a problem with severe juddering (ie image flipping between frames as it were) with 24p HD content on a 24p display. I've executed the script on page 1 of this thread, but it did not help.

My TV is a Sony Bravia, with the following specs:
Code:
#  --- Modes in ModePool for SONY TV (DFP-0) ---
#  "nvidia-auto-select" : 1920 x 1080 @  60.0 Hz
#  "1920x1080"          : 1920 x 1080 @  60.0 Hz
#  "1920x1080_60"       : 1920 x 1080 @  60.0 Hz
#  "1920x1080_60_0"     : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16)
#  "1920x1080_50"       : 1920 x 1080 @  50.0 Hz
#  "1920x1080_24"       : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32)
#  "1920x1080_60i"      : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5)
#  "1920x1080_50i"      : 1920 x 1080 @ 50 Hz Interlace (CEA-861B Format 20)
#  "1280x1024"          : 1280 x 1024 @  60.0 Hz
#  "1280x1024_60"       : 1280 x 1024 @  60.0 Hz
#  "1280x720"           : 1280 x  720 @  60.0 Hz
#  "1280x720_60"        : 1280 x  720 @  60.0 Hz
#  "1280x720_60_0"      : 1280 x  720 @ 59.94/60 Hz (CEA-861B Format 4)
#  "1280x720_50"        : 1280 x  720 @  50.0 Hz
#  "1024x768"           : 1024 x  768 @  60.0 Hz
#  "1024x768_60"        : 1024 x  768 @  60.0 Hz
#  "800x600"            :  800 x  600 @  60.3 Hz
#  "800x600_60"         :  800 x  600 @  60.3 Hz
#  "720x576"            :  720 x  576 @ 50 Hz (CEA-861B Format 18)
#  "720x576_50"         :  720 x  576 @ 50 Hz (CEA-861B Format 18)
#  "720x576_50i"        : (1440)x 576 @ 50 Hz Interlace (CEA-861B Format 22)
#  "720x480"            :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 3)
#  "720x480_60"         :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 3)
#  "720x480_60i"        : (1440)x 480 @ 59.94/60 Hz Interlace (CEA-861B Format 7)
#  "640x480"            :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1)
#  "640x480_60"         :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1)
#  --- End of ModePool for SONY TV (DFP-0): ---

My xorg.conf looks like this:
Code:
Section "Device"
        Identifier "nvidia"
        Driver  "nvidia"
        Option  "NoLogo"              "true"
        Option  "DynamicTwinView"     "false"
        Option  "NoFlip"              "false"
        Option  "FlatPanelProperties" "Scaling = Native"
        Option  "ModeValidation"      "NoVesaModes, NoXServerModes, NoVertRefreshCheck, NoHorizSyncCheck"
        Option  "UseDisplayDevice"    "DFP-1"
        Option  "ModeDebug"           "true"
        Option  "HWCursor"            "false"
EndSection

Section "Screen"
        Identifier      "screen"
        Device          "nvidia"
        SubSection      "Display"
                Modes "1920x1080_60_0" "1920x1080_24"
        EndSubSection
EndSection

Section "Extensions"
        Option  "Composite"           "false"
EndSection

24p content in 60Hz works OK, except for the small twitch now and then, which is why I want to be able to play back 24p content in a 24p display...

The system's a ION 300-HT, with Xbmcfreak 10.08 live CD installed (svn32178).

I've cycled through all the options in XBMC, but nothing helped.

Update: I've noticed that when disabling sync display, and enabling audio to sync with, the small glitches are fewer in number... It's a bit better this way, but of course I'm still wondering why 24p won't work on my system (it's judder from beginning to end....)


- phillyfan1138 - 2010-08-11

Using this method I have near perfect playback. I still have a jerk in the video every few minutes. I do not know why I have this jerk, since xbmc is using my monitor's edid info. Changing the sync to display to drop/dupe audio did nothing. xbmc says I am dropping no frames and having no sync errors.

The really odd thing is that on 60hz (59.94) the video is almost unwatchable. The judder is horrible, though at least it is constant. Video played at 60hz from my xbox 360, however, is very smooth.

EDIT: apparently, I have become too adjusted to near perfect 24p playback: 60hz from my xbox is just as bad as from xbmc


- phillyfan1138 - 2010-08-13

Well, I may have solved my problem. My tv sends standard edid information, which it turns out is 23.975757 instead of 23.976023976023976. I wiped my drive, reinstalled xbmc-live, and used a modeline that is as close to 23.97602 as possible. So far so good, no stutters. Still have more testing, but things look good for now.

btw,
ModeLine "1920x1080_24" 74.230 1920 2560 2604 2752 1080 1084 1089 1125 +hsync +vsync

is my modeline that worked. The refresh rate is 23.9760981912144, so that over 220 minutes of video would have to play before a frame would skip (theoretically).


- SofaKng - 2010-08-16

Does my projector support 23.97/24? It looks like the answer is no but I don't know if modelines can fix it?

Here's the output from for i in 24 60; do xrandr -r $i; nvidia-settings -q RefreshRate | grep -o "[0-9][0-9].*Hz"; done:
Code:
Rate 24.0 Hz not available for this size
60.00 Hz
Rate 60.0 Hz not available for this size
60.00 Hz

...and here's my ModeDebug Xorg.0.log lines:
Code:
--- Modes in ModePool for SANYO PLV-Z5 (DFP-0) ---
"nvidia-auto-select" : 1280 x  720 @  60.0 Hz  (from: EDID)
"1920x1080"          : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16) (from: EDID)
"1920x1080_60"       : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16) (from: EDID)
"1920x1080_50"       : 1920 x 1080 @ 50 Hz (CEA-861B Format 31) (from: EDID)
"1920x1080_60i"      : 1920 x 1080 @  60.1 Hz Interlace  (from: EDID)
"1920x1080_60i_0"    : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5) (from: EDID)
"1920x1080_50i"      : 1920 x 1080 @  50.0 Hz Interlace  (from: EDID)
"1280x720"           : 1280 x  720 @  60.0 Hz  (from: EDID)
"1280x720_60"        : 1280 x  720 @  60.0 Hz  (from: EDID)
"1280x720_60_0"      : 1280 x  720 @ 59.94/60 Hz (CEA-861B Format 4) (from: EDID)
"1280x720_50"        : 1280 x  720 @  50.0 Hz  (from: EDID)
My projector is native 720 so I think I need to use "1280x720_60_0" because nvidia-auto-select is selecting "1280x720_60", but I'd like to know if 23.97/24 is available...

Also, the Xorg.0.log says my projector is reporting a Valid VRefresh Range of 50 - 85, but according to my manual it should be 50 - 100. I'm not sure if this is causing any problems though (or preventing 23.97/24 mode).


- LB06 - 2010-08-17

phillyfan1138 Wrote:Well, I may have solved my problem. My tv sends standard edid information, which it turns out is 23.975757 instead of 23.976023976023976. I wiped my drive, reinstalled xbmc-live, and used a modeline that is as close to 23.97602 as possible. So far so good, no stutters. Still have more testing, but things look good for now.

btw,
ModeLine "1920x1080_24" 74.230 1920 2560 2604 2752 1080 1084 1089 1125 +hsync +vsync

is my modeline that worked. The refresh rate is 23.9760981912144, so that over 220 minutes of video would have to play before a frame would skip (theoretically).
How can you see what your exact refresh rate is?


- phillyfan1138 - 2010-08-17

Quote:How can you see what your exact refresh rate is?

Theoretically it is (74.230/2752)/1125 times 1000000. Further testing actually revealed a small amount of stuttering at that modeline, so I switched to a more standard modeline of 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync which should be 23.97575757..... I have not tested this resolution yet.


- TutAmongUs - 2010-08-19

Ayla Wrote:Thanks for that, I will try it when I get home!

The only problem I have is, that I need to set a sound delay of 200ms for all my movies to be in sync, but when I save it with "Set as default for all movies", it only lasts until XBMC restarts... then it forgets the 200ms delay setting and resets it to zero.

Anyone else experiencing that?

PS. I only need the 200ms delay for 23.976hz movies (not 50hz videos). That's a bit strange!?

Try using suspend instead of shutting down. Then, you can be assured that the machine will return to its prior state. And usually quite a lot faster as well.
I noticed a laptop that would always revert back to a single display, and setting the widescreen display up on the vga port every boot time was a pain. Suspend works. Hibernate is bad, because there is no need to do any kind of dump like that or get back to that exact state. Anyway, HTH.


- UglyBob - 2010-08-20

phillyfan1138 Wrote:Well, I may have solved my problem. My tv sends standard edid information, which it turns out is 23.975757 instead of 23.976023976023976. I wiped my drive, reinstalled xbmc-live, and used a modeline that is as close to 23.97602 as possible. So far so good, no stutters. Still have more testing, but things look good for now.

btw,
ModeLine "1920x1080_24" 74.230 1920 2560 2604 2752 1080 1084 1089 1125 +hsync +vsync

is my modeline that worked. The refresh rate is 23.9760981912144, so that over 220 minutes of video would have to play before a frame would skip (theoretically).

I have a similar problem like you. How can I check if it's the same reason as your problem? I can fetch my edid info from my projector, but how can I see if something is wrong? I'm not sure how you came to your conclusion...


- fuzzmo - 2010-08-26

I just want to say thank you so much for this!!! You are a star, I have messed around so much that I was losing the will to live until your script solved all my problems. It even autoswitches when fed a different source which is brilliant!

Now to get to grips with XBMC (was using Boxee, but unfortunately that stays on 1080p 60Hz and doesn't switch to 24p when playing the movies etc. that require it)...


- rossoneri711 - 2010-08-31

Hello,

I have run the script you posted and it does change the refresh rate of the TV perfectly, so i am guessing its working fine. My problem is that i still have some stutter in fast moving sequences and not only, and was wondering whether or not i have the right options in XBMC.

I am running Ubuntu Lucid with full desktop, on ASROCK ION 330 HT-BD, with the latest PPA.

Below are the options i have set up:

Quote:Render Method : AUTO DETECT
Allow hardware acceleration (VDPAU) : ON
Adjust display refresh rate to match video : ON
Sync playback to display : ON
A/V sync method : AUDIO CLOCK
Allowed error in aspect ratio to minimize black bars : NONE
Display 4:3 videos as : NORMAL
VDPAU Studio level conversion : ON
Video post-processing : ALWAYS ENABLED
Activate teletext : OFF

It would be great if you can let me know whats the right setting, so to achieve that flawless playback.

PS: dont know if its of help to you, but i only pay 720p content, mostly MKV


- MdMa - 2010-09-05

I must say, this script has fixed some issues for me, I truly appreciate it.

However, there is still one small issue.

Firstly my TV does not support 24Hz/p, so if I use the option "sync display to refresh rate" all my 23.976 material plays at 24Hz and is rather unpleasant.

Basically how can I force the resolutions below?

1280 x 720p 23.976 fps to 1920 x 1080p @ 59.94hz
1280 x 720p 25.000 fps to 1920 x 1080p @ 50hz
1920 x 1080p 23.976 fps to 1920 x 1080p @ 59.94hz

*720p @ 25.000 fps plays at 1080p @ 50Hz already...

Obviously I am a big noob when it comes to Linux, so if you could please detail each step that would much appreciated.


- X3lectric - 2010-09-05

open your xorg.conf and remove any modelines and references to 23.something/24hz

under section screen remove
DefaultDepth 24

under
SubSection "Display"
Modes "1920x1080_60_0" "1920x1080_50" "1920x1080_24"

remove the red parts.

and anything else that may point to 24hz

if you cant follow that, post your xorg.conf here I will edit and upload it for ya.

@everyone else

I see people talking about 24hz and referring to it as 24p its not the same....


- MdMa - 2010-09-05

Thank you.. I shall give this a try tomorrow and let you know how it goes..

Is it okay if I SSH and do the above?

Is the command to edit xorg.conf "sudo nano /etc/x11/xorg.conf" ?


- X3lectric - 2010-09-05

MdMa Wrote:Is the command to edit xorg.conf "sudo nano /etc/x11/xorg.conf" ?

Almost, dont forget Linux is case sensitive, I would prolly run b4 sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak and then sudo nano /etc/X11/xorg.conf, this way you have a copy.

see the bold red X


- MdMa - 2010-09-06

Once again.. thank you!