[mythtv-users] prebuffering pause

Mike Kurtz fnorbenden at yahoo.com
Sun Jan 4 16:54:23 UTC 2009





----- Original Message ----
From: George Mari <george_mythusers at mari1938.org>
To: Discussion about mythtv <mythtv-users at mythtv.org>
Sent: Saturday, January 3, 2009 10:46:47 PM
Subject: Re: [mythtv-users] prebuffering pause

George Mari wrote:
> Mike Kurtz wrote:
>> Have a box set up with a KWorld ATSC115 on SuSE 11.0 with a GeForce 5500. I have XvMC set up properly (substantial drop in CPU usage after I configured it), and sound is working (ALSA:hw:0,0 to avoid pulseaudio). I get full video and audio playback. Ever 5-6 seconds, however, I get a stutter. I look at the console output and I see:
>>
>> NVP: prebuffering pause
>> <repeated>
>> NVP: Prebuffer wait timed out 10 times
>> <repeated>
>> NVP: prebuffering pause
>> WriteAudio: buffer underrun
>> <these two repeated/alternated>
>> this continues for about a minute, then I see
>> NVP:::AddAudioData():pl: Audio buffer overflow, audio data lost!
>> <repeated, interspersed with some prebuffering pauses, then becoming more frequent>
>>
>> I have extra sound buffer on and aggressive sound buffering off. I'm not using CFS. CPU usage is between 40-70, which is high, but I haven't seen it really spiking, just consistent stuttering.
>>
> 
> Are you sure you have extra sound buffering on and agressive sound 
> buffering off?
> 
> Otherwise start experimenting with PCI latency:
> 
> http://www.mythtv.org/wiki/index.php/PCI_Latency
> 

>If giving your audio device a high (really high - like 128, or 256) PCI 
>latency doesn't improve the problem, you have to experiment. I would try:

>1. Turn off XvMC, unless you absolutely need it.
>2. Turn off de-interlacing.  Not permanently, remember - you're just 
>experimenting.
>3. See if anything else is hogging the PCI bus with a high latency.  As 
>a matter of fact, please send along the output of lspci -v.  Oh, and 
>please don't top-post it - I'll never see it. :-)
>4. Is your sound device set to ALSA:default?  It should be, unless 
>you're not using ALSA, or have some other, more involved, ALSA 
>configuration.

I set audio latency to 128. It helped a little. Setting the video latency to 128 (nvidia automatically sets it to 256 when X starts) also helped a little, but neither were a huge boon.

De-interlacing is off. That makes most problems go away, but it an awful solution and really shouldn't be neccessary, so I'm hoping we can find the root problem.

Here's my lspci -v:
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 661FX/M661FX/M661MX Host (rev 11)
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, medium devsel, latency 32
    Memory at e8000000 (32-bit, non-prefetchable) [size=64M]
    Capabilities: [c0] AGP version 3.5
    Kernel driver in use: agpgart-sis
    Kernel modules: sis-agp

00:01.0 PCI bridge: Silicon Integrated Systems [SiS] SiS AGP Port (virtual PCI-to-PCI bridge) (prog-if 00 [Normal decode])
    Flags: bus master, 66MHz, fast devsel, latency 64
    Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
    Memory behind bridge: ec000000-edffffff
    Prefetchable memory behind bridge: e0000000-e7ffffff
    Kernel modules: shpchp

00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS964 [MuTIOL Media IO] (rev 36)
    Flags: bus master, medium devsel, latency 0

00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 [IDE] (rev 01) (prog-if 80 [Master])
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, medium devsel, latency 128, IRQ 16
    I/O ports at 01f0 [size=8]
    I/O ports at 03f4 [size=1]
    I/O ports at 0170 [size=8]
    I/O ports at 0374 [size=1]
    I/O ports at 4000 [size=16]
    Capabilities: [58] Power Management version 2
    Kernel driver in use: pata_sis
    Kernel modules: sis5513, ide-pci-generic, pata_acpi, ata_generic, pata_sis

00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] AC'97 Sound Controller (rev a0)
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, medium devsel, latency 32, IRQ 18
    I/O ports at e000 [size=256]
    I/O ports at e800 [size=128]
    Capabilities: [48] Power Management version 2
    Kernel driver in use: Intel ICH
    Kernel modules: snd-intel8x0

