[Linux] stuttering, framedrops, tearing, 24p issues
#1
Question 
Hi! Just bought a brand new tv, with native 24p (120hz) and of course 1080p.

When I came home I Immediately booted my htpc (xbmc nativly using archlinux kernel) and to my suprise for the first time i'm having a few issues with the movie playback.


My issues using 24p/hz:
  • Tearing (nvidia-vsync enabled)

  • Audio out of sync (have to set audioff set to roughly 250ms)

  • stuttering, picture almost goes into slowmotion for a split second, happens throughout the movie

  • framedrops constantly

htpc

archlinux (2.6.36-ARCH)
Amd Athlon 64 X2 Dual Core 5000+
Nvidia 9500GT 512mb
2GB Ram

Most of the playback would be from hardware acceleration through my GPU right, vdpau? I've seen setups with far less cpu power and they've had no issues, granted it was mediaportal and on windows. But clearly my CPU isn't a bottleneck here, right?

xorg.conf

Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 260.19.21  (buildmeister@builder101)  Thu Nov  4 21:47:28 PDT 2010

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "LG Electronics LG TV"
    ModelName      "LG 46LD550N"
    HorizSync       30.0 - 83.0
    VertRefresh     58.0 - 62.0
    Option         "DPMS"
    Option "ExactModeTimingsDVI" "TRUE"
    Modeline "1920x1080@50p" 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +hsync +vsync
    Modeline "1920x1080@60p" 148.50 1920 2008 2052 2200 1080 1084 1089 1125 +hsync +vsync
    Modeline "1920x1080@24p" 74.16  1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync

EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    Modes "1920x1080@24p" "1920x1080@50p" "1920x1080@60p"    
EndSubSection
Option "FlatPanelProperties" "Scaling = Native" # make sure the gpu does not scale and loose performance
Option "DynamicTwinView" "False" # disable or you'll get tearing
Option "TripleBuffer" "0" # disable or xbmc will segfault with smoothvideo
Option "NoLogo" "True" # skip logo!
EndSection

Section "Extensions"
Option "Composite" "Disable"
EndSection

xbmc version: 35648-1 (svn)
xbmc log: http://paste.pocoo.org/show/311646/
xbmc settings:


Code:
Video

Full Screen #1
1920x1080 (tv info says 24Hz 1080p)
Render Method Auto Detect
VDPAU x
VAAPI x
Adjust Display Refresh Rate To Match Video x
Sync Playback to Display x
A/V Sync Method Video Clock (Drop/Dupe Audio)
VDPAU Studio Level Color Conversion x

Audio

Audio Offset -250ms

My movies are buffered from my server (all wired on movies, no wireless) - htpc, server is running linux with a 1GB switch and linksys router (tomato), they are all 1080p, mkv x264.

I'm right now watching Gladiator Extended Cut 1080p (2010 remastered version), and I have over 4000 frames dropped within the last 10 minutes. If I press "O" the frames are dropping like seconds, i'm soon past 4500.

UPDATE: The Audio is now falling behind roughly 2 seconds (even when i'm using audio offset 250ms) and the frames are dropping like flies!

Code:
Gladiator Extended Cut 1080p "O" information:
D(Audio: DCA, 48000 HZ 5.1, S16, 1536 KB/S) P (AQ:99%, KB/S:1473.25)

D(VIDEO: H264, YUV420p, 1920x816) P(FR:23:976, VQ99%, DC:FF-H264_VDPAU-VDPAU, MB/S:40 [b]Drop 8000,PC:1) frames are dropping every second![/b]

C(AD:0.250, A/V: 0578, EDL, DCPU; 1% ACPU: 1% VCPU 2%)
w(FPS;23,98 CPU0:3.0% CPU1:2%) S(Refresh: 24 Missed: 0 SPeed: 0.100% Sync +0%AVG 0% Errror:1300%

I've searched this forum, used google and read a few guides and tutorials. Alas my problem isn't solved and since it's related to a general playback of my system, this is a fairly large issues for me.

I humbly ask for help Smile
Reply
#2
Please post a debug log.
Reply
#3
bobo1on1 Wrote:Please post a debug log.

As you wish Smile

http://paste.pocoo.org/show/311646/
Reply
#4
Make sure the deinterlacer is turned off.
Reply
#5
bobo1on1 Wrote:Make sure the deinterlacer is turned off.

Hi!

I turned off the deinterlacer (was on auto before) and the frame dropping every second suddently became stable.

I watched gladiator from start - end, only 295 frames dropped, that's something I can live with.

Curious though, deinterlacing on a 24p source is pretty pointless or I'm I missing something?

The audio is now more bearable compared to the massive 2 seconds before, but it's still very much annoying. There's also a couple of slowdowns throughout the movie but again not as bad as yesterday.

Here's a new log if you're interested (as you can see 0% errors).

http://paste.pocoo.org/show/312134/

I'm gonna continue to watch more movies and see if the problem remains solved or not.

Thanks for helping me out bobo1on1 and happy new year Big GrinSmile
Reply
#6
You might also want to try with the default confluence skin.
Reply
#7
bobo1on1 Wrote:You might also want to try with the default confluence skin.

Hi! I'm back again Big Grin

I'm having similar problems like this guy: http://forum.xbmc.org/showthread.php?tid=65329

Picture quality is superb and audio works fine. But i'm having these brief moments of slowdown, running debug shows no loss of fps/frames when it happens.

I've made a log: http://paste.pocoo.org/show/317230/
First video, using the aeonmq2 skin
2nd video, using confluence skin

It doesn't matter which skin I pick, the slowdown is always present.
1080p or 720p also doesn't matter or what code it's using.

Also tried 2 different GPU's: nvidia 8400GS, nvidia 9500GT, same slowdown present

Can you find any clues in the debug log?

Thank You
Reply
#8
Can you try with the refreshrate set at 59.94 or 60 hertz.
Reply
#9
bobo1on1 Wrote:Can you try with the refreshrate set at 59.94 or 60 hertz.

Trying 60@ now.

In the main menus i'm getting 60fps. Starting a 720/1080p source fps goes to a constant 24fps also with a bit of juddering.

I'm not seeing the usual slowdown, but the tradeoff is now juddering a bit of lag in some scenes.


Shouldn't xbmc set the refresh rate to 23.976 fps (24hz) when it detects a bluray movie instead of my current constant 24fps?

Since xbmc now is outputting 60hz I take it my tv now starts a 3:2 pulldown hence the juddering i'm getting now?

Here's a new log: http://paste.pocoo.org/show/317403//

Thanks Smile
Reply
#10
On linux the refreshrate is always rounded to the nearest integer.
Reply
#11
bobo1on1 Wrote:On linux the refreshrate is always rounded to the nearest integer.

Hmm I get 24fps (60hz) when i'm watching a movie.

But if I run (24hz) i get 23.976 when i'm watching a movie, you can see 23.976fps clearly when i'm running a debug.

A 60Hz 24fps movie gives me juddering

B 24Hz 23.976fps no juddering but a slowmotion instead throughout scenes.
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux] stuttering, framedrops, tearing, 24p issues0