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

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/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


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - Rachel - 2012-07-08 21:48

(2012-07-08 20:58)Rachel Wrote:  Some issues i'm having to think about before committing to it. For some reason it seems to have problems selecting the right refresh rate for *some* content. for instance starting to play for a few seconds and *then* deciding to switch, and on one example never switching at all. So far this seems to be the output of handbrake from off-air recordings; both progressive and interlaced; but not a big enough sample to be sure of that pattern yet.

Difference seems to be it happens (often, not always) on videos with a frame rate mode of "Variable", which handbrake does as default. But I know that's offtopic for here, need to report that properly elsewhere.

edit: for reference and crosslinking, bug reported here: http://forum.xbmc.org/showthread.php?tid=116996&pid=1143341#pid1143341 in the thread where this build came from. Smile


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - robo989 - 2012-07-11 17:21

(2012-07-07 01:37)robo989 Wrote:  
(2012-06-26 21:22)Rachel Wrote:  i had to modify the script too to run on 12.04. My modifications:

Lines 50 & 51, change gdm to lightdm

Line 59 (this might be the one you need) change "cut -c32-" to "cut -c31-". It was truncating the first character of each line of the edid.

With those changes the script ran flawlessly here.

This worked a treat for me right off the bat on 12.04 frodo release from xbmcfreak.

Thanks ever so much.

Actually, this does work a treat for most stuff, but sources that are 24fps have a stutter, or frame doubling or whatever it's called as they are being output at 23.976 fps. (GT430)

Is there a fix for this?

Thanks, everything else works fine, so that's about 95%+ of my encoded MKVs...just the 24fps ones are the problem (23.976 ones - perfect - just to be clear).

Thanks,


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - Rachel - 2012-07-11 17:25

(2012-07-11 17:21)robo989 Wrote:  
(2012-07-07 01:37)robo989 Wrote:  
(2012-06-26 21:22)Rachel Wrote:  i had to modify the script too to run on 12.04. My modifications:

Lines 50 & 51, change gdm to lightdm

Line 59 (this might be the one you need) change "cut -c32-" to "cut -c31-". It was truncating the first character of each line of the edid.

With those changes the script ran flawlessly here.

This worked a treat for me right off the bat on 12.04 frodo release from xbmcfreak.

Thanks ever so much.

Actually, this does work a treat for most stuff, but sources that are 24fps have a stutter, or frame doubling or whatever it's called as they are being output at 23.976 fps. (GT430)

Is there a fix for this?

Thanks, everything else works fine, so that's about 95%+ of my encoded MKVs...just the 24fps ones are the problem (23.976 ones - perfect - just to be clear).

Thanks,

Not sure - though I do have an exact 24p movie i can try that on later. But I expect now the way forward is as per FernetMenta's recommendation - the nvidia driver 302.17, his xorg.conf, letting xrandr select exactly the mode it wants. Seems to be working for me anyway, though I'm also on the testing branch mentioned above but that's probably an optional step.


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - robo989 - 2012-07-11 17:26

(2010-03-17 16:12)JumJum Wrote:  OUTDATED with NVidia driver 302.17!!!!!
(It has support for xrandr 1.2/1.3 and can distinguish between 23.976 and 24)

Hang on there, does that mean this guide isn't needed and this is all dealt with no intervention, or the guide doesn't work for 302.17!?


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - Rachel - 2012-07-11 17:31

(2012-07-11 17:26)robo989 Wrote:  
(2010-03-17 16:12)JumJum Wrote:  OUTDATED with NVidia driver 302.17!!!!!
(It has support for xrandr 1.2/1.3 and can distinguish between 23.976 and 24)

Hang on there, does that mean this guide isn't needed and this is all dealt with no intervention, or the guide doesn't work for 302.17!?

It seems it wants the modeline added to an xorg.conf (which therefore needs to exist) so it's not all working with no intervention, but it's an alternative approach to the fix at the top of this thread and basically amounts to "use *this* xorg.conf and install nvidia 302.17+"


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - robo989 - 2012-07-12 19:00

(2012-07-08 10:31)FernetMenta Wrote:  This xorg.conf has worked on all systems TV I have tried:
http://xbmclogs.com/show.php?id=4386

DFP-0 might be changed to DFP-1

(2012-07-11 17:31)Rachel Wrote:  
(2012-07-11 17:26)robo989 Wrote:  
(2010-03-17 16:12)JumJum Wrote:  OUTDATED with NVidia driver 302.17!!!!!
(It has support for xrandr 1.2/1.3 and can distinguish between 23.976 and 24)

Hang on there, does that mean this guide isn't needed and this is all dealt with no intervention, or the guide doesn't work for 302.17!?