00:03.0 USB Controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10 [OHCI])
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, medium devsel, latency 32, IRQ 20
    Memory at ee02b000 (32-bit, non-prefetchable) [size=4K]
    Kernel driver in use: ohci_hcd
    Kernel modules: ohci-hcd

00:03.1 USB Controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10 [OHCI])
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, medium devsel, latency 32, IRQ 21
    Memory at ee02d000 (32-bit, non-prefetchable) [size=4K]
    Kernel driver in use: ohci_hcd
    Kernel modules: ohci-hcd

00:03.2 USB Controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f) (prog-if 10 [OHCI])
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, medium devsel, latency 32, IRQ 22
    Memory at ee028000 (32-bit, non-prefetchable) [size=4K]
    Kernel driver in use: ohci_hcd
    Kernel modules: ohci-hcd

00:03.3 USB Controller: Silicon Integrated Systems [SiS] USB 2.0 Controller (prog-if 20 [EHCI])
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, medium devsel, latency 32, IRQ 23
    Memory at ee029000 (32-bit, non-prefetchable) [size=4K]
    Capabilities: [50] Power Management version 2
    Kernel driver in use: ehci_hcd
    Kernel modules: ehci-hcd

00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 90)
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, medium devsel, latency 32, IRQ 19
    I/O ports at e400 [size=256]
    Memory at ee02a000 (32-bit, non-prefetchable) [size=4K]
    [virtual] Expansion ROM at 70000000 [disabled] [size=128K]
    Capabilities: [40] Power Management version 2
    Kernel driver in use: sis900
    Kernel modules: sis900

00:05.0 IDE interface: Silicon Integrated Systems [SiS] RAID bus controller 180 SATA/PATA  [SiS] (rev 01) (prog-if 85 [Master SecO PriO])
    Subsystem: Foxconn International, Inc. Device 0c95
    Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 17
    I/O ports at e900 [size=8]
    I/O ports at ea00 [size=4]
    I/O ports at eb00 [size=8]
    I/O ports at ec00 [size=4]
    I/O ports at ed00 [size=16]
    I/O ports at <unassigned>
    Capabilities: [58] Power Management version 2
    Kernel driver in use: sata_sis
    Kernel modules: ide-pci-generic, sata_sis, pata_acpi, ata_generic

00:08.0 Network controller: RaLink RT2561/RT61 802.11g PCI
    Subsystem: RaLink EW-7108PCg
    Flags: bus master, slow devsel, latency 32, IRQ 17
    Memory at ee020000 (32-bit, non-prefetchable) [size=32K]
    Capabilities: [40] Power Management version 2
    Kernel driver in use: rt61pci
    Kernel modules: rt61pci

00:09.0 Multimedia controller: Philips Semiconductors SAA7133/SAA7135 Video Broadcast Decoder (rev f0)
    Subsystem: KWorld Computer Co. Ltd. Device 7352
    Flags: bus master, medium devsel, latency 32, IRQ 18
    Memory at ee02c000 (32-bit, non-prefetchable) [size=2K]
    Capabilities: [40] Power Management version 2
    Kernel driver in use: saa7134
    Kernel modules: saa7134

00:0a.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08)
    Subsystem: Creative Labs SBLive! 5.1 Model SB0100
    Flags: bus master, medium devsel, latency 176, IRQ 19
    I/O ports at ee00 [size=32]
    Capabilities: [dc] Power Management version 2
    Kernel driver in use: EMU10K1_Audigy
    Kernel modules: snd-emu10k1

00:0a.1 Input device controller: Creative Labs SB Live! Game Port (rev 08)
    Subsystem: Creative Labs Gameport Joystick
    Flags: bus master, medium devsel, latency 32
    I/O ports at ef00 [size=8]
    Capabilities: [dc] Power Management version 2
    Kernel driver in use: Emu10k1_gameport
    Kernel modules: emu10k1-gp

01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5500] (rev a1) (prog-if 00 [VGA controller])
    Flags: bus master, 66MHz, medium devsel, latency 176, IRQ 16
    Memory at ec000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (32-bit, prefetchable) [size=128M]
    [virtual] Expansion ROM at ed000000 [disabled] [size=128K]
    Capabilities: [60] Power Management version 2
    Capabilities: [44] AGP version 3.0
    Kernel driver in use: nvidia
    Kernel modules: nvidiafb, nvidia

