[mythtv-users] video stutter with VDPAU and 1080i DVB

Gerben Roest g.roest at grepit.nl
Wed Jan 13 12:43:37 UTC 2010


> On 01/09/2010 11:11 AM, Justin Smith wrote:
>>> I get a slight but annoying stutter in video playback of live TV
>>> on my mythTV box and I was wondering if anyone had any ideas on
>>> how to troubleshoot this. It only occurs for one 1080i HD DVB
>>> channel - other HD channels are fine (FWIW: Ch9 HD in Australia).
>>> 
>>> 
>>> The stuttering is confirmed in the frontend log (-v playback)
>>> with lines like this:
>>> 
>>> NVP(6): Video is 3.19567 frames behind audio (too slow), dropping
>>>  frame to catch up.
>>> 
>>> When I set the audio output device to NULL, the stuttering (and
>>> log lines) disappear. But as I'm not too good at lip reading...
>>> :)
>>> 
> 
> I'd start with: 
> http://www.mythtv.org/wiki/Troubleshooting:Prebuffering_pause . Also,
>  make sure you're not using PulseAudio.

I have almost the same problem on 1080i DVB-C via a KNC-1 card. Using 
advanced 2x deinterlacing I have frequent stuttering in video playback. 
My setup:

- AMD Athlon II X4 600e (800 MHz or 2200 MHz, no difference), 4GB mem
- Nvidia 9500GT with 512 MB or 9600GT with 1GB (no difference)
- WD RE4GP 2TB disk with xfs for mythtv video
- mythfrontend version: branches/release-0-22-fixes [23110]
- nvidia driver 190.53
- Ubuntu 8.10
- no pulseaudio
- checked the prebuffering_pause troubleshooting page

Only when I remove the text at "audio output device" playback is super 
smooth. When I use NULL it still stutters. With <empty> for audio device 
I get in the mythfrontend -v playback logs:

2010-01-13 12:07:55.453 Error opening audio device ()
			eno: No such file or directory (2)
< I first get a lot of these, and then:>

2010-01-13 12:07:55.454 AudioOutput Error: Error opening audio device 
(), the error was: No such file or directory
2010-01-13 12:07:55.454 NVP(0): Disabling Audio, reason is: Error 
opening audio device (), the error was: No such file or directory

Apparently NULL is different than "Disabling Audio".  With no audio 
device the only logging from mythfrontend is stuff like this:

2010-01-13 12:08:27.466 NVP(0): 800 interlaced frames seen.
'video_output' mean = '40031,80', std. dev. = '8159,97', fps = '24,98'
'video_output' mean = '40031,36', std. dev. = '8683,34', fps = '24,98'
'video_output' mean = '40027,93', std. dev. = '8431,32', fps = '24,98'
'video_output' mean = '40031,18', std. dev. = '8131,20', fps = '24,98'

When using normal ALSA:Default I get this stuff in the logs:

2010-01-13 12:59:08.837 NVP(0): Video is 3.19365 frames behind audio 
(too slow), dropping frame to catch up.
'video_output' mean = '41699,88', std. dev. = '23292,81', fps = '23,98'
2010-01-13 12:59:10.080 NVP(0): prebuffering pause
2010-01-13 12:59:10.080 NVP(0): Waiting for prebuffer..  0 
dAAAAALAAAALDAAAAAdA
2010-01-13 12:59:10.713 VidOutVDPAU: Frame b is in use by avlib and so 
is being held for later discarding.
2010-01-13 12:59:10.730 VidOutVDPAU: Frame b is in use by avlib and so 
is being held for later discarding.
2010-01-13 12:59:10.730 VidOutVDPAU: Frame b is in use by avlib and so 
is being held for later discarding.
2010-01-13 12:59:10.730 NVP(0): prebuffering pause
2010-01-13 12:59:10.731 VidOutVDPAU: Frame b is in use by avlib and so 
is being held for later discarding.
2010-01-13 12:59:10.731 NVP(0): Waiting for prebuffer..  0 
AAALAAAAAdAAADdLAdAA
2010-01-13 12:59:13.697 VidOutVDPAU: Frame d is in use by avlib and so 
is being held for later discarding.

The machine is not very busy during LiveTV of 1080i (vmstat 1):

procs -----------memory-----------swap-----io---- -system-- ----cpu----
  r  b  swpd   free   buff  cache  si  so  bi   bo   in   cs us sy id wa
  1  0     0 727188  58644 2224540   0  0   0 1736 2430 3848  5  3 92  0
  0  0     0 725544  58644 2225964   0  0   0 1778 2451 3905  4  3 92  0
  0  0     0 723668  58644 2227824   0  0   0 1715 2500 3766  5  5 90  0
  1  0     0 722064  58644 2229508   0  0   0 2063 2697 4144  6  4 90  0

When I play back a recording of a 1080i transmission, I get less 
messages and the stuttering is less too (but not gone).

I have to mention that when I used Jean-Yves Avenard's 0.21+fixes-vdpau 
I had no stuttering but 0.22+fixes seems to have the above problem. I am 
reluctant to go back because of protocol versions and such.

I saw in the README of the nvidia driver the following under "H3. 
Getting the best performance from the API":

 > For this reason, NVIDIA recommends the following number of video
 > surfaces be allocated:
 >  (num_ref + 3) for progressive content, and no de-interlacing.
 >  (num_ref + 5) for interlaced content using advanced de-interlacing.

In my mythfrontend -h playback logs I see this:

2010-01-13 13:28:03.523 VDPAU: Created VDPAU decoder (4 ref frames)
2010-01-13 13:28:03.781 VDPAU: Using 4 output surfaces (max 4)

So perhaps there should be more output surfaces? Or am I completely 
wrong here and are video surfaces <> output surfaces?

Do you have made any progress, Justin? Or is there anyone who knows 
where to look further?

Sorry for this long post, but thanks for reading,

greetings,

Gerben


More information about the mythtv-users mailing list