Various video/audio problems with DVD and SD content on ASRock 330
#1
Question 
I haven't used XBMC in a number of years - since my old box died. Anyway, I recently bought an ASRock 330 for the sole purpose of running XBMC.

Just using the default 2GB RAM it came with and the only thing I've changed in the BIOS aside from the boot order has been the video RAM. It came set to 256MB - I changed it to 512MB as some guides said but that didn't make any difference so I put it back to 256MB.

I installed the latest live version (9.11):
Code:
Linux XBMCLive 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:01:29 UTC 2009 i686 GNU/Linux
xbmc@XBMCLive:~$ apt-cache policy xbmc
xbmc:
  Installed: 1:9.11-karmic1
  Candidate: 1:9.11-karmic3
  Version table:
     1:9.11-karmic3 0
        500 http://ppa.launchpad.net karmic/main Packages
*** 1:9.11-karmic1 0
        100 /var/lib/dpkg/status

Some videos play fine, most skip. Some skip and look really blocky/low res. DVD playback is awful. It too looks really low res/blocky and the video skips constantly. I thought it was low CPU or something but I can bring up the info bar while it's skipping and the reported CPU usage is rarely above 20% so that's probably not the reason.

Videos that skip:

Code:
D(Audio:mp3, 48000 Hz, 2 channels, s16, 115kb/s) P(aq:99%, kB/s:116.80)
D(Video:mpeg4, yuv420p, 608x400 [PAR 1:1 DAR 38:25]) P(vq:60, dc:ff-mpeg4, Mb/s:1.44, drop:19, pc:1)
c( ad: 0.000, a/v: 0.028, edl:-, dcpu: 1% acpu:5% vcpu: 11% )
W( fps: 60 CPU0: 37% CPU1: 0% CPU2: 0% CPU3: 0% ) S ( refresh:60 missed:5 speed:+0.000% sync:-10% e...

SD xvid mp3 2.0
AVI container

Code:
D(Audio:ac3, 48000 Hz, 2 channels, s16) P(aq:99%, kB/s:187.58)
D(Video:h264, yuv420p, 1280x720) P(vq:70, dc:ff-h264_vdpau, Mb/s:2.17, drop:124, pc:1)
c( ad: 0.000, a/v: 0.035, edl:-, dcpu: 2% acpu:3% vcpu: 1% )
W( fps: 60 CPU0: 18% CPU1: 0% CPU2: 7% CPU3: 0% ) S ( refresh:60 missed:5 speed:+0.000% sync:-10% e...

720 h.264 ac3 2.0
MKV container


Code:
D(Audio:aac, 48000 Hz, 2 channels, s16) P(aq:99%, kB/s:111.92)
D(Video:h264, yuv420p, 720x304 [PAR 1:1 DAR 45:19]) P(vq:62, dc:ff-h264_vdpau, Mb/s:1.37, drop:12, pc:1)
c( ad: 0.000, a/v: 0.035, edl:-, dcpu: 1% acpu:4% vcpu: 1% )
W( fps: 60 CPU0: 20% CPU1: 0% CPU2: 6% CPU3: 0% )

SD AVC1 aac 2.0
MP4 container

Videos that play fine:

Code:
D(Audio:aac, 48000 Hz, 5.1, s16 448kb/s) P(aq:99%, kB/s:437.65)
D(Video:mpeg4, yuv420p, 1280x544 [PAR 1:1 DAR 40:17]) P(vq:21, dc:ff-mpeg4, Mb/s:2.38, drop:7, pc:1)
c( ad: 0.000, a/v: 0.036, edl:-, dcpu: 1% acpu:3% vcpu: 6% )
W( fps: 60 CPU0: 20% CPU1: 0% CPU2: 6% CPU3: 0% )

720 xvid DD 5.1
AVI container


Code:
D(Audio:ac3, 48000 Hz, stereo, s16 192kb/s) P(aq:99%, kB/s:187.50)
D(Video:mpeg4, yuv420p, 564x300 [PAR 1:1 DAR 47:25]) P(vq:29, dc:ff-mpeg4, Mb/s:1.85, drop:7, pc:1)
c( ad: 0.000, a/v: 0.30, edl:-, dcpu: 0% acpu:0% vcpu: 0% )
W( fps: 23.98 CPU0: 13% CPU1: 5% CPU2: 6% CPU3: 0% )

SD AC3 2.0
AVI container

When I pause the xvid video the CPU0 sits at around 35% with the other cores idle but when it's playing they seem to be sharing the load but with one core still taking the brunt of the hit. At no point does the toal CPU usage get anywhere near 100%, in fact it rarely goes above about 20% total.

Also, playing mp3s, starting video playback and resuming from pause gives me an audio delay of a few seconds. It's not out of sync there's just no audio for a few seconds.

ASRock 330 is bypassing the receiver and hooked up directly to a Sony Bravia KDL-46Z4100 with HDMI.

Not really sure where to start looking for answers. Help! Big Grin


xbmc log: http://pastebin.com/6peVV3PA
The log has the first video i played skipping and the second playing just fine.
Reply
#2
Please turn on debug logging and post another log.

From what I can see from this log, you're playing a 25 fps video with the refreshrate set at 24 hertz, that's not going to work.
Reply
#3
Here's the debug log file: http://pastebin.com/d10qXQhd

The first video played just fine but the second was skipping. The frame rates look as you described.

I was having these problems after first installing the xbmc live so I followed this thread: http://forum.xbmc.org/showthread.php?tid=70068. Here's the modes.txt that thread created:
Code:
--- Modes in ModePool for SONY TV XV (DFP-0) ---
"nvidia-auto-select" : 1920 x 1080 @  60.0 Hz  (from: EDID)
"1920x1080"          : 1920 x 1080 @  60.0 Hz  (from: EDID)
"1920x1080_60"       : 1920 x 1080 @  60.0 Hz  (from: EDID)
"1920x1080_60_0"     : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16) (from: EDID)
"1920x1080_24"       : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32) (from: EDID)
"1920x1080_60i"      : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5) (from: EDID)
"1440x480"           : 1440 x  480 @  60.1 Hz Interlace  (from: EDID)
"1440x480_60i"       : 1440 x  480 @  60.1 Hz Interlace  (from: EDID)
"1400x1050"          : 1400 x 1050 @  60.0 Hz  (from: EDID)
"1400x1050_60"       : 1400 x 1050 @  60.0 Hz  (from: EDID)
"1280x1024"          : 1280 x 1024 @  60.0 Hz  (from: EDID)
"1280x1024_60"       : 1280 x 1024 @  60.0 Hz  (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)
"1024x768"           : 1024 x  768 @  60.0 Hz  (from: EDID)
"1024x768_60"        : 1024 x  768 @  60.0 Hz  (from: EDID)
"800x600"            :  800 x  600 @  60.3 Hz  (from: EDID)
"800x600_60"         :  800 x  600 @  60.3 Hz  (from: EDID)
"720x480"            :  720 x  480 @  59.9 Hz  (from: EDID)
"720x480_60"         :  720 x  480 @  59.9 Hz  (from: EDID)
"720x480_60i"        : (1440)x 480 @ 59.94/60 Hz Interlace (CEA-861B Format 7) (from: EDID)
"640x480"            :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1) (from: EDID)
"640x480_60"         :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1) (from: EDID)
--- End of ModePool for SONY TV XV (DFP-0): ---

