我正在尝试播放高清视频文件,播放视频的命令是:
mplayer -vo vdpau -vc ffh264vdpau
我得到的错误是:
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_AC3), -aid 0, -alang und
[mkv] Will play video track 1.
Detected file format: Matroska
VIDEO: [avc1] 1280x720 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
Load subtitles in .
SUB: Could not determine file format
[vdpau] Error when calling vdp_device_create_x11: 1
Error opening/initializing the selected video_out (-vo) device.
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
这是我的信息:
我的操作系统:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu precise (development branch)"
核心:
$ uname -a
Linux 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:45:18 UTC 2012 i686 i686 i386 GNU/Linux
图形处理器:
$ lspci | grep "VGA"
01:00.0 VGA compatible controller: NVIDIA Corporation NV44A [GeForce 6200] (rev a1)
司机:
$ glxinfo | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 6200/AGP/SSE2
OpenGL version string: 2.1.2 NVIDIA 295.40
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
VAINFO:
# vainfo
libva: VA-API version 0.32.0
Xlib: extension "XFree86-DRI" missing on display ":0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/lib/dri/nvidia_drv_video.so
libva: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
我该如何解决我的问题?
答案1
您是否安装了 nvidia 驱动程序?这将安装 libvdpau,从而为您提供 vdpau 支持。通过硬件驱动程序或软件中心安装驱动程序。
答案2
您的视频卡似乎不支持 Xvideo。
尝试使用:
mplayer -vo xv filenameToPlay
答案3
记录一下,以防对某人有用:我无法让 mplayer 播放 vdpau 文件,也无法使用 ffmpeg 将这些文件转换为其他格式。但我能够在命令行上使用 vlc 将文件转换为可播放格式(apt install vlc-bin):
vlc --sout "#transcode{codec=mp4}:std{access=file,dst=output.mp4}" "input.avi" vlc://quit