I thought I was using XvMC, but it turns out that I wasn't. I went into settings and turn off opengl vertical sync and changed all the decoders to XvMC. I end up with a blue screen and the OSD frozen on, have to switch to another tty to kill the process, as it's unresponsive. Here is the playback log:

2009-01-04 10:41:50.178 AFD: Using xvmc for video decoding
2009-01-04 10:41:50.178 AFD: Looking for decoder for MPEG2VIDEO_XVMC
2009-01-04 10:41:50.179 AFD: Opened codec 0x4728340, id(MPEG2VIDEO_XVMC) type(Video)
2009-01-04 10:41:50.179 AFD: Stream #1, has id 0x84 codec id AC3, type Audio, bitrate 384000 at 0x0x47288c0
2009-01-04 10:41:50.179 AFD: codec AC3 has 6 channels
2009-01-04 10:41:50.179 AFD: Looking for decoder for AC3
2009-01-04 10:41:50.180 AFD: Opened codec 0x47276e0, id(AC3) type(Audio)
2009-01-04 10:41:50.297 RingBuf(/home/fnor/DVR/1051_20090104104146.mpg): CalcReadAheadThresh(65384 KB)
             -> threshhold(64 KB) min read(0 KB) blk size(32 KB)
2009-01-04 10:41:50.301 Opening audio device 'hw:0,0'. ch 2(2) sr 48000
2009-01-04 10:41:50.302 Opening ALSA audio device 'hw:0,0'.
2009-01-04 10:41:50.310 NVP: Prebuffer wait timed out 10 times.
2009-01-04 10:41:50.329 Mixer unable to find control PCM
2009-01-04 10:41:50.330 Mixer unable to find control PCM
2009-01-04 10:41:50.331 NVP: Enabling Audio
2009-01-04 10:41:50.331 Dec: Trying to select track (w/lang)
2009-01-04 10:41:50.332 Dec: Selecting first track
2009-01-04 10:41:50.332 Dec: Selected track #1 in the Unknown language(0)
2009-01-04 10:41:50.332 Resyncing position map. posmapStarted = 0 livetv(1) watchingRec(1)
2009-01-04 10:41:50.333 Position map filled from DB to: 0
2009-01-04 10:41:50.333 SyncPositionMap watchingrecording, from DB: 1 entries
2009-01-04 10:41:50.334 Filling position map from 1 to 42
2009-01-04 10:41:50.335 Position map filled from Encoder to: 0
2009-01-04 10:41:50.335 SyncPositionMap watchingrecording total: 1 entries
2009-01-04 10:41:50.335 SyncPositionMap, new totframes: 0, new length: 0, posMap size: 1
2009-01-04 10:41:50.335 AFD: Partial position map found
2009-01-04 10:41:50.335 AFD: Successfully opened decoder for file: "/home/fnor/DVR/1051_20090104104146.mpg". novideo(0)
2009-01-04 10:41:50.338 NVP: DoPlay: rate: 29.97 speed: 1 skip: 1 => new interval 33366
2009-01-04 10:41:50.339 Set video sync frame interval to 33366
2009-01-04 10:41:50.339 NVP: Stretch Factor 1, allow passthru 
2009-01-04 10:41:50.343 VideoOutputXv: UpdatePauseFrame() AAAAAAAA
2009-01-04 10:41:50.343 VideoOutputXv: UpdatePauseFrame -- XvMC
2009-01-04 10:41:50.343 VideoOutputXv: UpdatePauseFrame -- XvMC: 
            Did NOT find a pause frame
2009-01-04 10:41:50.344 VideoOutputXv: ProcessFrameXvMC: Tried to reuse frame but failed
2009-01-04 10:41:50.357 OSDChroma: cstart: 0  cend: 768
2009-01-04 10:41:50.357 OSDChroma: ldispy: 0 height: 768
2009-01-04 10:41:50.366 VideoOutputXv: ShowXvMC(): No frame to show
2009-01-04 10:41:50.379 NVP: Waiting for prebuffer.. 0 AAAAAAAA
2009-01-04 10:41:50.427 RingBuf(/home/fnor/DVR/1051_20090104104146.mpg): CalcReadAheadThresh(65384 KB)
             -> threshhold(64 KB) min read(0 KB) blk size(32 KB)