However, after adding "1920x1080_60_0" and "1920x1080_24" to the Modes section of that stripped-down xorg.conf suggested in that thread X refused to start so I've gone back to the default xorg.conf that xbmc live installed.

I've tried every combination of the sync/refresh options in the xbmc video playback settings to no avail.
Reply
#4
Code:
DEBUG: OutputPicture - change configuration. 720x304. framerate: 25.00
NOTICE: Display resolution USER : default: 1920x1080 @ 24.00Hz (14)
See now that doesn't work, you can't push 25 frames per second to a display device that can only show 24 per second and expect the video to play properly.

I suggest setting the refreshrate in xbmc at 60 hertz and turning on adjust refreshrate.
Reply
#5
Just tried changing the resolution to 1920x1080@60Hz (I may have changed it to 24 when I was 'options mashing' trying to get playback to work), and went through all the sync/refresh options one by one.

Still the same skipping problem.

Here's a section of the debug log for that last try I did:

Code:
18:42:21 T:2948209520 M:1699987456  NOTICE:  (VDPAU) Total Output Surfaces Available: 4 of a max (tmp: 4 const: 4)
18:42:21 T:2948209520 M:1699987456  NOTICE: VDPAU Decoder capabilities:
18:42:21 T:2948209520 M:1699987456  NOTICE: name          level macbs width height
18:42:21 T:2948209520 M:1699987456  NOTICE: ------------------------------------
18:42:21 T:2948209520 M:1699987456  NOTICE: MPEG1             0  8192  2048  2048
18:42:21 T:2948209520 M:1699987456  NOTICE: MPEG2_SIMPLE      3  8192  2048  2048
18:42:21 T:2948209520 M:1699987456  NOTICE: MPEG2_MAIN        3  8192  2048  2048
18:42:21 T:2948209520 M:1699987456  NOTICE: H264_MAIN        41  8190  2032  2048
18:42:21 T:2948209520 M:1699987456  NOTICE: H264_HIGH        41  8190  2032  2048
18:42:21 T:2948209520 M:1699987456  NOTICE: VC1_SIMPLE        1  8190  2048  2048
18:42:21 T:2948209520 M:1699987456  NOTICE: VC1_MAIN          2  8190  2048  2048
18:42:21 T:2948209520 M:1699987456  NOTICE: VC1_ADVANCED      4  8190  2048  2048
18:42:21 T:2948209520 M:1699987456  NOTICE:  (VDPAU) Didnt find a Video Surface Available (Total: 1). Creating a new one. TRY #1
18:42:21 T:2948209520 M:1699606528  NOTICE:  (VDPAU) Creating the video mixer
18:42:21 T:2948209520 M:1697939456  NOTICE:  fps: 25.000000, pwidth: 720, pheight: 304, dwidth: 720, dheight: 304
18:42:21 T:2948209520 M:1697939456   DEBUG: OutputPicture - change configuration. 720x304. framerate: 25.00
18:42:21 T:2948209520 M:1697939456  NOTICE: Display resolution ADJUST : 1920x1080 @ 60.00 - Full Screen (12)
18:42:21 T:2948209520 M:1697939456  NOTICE:  (VDPAU) Didnt find a Video Surface Available (Total: 2). Creating a new one. TRY #1
18:42:21 T:2948209520 M:1696288768  NOTICE:  (VDPAU) Didnt find a Video Surface Available (Total: 3). Creating a new one. TRY #1
18:42:21 T:2948209520 M:1693495296  NOTICE:  (VDPAU) Didnt find a Video Surface Available (Total: 4). Creating a new one. TRY #1
18:42:21 T:3078416272 M:1692987392  NOTICE: Using GL_TEXTURE_2D
18:42:21 T:3078416272 M:1692987392   DEBUG: GL: Requested render method: 0
18:42:21 T:3078416272 M:1692987392  NOTICE: GL: Using VDPAU render method
18:42:21 T:3078416272 M:1692987392  NOTICE: GL: NPOT texture support detected
18:42:21 T:3078416272 M:1692987392   DEBUG: GL: Creating YUV NPOT texture of size 720 x 304

