VDPAU and MythTV 0.21

Finally had time to try out VDPAU in combination with MythTV. The MythTV team have implemented VDPAU support in yet to be released 0.22, but I want to try the backport to 0.21 developed by Jean-Yves Avenard.

Test Setup

Rather than using a laptop I moved onto one of the myPVR test environments, with the addition of a VDPAU capable PCIe card.

  • Asus M2NPV-VM Motherboard
  • AMD Athlon X2 6000+
  • 2GB Ram
  • Asus 8400 GS PCIe card with 512MB Ram
  • Ubuntu 8.10
  • Nvidia 180.37 Video driver
  • Hauppage HVR 900 digital tuner
  • freeview|HD terrestrial signal

MythTV Install

Before I could use Jean’s Ubuntu packages I needed to

  • upgrade the myPVR test environment from Ubuntu 8.04 to 8.10.
  • remove Ubuntu supplied NVidia drivers.
  • Install NVidia 180.37 binary driver
  • Add Jean-Yves’s Ubuntu repository.

I created a file /etc/apt/sources.list.d/jean.list

deb http://www.avenard.org/files/ubuntu-repos release/

and then upgraded mythtv, mythtv-backend, mythtv-frontend.

Configuring MythTV

Before using VDPAU under MythTV we need to defined a display profile for TV that specifies VDPAU for both. The MythTV Wiki has a reference on configuring VDPAU

I didn’t need to re-scan for any channels as they were already loaded from previous testing of ffmpeg’s software based decoder.

Playback testing

Here in New Zealand our freeview|HD service currently broadcasts in three different resolutions

  • 576i H.264 video with HE-AAC Audio
  • 720p H.264 video with HE-AAC Audio
  • 1080i H.264 video with HE-AAC and AC3 Audio.

With all of the formats there was minimal CPU utilisation, but quite a high degree of video tearing on the HD Channels. First i disabled the Composite extension by adding the following to my /etc/init.d/xorg.conf

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

Then I tried various de-interlacers. I found good performance with Temporal 2x good, but Advanced 2x caused the playback of 1080i video to get very jerky.

Issues

There is still a little bit of tearing from time to time with H.264 playback when compared with the older MPEG2 based freeview service.

There are some stability issues, especially with LiveTV. The frontend will either exit from TV playback with an error, or crash.

Quite often I can have the front end produce a series of audio sync errors and the playback becomes very erratic. Usually the frontend will report

NVP: Video is 3.12705 frames behind audio (too slow), dropping frame to catch up.

Our other audio related errors like this

2009-03-11 21:51:57.506 Video sync method can't support double framerate (refresh rate too low for bob deint)
2009-03-11 21:51:57.507 Video timing method: USleep with busy wait
2009-03-11 21:51:57.890 Audio -83 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:57.910 Audio -63 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:57.933 Audio -43 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:57.985 Audio -99 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:57.995 Audio -86 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.015 Audio -66 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.026 Audio -46 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.223 NVP: prebuffering pause
GetBootInfo ResidentProgram is not implemented
2009-03-11 21:51:58.251 Audio -87 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.267 Audio -67 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.289 Audio -55 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.299 Audio -35 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.315 Audio -15 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.326 Audio 5 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.354 NVP: prebuffering pause
2009-03-11 21:51:58.520 Audio -98 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.550 Audio -78 ms behind video but already 75 video frames queued. AV-Sync might be broken.
2009-03-11 21:51:58.571 Audio -58 ms behind video but already 75 video frames queued. AV-Sync might be broken.

or this

2009-03-11 21:56:37.977 NVP: prebuffering pause
2009-03-11 21:56:38.047 WriteAudio: buffer underrun
2009-03-11 21:56:38.590 NVP: prebuffering pause
2009-03-11 21:56:38.885 NVP: prebuffering pause
2009-03-11 21:56:39.557 NVP: prebuffering pause
GetBootInfo ResidentProgram is not implemented
2009-03-11 21:56:40.467 NVP: prebuffering pause
2009-03-11 21:56:40.769 NVP: prebuffering pause
2009-03-11 21:56:42.067 NVP: prebuffering pause
2009-03-11 21:56:42.953 NVP: prebuffering pause
2009-03-11 21:56:43.102 NVP: prebuffering pause
2009-03-11 21:56:43.851 NVP: prebuffering pause
2009-03-11 21:56:44.511 NVP: prebuffering pause
2009-03-11 21:56:44.594 NVP: prebuffering pause
2009-03-11 21:56:45.030 NVP: prebuffering pause
2009-03-11 21:56:45.924 NVP: prebuffering pause
2009-03-11 21:56:46.443 WriteAudio: buffer underrun
2009-03-11 21:56:46.807 NVP: prebuffering pause
2009-03-11 21:56:47.837 NVP: prebuffering pause
2009-03-11 21:56:49.232 NVP: prebuffering pause
2009-03-11 21:56:49.234 WriteAudio: buffer underrun
2009-03-11 21:56:49.438 NVP: Prebuffer wait timed out 10 times.
2009-03-11 21:56:50.069 NVP: prebuffering pause

I’ve managed to produce these errors with both 720p and 1080i content, and now have some samples on disk for further testing.

Conclusion

Sadly the same as my initial VDPA testing report, great steps forward but not WAF proof yet if you want HD playback. In the space of a couple of hours testing I managed to crash the front end over a dozen times. Ok most of these were during LiveTV channel changing, but some were down to fast forwarding material. Less issues with the 576i content compared with the 1080i content, but still far from stable.

Next up is the fact that the video tearing is too much, especially on a large screen. I’d rather have the slightly lower quality MPEG2 based freeview service than suffer the video tearing.

Here is hoping that future updates from NVidia remove some of these issues, while the numerous testers of VDPAU + MythTV here in NZ and elsewhere in the world can resolve any other problems.

Sorry, the comment form is closed at this time.