2009-01-04 10:41:50.427 Resyncing position map. posmapStarted = 0 livetv(1) watchingRec(1)
2009-01-04 10:41:50.429 Position map filled from DB to: 0
2009-01-04 10:41:50.430 SyncPositionMap watchingrecording, from DB: 1 entries
2009-01-04 10:41:50.431 Filling position map from 1 to 45
2009-01-04 10:41:50.432 Position map filled from Encoder to: 0
2009-01-04 10:41:50.432 SyncPositionMap watchingrecording total: 1 entries
2009-01-04 10:41:50.434 XvMC: picture structure FRAME
2009-01-04 10:41:50.512 NVP: Waiting for prebuffer.. 1 LAAAAAAA
2009-01-04 10:41:50.646 NVP: Waiting for prebuffer.. 2 LAAAAAAA
2009-01-04 10:41:50.779 NVP: Waiting for prebuffer.. 3 LAAAAAAA
2009-01-04 10:41:50.912 NVP: Waiting for prebuffer.. 4 LAAAAAAA
2009-01-04 10:41:51.045 NVP: Waiting for prebuffer.. 5 LAAAAAAA
2009-01-04 10:41:51.179 NVP: Waiting for prebuffer.. 6 LAAAAAAA
2009-01-04 10:41:51.312 NVP: Waiting for prebuffer.. 7 LAAAAAAA
2009-01-04 10:41:51.445 NVP: Waiting for prebuffer.. 8 LAAAAAAA
2009-01-04 10:41:51.578 NVP: Waiting for prebuffer.. 9 LAAAAAAA
2009-01-04 10:41:51.712 NVP: Prebuffer wait timed out 10 times.

I'm using ALSA:hw:0,0 since ALSA:default on my system is controlled by pulseaudio. It's worth noting that it's looking for PCM even though I've set mixer control to "Master," which looks to me like a bug. As for XvMC, I'm not sure what's going on, as I'm pretty unfamiliar with XvMC. Here's the output from xvmcinfo (from the wiki), maybe it makes more sense to you guys:

fnor at bendenweyr:~/Desktop> ./xvmcinfo 

Xv version 2.2
XvMC version 1.1

screen number 0
   info for adaptor 0 [NV17 Video Overlay]
      number of XvMC surface types: 2

      info about surface 0:
         max_width=2032
         max_height=2032
         subpicture_max_width=2046
         subpicture_max_height=2046
         chroma_format:
            XVMC_CHROMA_FORMAT_420 
         mc_type:
            format                   : MPEG1
            accelaration start from  : 
         flags:
            IDCT XVMC_OVERLAID_SURFACE XVMC_SUBPICTURE_INDEPENDENT_SCALING 

      info about surface 1:
         max_width=2032
         max_height=2032
         subpicture_max_width=2046
         subpicture_max_height=2046
         chroma_format:
            XVMC_CHROMA_FORMAT_420 
         mc_type:
            format                   : MPEG1
            accelaration start from  : 
         flags:
            MOCOMP XVMC_OVERLAID_SURFACE XVMC_SUBPICTURE_INDEPENDENT_SCALING 

   info for adaptor 1 [NV17 Video Texture]
      number of XvMC surface types: 0

   info for adaptor 2 [NV05 Video Blitter]
      number of XvMC surface types: 0

   info for adaptor 3 [NVIDIA Video Interface Port]
      number of XvMC surface types: 0

I'm beginning to suspect something is just screwy with XvMC, and if I could get it to work, that would solve my problems, which appear to be CPU starvation-related now that I take another look at it:

CPU(s): 59.9%us, 7.2%sys, 0.0%ni, 31.9%id, 0.7%wa, 0.0%hi, 0.3%hi, 0.3%si, 0.0%st

Taken while frontend was running with default decoder and no interlacer. This setup works roughly 95% of the time (some jerkiness). This all is with mythfrontend running as root with priority threads enabled on a be/fe machine with mythbackend also running as root.

Thanks for all your help.

______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



      


More information about the mythtv-users mailing list