It seems it wants the modeline added to an xorg.conf (which therefore needs to exist) so it's not all working with no intervention, but it's an alternative approach to the fix at the top of this thread and basically amounts to "use *this* xorg.conf and install nvidia 302.17+"

That xorg.conf gives me an "unsupported mode" message on my Samsung 5 series plasma, about 3 years old when playing some SD xvid tv series. Fired up a 1920x800 24fps MKV and appears to work fine for about 10 seconds with correct frame rate of 24fps and not 23.976fps. Another attempt just gave a blank screen, then a crash.

Going to try my old xorg.conf and see if it works with the 302.17 drivers...

Thanks for posting it though, and thanks for the pointer Rachel.


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - Rachel - 2012-07-12 19:36

(2012-07-12 19:00)robo989 Wrote:  
(2012-07-08 10:31)FernetMenta Wrote:  This xorg.conf has worked on all systems TV I have tried:
http://xbmclogs.com/show.php?id=4386

DFP-0 might be changed to DFP-1

(2012-07-11 17:31)Rachel Wrote:  
(2012-07-11 17:26)robo989 Wrote:  Hang on there, does that mean this guide isn't needed and this is all dealt with no intervention, or the guide doesn't work for 302.17!?

It seems it wants the modeline added to an xorg.conf (which therefore needs to exist) so it's not all working with no intervention, but it's an alternative approach to the fix at the top of this thread and basically amounts to "use *this* xorg.conf and install nvidia 302.17+"

That xorg.conf gives me an "unsupported mode" message on my Samsung 5 series plasma, about 3 years old. Fired up a 1920x800 24fps MKV and appears to work fine for about 10 seconds with correct frame rate of 24fps and not 23.976fps.

Going to try my old xorg.conf and see if it works with the 302.17 drivers...

Thanks for posting it though, and thanks for the pointer Rachel.

Mine is a Panasonic Viera plasma of about the same vintage. It's EDID (posted above somewhere) shows:

Code:
# "1920x1080_24"       : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32)

ie: it's the same actual mode on the TV that handles both, presumably by being flexible about locking onto what the source is giving out? So what we're basically doing is giving X and XBMC the choices to send either.

Anyway the supplied xorg.conf (with DFP-0 changed to DFP-1 I think because the hardware is a mac mini and DFP-0 is the displayport interface) works for me in that it gives me the 23.974Hz mode that allows most movies to play.

I remembered I was going to test the one movie I know I have that is at exactly 24Hz (Coriolanus blu-ray rip) and sure enough I get a periodic skipped frame which I expect is this issue. I've already watched this movie on a different configuration but on the same TV and had no such issues so I know the TV can handle it.

We probably need a modeline to exactly define 24Hz. However that's done. Smile I think the main advantages of the newer software all round is that XMBC and X and the nvidia drivers all can choose modes from those available with exactitude, but no exact 24Hz mode has been autodetected in my case.

I look at the output of xbmc-xrandr and I notice:

Code:
<mode id="0x1c6" name="1920x1080" w="1920" h="1080" hz="23.97576" current="false" preferred="false"/>

... which is the mode added by the modeline given in the earlier post. And:

Code:
<mode id="0x1c9" name="1920x1080" w="1920" h="1080" hz="23.97091" current="false" preferred="false"/>

... which I believe is the autodetected mode from the EDID line above. It's presumably made a mode based on the lower end of the range EDID is saying it can do.

So I expect in my case at least - and possibly others, it presumably depends on the TV model - that I need that exact 24Hz modeline.

Bloody NTSC. It's only the dark and sorry legacy of that format that's why non-integer framerates even exist. You'll notice PAL is quite happy and perfect on an exact 50Hz!


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - robo989 - 2012-07-12 20:45

Thanks for posting again, it looks like I went into a daydream and didn't finish the sentence. Basically, SD tv show = no picture, tv states "unsupported mode". HD MKV at 24fps, switches correctly to 24fps, plays at 24.00fps too (so it does work), but after a few seconds it drops to about 2-3fps like a slideshow, it also takes around 10 seconds for the MKV to actually start playing...

Ridiculous anaolgy but it feels like I've put petrol in a diesel engine with these 302.17 drivers and suspect there's a lot more wrong than just an xorg.conf.

Although I suspect this could well be down to the new AudioEngine.

If I use my old xorg.conf that plays happy with 295.40 then the tv doesn't even switch to 24p, but goes to 60hz mode instead, plays at super high speed for 10 seconds then crashes.

I have now reverted back to 295.40 easily enough and everything works again (obviously except 24.000 material).

I guess will just have to way, thanks for posting the info you have but I don't think it's relevent in my situation, sorry my fault for the vauge details in previous post.


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - ialand - 2012-07-13 00:18

