Video Tearing Fixed – Xubuntu 9.10 – Nvidia ION

I use mplayer as my default video player, and have always had video tearing of some sort on my main PC. Having recently updated my PC to an Asus EB1012 net-top with the Nvidia ION graphics chip I found that enabling the vdpau options with mplayer gave me tear free playback. So I set out to resolve it for other file types (e.g. mp4 / avi)

I run Xubuntu by preference and normally use the Compositor to add transparency and shadows, and the default output plugin for mplayer is xv.

1. Turn off the compositor

2. This should produce tear free playback in totem and vlc

3. Open up nvidia-settings and ensure Sync to Vblank is ticked inĀ  X Server XVideo Settings, and Sync to VBlank and Allow Flipping is ticked in Open GL Settings

4. edit the ~/.mplayer/config file

I grabbed the config file from GeexBox, as this served as a useful template to set up profiles for various file types.

For h264 / vdpau files (mkv) that use the GPU to process

[extension.mkv]
profile-desc=”Profile for Matroska files”
profile=lang
vo=vdpau
vc=ffh264vdpau

For HD Files (mp4)

[extension.mp4]
profile-desc=”Profile for HD mp4 files”
vo=gl
vfm=ffmpeg
lavdopts=lowres=0:fast=1:skiploopfilter=all
autosync=30
cache=32768

For “normal” (avi) files

[extension.avi]
profile-desc=”Profile for deinterlacing avi files”
vo=gl
vf=pp=lb/hb/vb/dr

The default section looks like this:

[default]
vo=vdpau,xv,gl
ontop=yes
double=yes
dr=yes
framedrop=yes
cache=8192
lirc=no
alang=en
slang=en

I have to make sure I check encoded options and rename the extension accordingly, but 95% of the time, this configuration works fine for me

Here is the entire ~/.mplayer/config file:

[deinterlace]
profile-desc=”Profile for picture de-interlacing”
vf-add=pp=fd

[dvd]
profile-desc=”Profile for DVD playback”
profile=deinterlace
dvd-speed=4
cache=8192

[lang]
profile-desc=”Profile for language”
alang=en

[protocol.dvd]
profile-desc=”Profile for dvd:// streams”
profile=dvd
profile=lang

[protocol.dvdnav]
profile-desc=”Profile for dvdnav:// streams”
profile=dvd
profile=lang
nocache=yes

[protocol.cdda]
profile-desc=”Profile for cdda:// streams”
cdda=speed=2

[protocol.tv]
profile-desc=”Profile for tv:// streams”
profile=deinterlace

[extension.mkv]
profile-desc=”Profile for Matroska files”
profile=lang
vo=vdpau
vc=ffh264vdpau

[extension.mp4]
profile-desc=”Profile for HD mp4 files”
vo=gl
vfm=ffmpeg
lavdopts=lowres=0:fast=1:skiploopfilter=all
autosync=30
cache=32768

[extension.avi]
profile-desc=”Profile for deinterlacing avi files”
vo=gl
vf=pp=lb/hb/vb/dr

[default]
vo=vdpau,xv,gl
ontop=yes
double=yes
dr=yes
framedrop=yes
cache=8192
lirc=no
alang=en
slang=en

Leave a Reply

Your email address will not be published. Required fields are marked *