별도의 Nvidia 그래픽 카드 가 장착 된 노트북이 있습니다.
비디오 플레이어가 mplayer 또는 vlc인지 또는 토템이 nvidia VDPAU를 사용하는지 여부를 어떻게 알 수 있습니까? 예를 들어 아래 스크립트를 사용하여 mplayer2를 실행하면이 메시지가 나타납니다.
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
그러나 시스템에 그러한 파일이 있습니다.
-rw-r--r-- 1 root root 1800952 2011-11-23 07:39 /usr/lib/nvidia-current/vdpau/libvdpau_nvidia.so.290.10
파일 코덱을 찾는 스크립트 :
#!/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
편집 : 분명히 라이브러리가 있지만 bumblebee의 v3 optirun을 통해 호출 할 때조차도 라이브러리를 찾을 수 없습니다.
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 : Ubuntu 12.04로 다시 시도했지만 여전히 작동하지 않습니다.