Full log: http://pastebin.com/z1cUNkj0
Reply
#6
The log doesn't indicate any problems, when you press 'o' during playback, do you get any framedrops or fluctuations in the fps?
Reply
#7
For a file that's skipping the FPS spends most of the time on 25 but occasionally displays 24.98 or 25.02, occasionally 25.05. Neither CPU core gets higher than around 10%. The drop value displayed is 8. I'm not sure what that means but a file that plays fine (hovering around 30fps) also has a drop value of 8.

The skipping is like a constant shudder, like it's skipping frames but at a very constant rate.

Ok, so, I've now gone through a whole bunch of media and the only ones that want to play properly are either hovering around 30FPS or 24FPS. Every file I've found that hovers around 25FPS has the terrible stuttering.
Reply
#8
You are seeing http://en.wikipedia.org/wiki/Telecine#Telecine_judder
In player settings under video, turn on "adjust refreshrate to match video fps".
Reply
#9
Yup, I tried every possible combination of the refresh and sync settings from within XBMC at all stages of this, I've also made all manner of changes to the xorg.conf and tried different nvidia drivers but nothing fixed the problem. I even gave the xbmcfreak version a go but had similar (and other, different) problems.

So, against my better judgement, I installed Windows 7 and the Windows XBMC on the machine. Everything worked fine out of the box. I haven't activated the license yet and I'd rather not blow the $100 but if it's a choice of being able to enjoy all of my media or a tiny portion I may have to. I'm doubly peeved as I admin countless linux boxes (debian too, for shame) at work every day but I never have good experiences with any form of graphical interface on linux. I figure this is an nvidia driver bug as during the Windows install this sequence of events occurred:

1. Install Windows 7 (no drivers, updates or anything else)
2. Play one of the problem media files in Windows Media Player with no trouble, windowed or full screen.
3. Install chipset drivers
4. Open the same media file in Windows Media Player in a window with no problems. Making it full screen results in a three second delay while the resolution changes and the video was much like before on linux - sustained judder.

Nvidia hates my TV, I guess.

Either way, as soon as the next version of XBMC live comes out I'll give it another go. Thank you so much for your help with this issue. It's a shame it isn't working with my hardware/media but I at least get to use XBMC again (albeit with a somewhat lighter wallet!)

Thanks again, Big Grin
Reply

Logout Mark Read Team Forum Stats Members Help
Various video/audio problems with DVD and SD content on ASRock 3300