Saya memiliki laptop dengan kartu grafis Nvidia diskrit .
Bagaimana saya bisa tahu apakah pemutar video saya baik itu mplayer atau vlc atau totem menggunakan nvidia VDPAU atau tidak? Misalnya, menjalankan mplayer2 dengan skrip di bawah ini, saya mendapatkan pesan ini:
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Tapi saya punya file seperti itu di sistem:
-rw-r--r-- 1 root root 1800952 2011-11-23 07:39 /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.290.10
Script untuk mengetahui codec untuk file:
#!/bin/bash
#Script to automatically find out which codec a file is using and determine whether or not to use VDPAU.
#if no input display usage
if [ -z "$1" ]; then
echo usage: $0 /path/to/file
exit
fi
#remember to change this to the path of your mplayer binary
mplayerlocation=/usr/bin/
cd $mplayerlocation
#kinda a lame way to do it, but bring up mplayer and pipe the output to a temporary file, then read which codec the file is
./mplayer -identify -vo vdpau $1 > /tmp/VIDEOCODEC &
sleep 0.5
killall mplayer
videocodec=`cat /tmp/VIDEOCODEC | grep ID_VIDEO_CODEC | cut -c 16-25`
rm /tmp/VIDEOCODEC
echo "VIDEO CODEC: $videocodec"
if [ $videocodec = "ffh264" ]; then
codec='h264'
echo \n Playing $1 with $codec codec \n
./mplayer -vo vdpau -vc ffh264vdpau $1
exit
fi
if [ $videocodec = "ffmpeg2" ]; then
codec='MPEG2'
echo \n Playing $1 with $codec codec \n
./mplayer -vo vdpau -vc ffmpeg12vdpau $1
exit
fi
if [ $videocodec = "ffwmv3" ]; then
codec='WMV3'
echo \n Playing $1 with $codec codec \n
./mplayer -vo vdpau -vc ffwmv3vdpau $1
exit
fi
#VC1 is not supported on most gpus
#uncomment if it is supported on your gpu
#if [ $videocodec = "ffvc1" ]; then
# codec='VC1'
# echo \n Playing $1 with $codec codec \n
# ./mplayer -vo vdpau -vc ffvc1vdpau $1
#
# exit
#fi
#if it isnt one of those it is not supported by vdpau
#so we should play without vdpau
./mplayer $1
exit
EDIT: ternyata tidak dapat menemukan perpustakaan, bahkan ketika memanggilnya melalui bumblebee's v3 optirun, meskipun perpustakaan ada di sana:
optirun vdpauinfo
display: :0.0 screen: 0
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
Error creating VDPAU device: 1
avilella@magneto:~$ locate libvdpau_nvidia.so | xargs ls
/usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.1 /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.290.10
EDIT2: Saya mencoba lagi dengan Ubuntu 12.04 dan saya masih tidak bisa membuatnya bekerja.