(2012-07-11 17:31)Rachel Wrote:  It seems it wants the modeline added to an xorg.conf (which therefore needs to exist) so it's not all working with no intervention, but it's an alternative approach to the fix at the top of this thread and basically amounts to "use *this* xorg.conf and install nvidia 302.17+"

*this* Confused


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - Rachel - 2012-07-13 00:26

(2012-07-13 00:18)ialand Wrote:  
(2012-07-11 17:31)Rachel Wrote:  It seems it wants the modeline added to an xorg.conf (which therefore needs to exist) so it's not all working with no intervention, but it's an alternative approach to the fix at the top of this thread and basically amounts to "use *this* xorg.conf and install nvidia 302.17+"

*this* Confused

This: http://xbmclogs.com/show.php?id=4386 (posted a few posts ago)


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - szafir51 - 2012-07-24 13:06

Hello,

I'm using XBMC 11.0 installed on Ubuntu 12.04 x86, running on nVidia ION HTPC with nvidia 302.17 driver installed. My HTPC is connected to Panasonic Viera TH-37PV80 through Onkyo TX-SR308. My TV is only HDready (720p), so I using 1280x720 resolution in Ubuntu. I've tested available modes for my configuration and I can't find 1280x720@23.97.
Here is output of xbmc-xrandr command:

Quote: <mode id="0x1c6" name="1280x720" w="1280" h="720" hz="50.00000" current="true" preferred="true"/>
<mode id="0x1cc" name="1280x720" w="1280" h="720" hz="60.00000" current="false" preferred="false"/>
<mode id="0x1cd" name="1280x720" w="1280" h="720" hz="59.94343" current="false" preferred="false"/>
<mode id="0x1c7" name="1920x1080" w="1920" h="1080" hz="59.93939" current="false" preferred="false"/>
<mode id="0x1c8" name="1920x1080" w="1920" h="1080" hz="50.00000" current="false" preferred="false"/>
<mode id="0x1c9" name="1920x1080" w="1920" h="1080" hz="23.97091" current="false" preferred="false"/>
<mode id="0x1ca" name="1920x1080" w="1920" h="1080" hz="29.99838" current="false" preferred="false"/>
<mode id="0x1cb" name="1920x1080" w="1920" h="1080" hz="25.02224" current="false" preferred="false"/>
<mode id="0x1ce" name="720x576" w="720" h="576" hz="50.00000" current="false" preferred="false"/>
<mode id="0x1cf" name="720x576" w="720" h="576" hz="25.04006" current="false" preferred="false"/>
<mode id="0x1d0" name="720x480" w="720" h="480" hz="59.94006" current="false" preferred="false"/>
<mode id="0x1d1" name="720x480" w="720" h="480" hz="30.02722" current="false" preferred="false"/>
<mode id="0x1d2" name="640x480" w="640" h="480" hz="59.92857" current="false" preferred="false"/>
<mode id="0x1d3" name="480x576" w="480" h="576" hz="50.00000" current="false" preferred="false"/>
<mode id="0x1d4" name="480x480" w="480" h="480" hz="59.94006" current="false" preferred="false"/>
<mode id="0x1d5" name="411x576" w="411" h="576" hz="50.07059" current="false" preferred="false"/>
<mode id="0x1d6" name="411x480" w="411" h="480" hz="59.97279" current="false" preferred="false"/>
<mode id="0x1d7" name="3x576" w="3" h="576" hz="29.64744" current="false" preferred="false"/>
<mode id="0x1d8" name="3x480" w="3" h="480" hz="35.30534" current="false" preferred="false"/>

Should I add modeline in xorg.conf to have 720p@23.97 ??


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - pyite - 2012-08-06 23:55

could someone repost the xorg referenced several posts above?


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - Rachel - 2012-08-06 23:58

further developed by its author (so 23.976Hz and 24Hz are both matched correctly):

http://xbmclogs.com/show.php?id=6030


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - pumkinut - 2012-08-08 19:21

I just installed the 304.32 beta drivers last night. It looks like it does an EDID scan and figures out the modeline xorg.conf entries automagically now.


RE: HOW-TO achieve perfect playback at 23.97 or 59.94 Hz with NVIDIA GPU hardware - robo989 - 2012-08-10 18:12

(2012-08-08 19:21)pumkinut Wrote:  I just installed the 304.32 beta drivers last night. It looks like it does an EDID scan and figures out the modeline xorg.conf entries automagically now.

302 does that already since a while.

Or are you saying it now works for displays that give incorrect EDID info as in to incorrectly give a max resolution of 720p on displays that can do 1080p?