Mplayer vdpau script

From MultimediaWiki
Revision as of 10:43, 12 December 2010 by Compn (talk | contribs) (simple mplayer script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

a little bash script to select -vo xv if there is also a -vf switch in mplayer command line. useful due to vdpau problems with video filters.

#!/bin/bash

usevdpau=1

for arg in $@; do
  if [ "$arg" = "-vf" ]; then
    usevdpau=0
  fi
done

if [ "$usevdpau" = "0" ]; then
  /usr/bin/mplayer -vo xv "$@"
else
  /usr/bin/mplayer -vo vdpau "$@"
fi

script by Muzer