i-rinat / libvdpau-va-gl Goto Github PK
View Code? Open in Web Editor NEWVDPAU driver with OpenGL/VAAPI backend
License: MIT License
VDPAU driver with OpenGL/VAAPI backend
License: MIT License
Ability to choose lib dir is required for making Gentoo package.
Examples:
http://quickgit.kde.org/?p=libechonest.git&a=blob&h=ac3c77b30febe9aa2f4127ecf5b51bf6974a6a81&hb=f32ec00185b3fbb4c493dc7cc511b0ad96b7911f&f=CMakeLists.txt#l69
https://bitbucket.org/acoustid/chromaprint/src/dd51f8e571227fc4bb8f09e382e4258ccea46757/CMakeLists.txt?at=master#cl-36
Right now the release tarball name is v0.3.4.tar.gz. A more descriptive name would be
libvdpau-va-gl-0.3.4.tar.gz. Is this possible?
Please avoid using unnecessary CFLAGS by default. This will make packaging simpler.
The README really should include the proper dependencies for Fedora. Even if you are developing it on Ubuntu its courteous to include both since Ubuntu is the top .deb distro and Fedora is the top .rpm distro. If you didn't want to install Fedora yourself (not even in a VM?) you could've at least marked a section off in the README as "Open to contributors for Fedora/SUSE" or something.
Anyway, off my soapbox. See my install script for Fedora 19 for the proper list of dependencies, and please update the README appropriately.
Install script: https://github.com/egriffith/FedPost/blob/master/lib/va_gl.sh
Please provide some releases.
Hi, Rinat.
I've been scratching my head on this one:
Any version above 0.2.1 creates video tearing on both mplayer and Flash. I don't know which commit/change makes this happen.
I don't know what kind of info you need, I'm gonna post what I think it's relevant:
Ubuntu 15.04;
vdpauinfo
header:
display: :0 screen: 0
[VS] Software VDPAU backend library initialized
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_37
libva info: va_openDriver() returns 0
API version: 1
Information string: OpenGL/VAAPI/libswscale backend for VDPAU
vainfo
header:
libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_37
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.37 (libva 1.5.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Mobile - 1.5.0
mesa-vdpau-drivers 10.5.2-0ubuntu1
vdpau-va-driver 0.7.4-3
libvdpau1 0.9-1
If you need some other info, please tell me!
Thanks for your work.
mplayer: gen7_mfd.c:704: gen7_mfd_avc_slice_state: Assertion `slice_param->num_ref_idx_l1_active_minus1 == 0' failed.
i wonder if that problem connected to same gen6 error
i am having debian wheezy x64, tried both mplayer and mplayer2
I am following your vdpau instructions and getting a cmake error:
The source directory "/home/joesmith/build" does not appear to contain CMakeLists.txt
To reproduce: download any hi10p H.264 video sample. Try to play it with:
mplayer -vf-clr -vo vdpau -vc ffh264vdpau, video.mkv
(with the intention of actually putting the vc=ffh264vdpau, line in the config)
It fails ungracefully:
[h264_vdpau @ 0x7f3600095ec0]VDPAU decoding does not support video colorspace
[h264_vdpau @ 0x7f3600095ec0]decode_slice_header error
Some instructions are needed how to configure mplayer to automatically fallback to software decoding for H.264 files that cannot be decoded in hardware.
Test system is Ubuntu 14.04 with ATI HD7850 (radeon driver) and mesa/graphics stack from https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers
I 've compiled both 0.3.4 and master libvdpau-va-gl, but vainfo gets stuck (never returns) when using the vdpau-va-gl backend.
VDPAU_LOG=1 VDPAU_DRIVER=va_gl vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_0_37
[VS] Software VDPAU backend library initialized
[VS] {full} vdp_imp_device_create_x11 display=0x225f430, screen=0
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_0_37
[VS] {full} vdp_imp_device_create_x11 display=0x242e810, screen=0
The backend/vainfo only returns with VDPAU_QUIRKS=AvoidVA:
VDPAU_QUIRKS=AvoidVA VDPAU_LOG=1 VDPAU_DRIVER=va_gl vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_0_37
[VS] Software VDPAU backend library initialized
[VS] {full} vdp_imp_device_create_x11 display=0x767430, screen=0
[VS] {full} VdpGetApiVersion
[VS] {full} VdpGetInformationString
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.6.0)
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA-API - 0.7.5.pre1
vainfo: Supported profile and entrypoints
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_MPEG2_SIMPLE
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_MPEG2_MAIN
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_MPEG4_PART2_SP
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_MPEG4_PART2_ASP
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_H264_BASELINE
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_H264_MAIN
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_H264_HIGH
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_VC1_SIMPLE
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_VC1_MAIN
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_VC1_ADVANCED
[VS] {full} VdpDeviceDestroy device=1
But VDPAU_QUIRKS=AvoidVA does not solve problems with applications.
E.g. gstreamer-vaapi pipeline works with normal va-vdpau-driver backend:
gst-launch-1.0 filesrc location=/opt/vliaskov/Videos/3_neu.mp4 ! qtdemux ! vaapidecode ! vaapisink
but not with
VDPAU_QUIRKS=AvoidVA VDPAU_LOG=1 VDPAU_DRIVER=va_gl
Output of backend here: http://pastebin.com/mGhDnZCT
(there was no compatible capabilities found between vaapidecode element and output vaapisink element of gstreamer. This is with gstreamer 1.5.2)
Without AvoidVA, initialization gets stuck the same way as vainfo.
Should the backend work without AvoidVA? Even with VDPAU_QUIRKS=AvoidVA are these errors expected?
libvdpau-va-gl fails to build on Ubuntu versions older than 14.04 Trusty Tahr. Would it be possible to fix this? The previous version was built properly on Ubuntu Precise, Quantal, Raring and Saucy.
Here's the build log for Ubuntu 13.10 Saucy: https://launchpadlibrarian.net/162926990/buildlog_ubuntu-saucy-amd64.libvdpau-va-gl_0.3.1-1~webupd8~saucy_FAILEDTOBUILD.txt.gz
And for ubuntu 12.10 Quantal: https://launchpadlibrarian.net/162927122/buildlog_ubuntu-quantal-amd64.libvdpau-va-gl_0.3.1-1~webupd8~quantal_FAILEDTOBUILD.txt.gz
I am having some applications print the following error when trying to start vdpau
VDPAU init failed: GL_NV_vdpau_interop not available on current context
My understanding is that GL_NV_vdpau_interop
is some kind of extension to vdpau (possibly something to do with nvidia?). Is there any possibility of implementing this into the va-gl driver?
Stats for nerds says "Software video rendering, accelerated video decoding".
vdpauinfo has the proper (long) output.
Description: Ubuntu 14.04 LTS
Codename: trusty
Linux sda8 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 GNU/Linux
jessie/sid
Intel® Core™ i3-2350M CPU @ 2.30GHz × 4
Intel® Sandybridge Mobile
UID PID PPID C SZ RSS PSR STIME TTY STAT TIME CMD
ricky 3182 1329 23 338195 488120 3 11:54 pts/10 Sl 1:06 /usr/lib/firefox/firefox
ricky 3320 3182 7 173459 118208 0 11:55 pts/10 Sl 0:20 /usr/lib/firefox/plugin-container /usr/lib/flashplugin-installer/libflashplayer.so -greomni /usr/lib/firefox/omni.ja -appomni /usr/lib/firefox/browser/omni.ja -appdir /usr/lib/firefox/browser 3182 true plugin
MPlayer interrupted by signal 11 in module: sleep_timer
How to reproduce - while playing playlist of video, minimise window with video, press enter to change to next video, unminimise it - it would show some frames and would go dead.
Using debian wheezy x64, mplayer2 and awesomewm
After upgrading libvdpau-va-gl from 0.3.4 to 0.3.6, I'm experiencing problems with playing videos in VLC. The video doesn't scale to full screen size when in the full screen mode and some videos have wrong aspect ratio. When I downgrade back to libvdpau-va-gl-0.3.4, all works normally.
VLC: 2.2.2
Distro: Arch Linux
Hi. I'm going to change code license to MIT (https://www.debian.org/legal/licenses/mit). Or at least part of the code.
@mar-kolya, @vincentbernat, @Red54, @elenril, as you made changes, I need to ask you if you don't mind changing licensing terms of your contributions. Please notify, if you are agree (or not) with the license change.
I have compiled mplayer with vdpau support and VDPAU_DRIVER=va_gl is set but when I run mplayer this error is showed:
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory [vdpau] Error when calling vdp_device_create_x11: 1
Compiled commit a7bf701 , it does not link to libswscale.so.2 anymore:
$ objdump -p /usr/lib64/vdpau/libvdpau_va_gl.so.1|grep NEEDED|sort
NEEDED ld-linux-x86-64.so.2
NEEDED libc.so.6
NEEDED libglib-2.0.so.0
NEEDED libGL.so.1
NEEDED libGLU.so.1
NEEDED libpthread.so.0
NEEDED libva.so.1
NEEDED libva-x11.so.1
NEEDED libX11.so.6
livdpau_va_gl uses pthread symbols but forgets to link with pthread:
Unresolved symbols found in: libvdpau-va-gl-0.2.1-root-arekm/usr/lib64/vdpau/libvdpau_va_gl.so.1
pthread_mutex_trylock
pthread_join
pthread_create
pthread_cancel
Can you add such target or make «check» behave in such way? It would be nice for automatic testing after build like that in gentoo packaging...
Here is the proposed patch: https://gist.github.com/Fat-Zer/5845272
It doesn't removes check target.
Also It enhances tests/CMakeLists.txt by removing repetitive strings.
Hello,
Just for information I maintain & updated the package of libvdpau-va-gl in AUR !
You can find it here or for arch user yaourt -S lib32-libvdpau-va-gl
Hava nice day !
VDPAU allows the caller to create and destroy surfaces whenever he wishes. So it should be perfectly valid to create a new surface per each decoded frame and then destroy it when it is no longer needed.
However it seems the va_gl driver does not support this manner of behavior, so it will quickly run out surfaces and start spamming
[VS] error (softVdpDecoderRender): no surfaces left in buffer
See https://lists.libav.org/pipermail/libav-devel/2013-November/052908.html for an example of such code. it works just fine with the Nvidia library, but fails with va-gl.
/libvdpau-va-gl/libvdpau-va-gl-git/src/compat.h:19:44: error: missing binary operator before token "("
Begins on commit e61db79 " move OS-specific thread id related functions to compact.h"
I added #include <libavutil/avutil.h> to compat.h for AV_VERSION_INT definition. Works fine! Pull request zdelat' vlom :)
This is with 0.3.6 on debian stretch using the intel i965 driver. Downgraded to 0.3.4 and it's fine.
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fff94ac3700 (LWP 2990)] 0x00007fffe81cc5b5 in dri2_unbind_context (context=, new=0x7fff9c9c6290) at ../../../../src/glx/dri2_glx.c:182 182 ../../../../src/glx/dri2_glx.c: No such file or directory. (gdb) bt #0 0x00007fffe81cc5b5 in dri2_unbind_context (context=, new=0x7fff9c9c6290) at ../../../../src/glx/dri2_glx.c:182 #1 0x00007fffe81a4515 in MakeContextCurrent (dpy=0x7fff9e169d90, draw=92274693, read=92274693, gc_user=0x7fff9c9c6290) at ../../../../src/glx/glxcurrent.c:214 #2 0x00007fffa4188753 in ?? () from /usr/lib/x86_64-linux-gnu/vdpau/libvdpau_va_gl.so.1 #3 0x00007ffff79a4284 in start_thread (arg=0x7fff94ac3700) at pthread_create.c:333 #4 0x00007ffff74dda4d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Gentoo package manager prints this warning when building commit a7bf701:
* QA Notice: Package triggers severe warnings which indicate that it
* may exhibit random runtime failures.
* /var/package-manager/tmp/portage/x11-libs/libvdpau-va-gl-9999/work/libvdpau-va-gl-9999/tests/test-004.c:62:5: warning: implicit declaration of function ‘calc_difference_r8g8b8a8’ [-Wimplicit-function-declaration]
* Please do not file a Gentoo bug and instead report the above QA
* issues directly to the upstream developers of this software.
Im using libvdpau_va_gl 0.3.4-1 on Debian Sid.
My VA-API backend is fglrx_drv_video, latest one available.
I have a AMD Radeon HD 6870 card, using the latest FGLRX 14.04 drivers.
Whenever I load any flash video (with hardware acceleration enabled) the whole system will freeze completely, requiring a hard reboot.
If I specify AvoidVA in VDPAU_QUIRKS, then the video plays correctly, flash reports accelerated rendering is enabled but not accelerated decoding.
VA-API decoding is working correctly in other applications like VLC.
Is there any system logs which I can check to see what is causing the problem?
Looking at the code, it just seems to call locked_glXSwapBuffers and ignores the requested earliest display time. Even worse, it blocks in the VdpPresentationQueueDisplay function until next vsync.
What it really should do is return immedaitely from the call, and actually swap the buffers at the requested display time asynchronously.
This is needed for players like mplayer2 and mpv, which actually make use of this functionality and expect it to work.
I have a computer with an Intel 1st generation core i5 CPU and iGPU.
Using VLC media player without libvdpau-va-gl works fine but gives some warnings when starting to play a file: Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
With libvdpau-va-gl 0.3.4 installed I get no video (audio still works) but loads of these error messages:
[VS] error (vdpVideoSurfaceGetBitsYCbCr): not implemented conversion VA FOURCC � -> VDP_YCBCR_FORMAT_YV12
[00007f93300be948] vdpau_chroma filter error: video surface export failure: VDP_STATUS_INVALID_Y_CB_CR_FORMAT
and
[h264 @ 0x7f9314c0ee80] hardware accelerator failed to decode picture
and some more, rarely occurring errors:
[00007f93300c5558] blend blend error: no matching alpha blending routine (chroma: YUVA -> VDV0)
[00007f93300c5558] core blend error: blending YUVA to VDV0 failed
My OS is Ubuntu 14.04.2 LTS and my machine is Acer Travelmate 240/250.
I'm unable to compile libvdpau-va-gl.
adam@acer:~/Other2/libvdpau-va-gl/libvdpau-va-gl-master/build$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/i386-linux-gnu/libX11.so;/usr/lib/i386-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/i386-linux-gnu/libX11.so
-- checking for module 'vdpau'
-- found vdpau, version 0.7
-- checking for module 'glib-2.0'
-- found glib-2.0, version 2.40.2
-- checking for module 'libva-x11'
-- found libva-x11, version 0.35.0
-- checking for module 'libswscale'
-- found libswscale, version 3.1.101
-- checking for modules 'gl;glu'
-- found gl, version 11.0.4
-- found glu, version 9.0.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adam/Other2/libvdpau-va-gl/libvdpau-va-gl-master/build
adam@acer:~/Other2/libvdpau-va-gl/libvdpau-va-gl-master/build$ sudo make installScanning dependencies of target shader-bundle-tool
[ 4%] Building C object glsl/CMakeFiles/shader-bundle-tool.dir/shader-bundle-tool.c.o
Linking C executable shader-bundle-tool
[ 4%] Built target shader-bundle-tool
Scanning dependencies of target shader-bundle-src
[ 9%] Generating shaders.c, shaders.h
[ 9%] Built target shader-bundle-src
Scanning dependencies of target shader-bundle
[ 13%] Building C object glsl/CMakeFiles/shader-bundle.dir/shaders.c.o
Linking C static library libshader-bundle.a
[ 18%] Built target shader-bundle
Scanning dependencies of target vdpau_va_gl_obj
[ 22%] Building C object src/CMakeFiles/vdpau_va_gl_obj.dir/api-bitmap-surface.c.o
[ 27%] Building C object src/CMakeFiles/vdpau_va_gl_obj.dir/api-csc-matrix.c.o
[ 31%] Building C object src/CMakeFiles/vdpau_va_gl_obj.dir/api-device.c.o
[ 36%] Building C object src/CMakeFiles/vdpau_va_gl_obj.dir/api-output-surface.c.o
[ 40%] Building C object src/CMakeFiles/vdpau_va_gl_obj.dir/api-presentation-queue.c.o
[ 45%] Building C object src/CMakeFiles/vdpau_va_gl_obj.dir/api-video-decoder.c.o
/home/adam/Other2/libvdpau-va-gl/libvdpau-va-gl-master/src/api-video-decoder.c: In function ‘vdpDecoderCreate’:
/home/adam/Other2/libvdpau-va-gl/libvdpau-va-gl-master/src/api-video-decoder.c:78:14: error: ‘VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE’ undeclared (first use in this function)
case VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE:
^
/home/adam/Other2/libvdpau-va-gl/libvdpau-va-gl-master/src/api-video-decoder.c:78:14: note: each undeclared identifier is reported only once for each function it appears in
/home/adam/Other2/libvdpau-va-gl/libvdpau-va-gl-master/src/api-video-decoder.c: In function ‘vdpDecoderQueryCapabilities’:
/home/adam/Other2/libvdpau-va-gl/libvdpau-va-gl-master/src/api-video-decoder.c:383:10: error: ‘VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE’ undeclared (first use in this function)
case VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE:
^
/home/adam/Other2/libvdpau-va-gl/libvdpau-va-gl-master/src/api-video-decoder.c: In function ‘vdpDecoderRender’:
/home/adam/Other2/libvdpau-va-gl/libvdpau-va-gl-master/src/api-video-decoder.c:711:33: error: ‘VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE’ undeclared (first use in this function)
if (decoderData->profile == VDP_DECODER_PROFILE_H264_CONSTRAINED_BASELINE ||
^
make[2]: **\* [src/CMakeFiles/vdpau_va_gl_obj.dir/api-video-decoder.c.o] Error 1
make[1]: **\* [src/CMakeFiles/vdpau_va_gl_obj.dir/all] Error 2
make: **\* [all] Error 2
Please, @HenryHu, could you check whenever this code [1] compiles and runs on your machine?
Hi,
Graphic card is intel ironlake mobile. In Ubuntu 13.10 I am able to view Apple trailers with gecko-mediaplayer with vdpau enabled. But in Ubuntu 14.04 I see only a black box where the video should be when vdpau is enabled (while audio is normal). If disable vdpau output and use vx instead in gnome-mplayer then it works.
I have the same version of libdvpau-va-gl in Ubuntu 13.10 and 14.04(3.4.1 installed with webupd8 ppa) and I have tried different versions of mplayer (mplayer, mplayer2 and compiling mplayer from svn), I have also tried upgrading mesa to 10.3 git with the Oibaf ppa, all with same result: always works in 13.10 but always get blackbox in 14.04. It works also in 14.04 if vdpau is disabled
Steps to reproduce:
here is the output:
test-002: https://gist.github.com/Fat-Zer/5845341
test-004: https://gist.github.com/Fat-Zer/5845343
I'm not sure if this is a bug or it's just impossible to make it work under Xvfb.
commit 8bec556 removes libva-glx depend, but build when it is not installed fails:
libvdpau-va-gl-0.3.3/src/api-video-surface.c:19:23: fatal error: va/va_glx.h: No such file or directory
compilation terminated.
$ git grep va/va_glx.h
src/api-video-surface.c:#include <va/va_glx.h>
When building libvdpau-va-gl following error appears:
../libvdpau-va-gl/vdpau-soft.c: In function 'softVdpDecoderQueryCapabilities':
../libvdpau-va-gl/vdpau-soft.c:223:14: error: 'VAProfileH264ConstrainedBaseline' undeclared (first use in this function)
../libvdpau-va-gl/vdpau-soft.c:223:14: note: each undeclared identifier is reported only once for each function it appears in
Happens on Slackware64-14.0.
Is there a fix or is it Slackware related?
Thx
vdpauinfo:
display: :0.0 screen: 0
[VS] Software VDPAU backend library initialized
[VS] error (VdpDeviceCreateX11): gl error 1280
Error creating VDPAU device: 25
VGA compatible controller: Intel Corporation Mobile 945GSE Express Integrated Graphics Controller (rev 03)
Hey!
I got reports of this bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?archive=yes&bug=813370
It's very easy to reproduce with 0.3.4 installed and the provided video file. I have looked a bit at the commits that were added after 0.3.4 but didn't see anything related. I can try with the current HEAD if needed.
VLC users with Intel GPUs have been encountering rapid memory exhaustion when trying to play videos using the VDPAU output driver (which appears to be the default now). Switching to a different driver (e.g. the XVideo one) seems to "fix" this problem.
This has been reported on VLC bug trackers, but their triagers have pointed their fingers at libvdpau-va-gl and have closed their bugs:
I've been encountering this issue on a Intel 965GM on Debian testing (with vlc 2.2.4-2 and libvdpau-va-gl 0.3.6-1).
For what it's worth, here's what my own digging has turned up:
/proc/meminfo
shows that the leaked memory is accounted as Shmem./sys/kernel/debug/dri/*/i915_gem_objects
suggests that the vlc process leaks gem objects at a steady rate equal to the playing video's framerate (playing a 24 fps video leaks 24 objects per second, 30 fps -> 30 objects/second). The leak continues at the same rate even when I pause the video, but it does stop when I freeze vlc with SIGSTOP (Ctrl+z).hi latest cppcheck reported:
[libvdpau-va-gl/glsl/shader-bundle-tool.c:88]: (error) Resource leak: fp_c
[libvdpau-va-gl/tests/test-006.c:37]: (error) Signed integer overflow for expression '4278190080+(k&16777215)'.
[libvdpau-va-gl/src/x-display-ref.hh:35]: (style) Class 'XDisplayRef' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/glx-context.hh:44]: (style) Class 'GLXManagedContext' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/bitstream.hh:129]: (style) Class 'RBSPState' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/bitstream.hh:45]: (style) Class 'error' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/bitstream.hh:55]: (style) Class 'ByteReader' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/api-video-surface.cc:47]: (warning) Member variable 'Resource::rt_idx' is not initialized in the constructor.
[libvdpau-va-gl/tests/conv-speed.c:23]: (style) Unused variable: get_proc_address
[libvdpau-va-gl/tests/test-006.c:37]: (style) Variable 'buf' is assigned a value that is never used.
[libvdpau-va-gl/src/trace.cc:33]: (style) The function 'traceInfo' is never used.
[libvdpau-va-gl/src/entry.cc:98]: (style) The function 'vdp_imp_device_create_x11' is never used.
[libvdpau-va-gl/src/api-video-surface.cc:309]: (style) The function 'video_surface_ensure_allocated' is never used.
There is something wrong with VA surface to GL texture conversion. It works with Mesa 9.2, but results in black screen (or stroboscope like flashes) with Mesa 10.1.
Hi there,
first, thank you very much for this great software :-) I run it on Ubuntu 13.10 (Saucy) on an Intel HD 2500. Flash videos run smoothly and stable now most time. Great! However I get a system freeze on some videos. It happened always watching the following video at 1:42 :
http://www.youtube.com/watch?v=x6gPODb2TFc
Or on this videos at ~ 14:15
http://www.youtube.com/watch?v=G8cJDQ77-V8
There were some (few) more videos with this error, but can't remember which. First I thought it was an random error, but this videos always crash at the same point. First the video freezes, than a few seconds later the sound. Then nothing works, the mouse pointer and keyboard doesn't respond anymore. No hotkeys nor Ctrl+Alt+F1-8. Just an hard reset will bring back the computer. The error doesn't occur if I disable the hardware-video-accleration in Flash. I'm not an expert, but can I help somehow solving this issue? I would be satisfied if only Flash/Firefox would crash, not the whole system ;-)
I already updated the intel graphics driver (01.org, xorg-edgers and now ppa of oibaf), various libva*-packages (1.2.1-2/1.2.2-2) and libvdpau-va-gl is from webupd8 (0.3.3-1). I change from "sna" to "uxa"-acceleration (xorg-config) which didn't bring any difference.
I can't see any errors in the system-log (however i'm not an expert at this). So how I provide some help/information for this bug? Or any clue how to prevent the crashes? Thanks in advance!
Best regards,
Chris
opensuse 13.1 x86_64
vlc 2.2.2
libvdpau-va-gl1 0.3.6
Mesa 11.1
Xorg X11 7.6 (no sure where to find the version)
Asus 24 " screen
vlc pref > input/codecs > hardware decoding = automatic
vlc launch vdpau then no image
see vainfo, vdpauinfo and vlc log
vlc.txt
vainfo.txt
vdpauinfo.txt
vlc pref > input/codecs > hardware decoding = VA-API via X11
video is displayed but no full screen , you can't change the image ratio
if i uninstall libvdpau-va-gl then no more pb
Often after I've found an interesting video on youtube.com I pause the video in the browser, copy the url and use mpv to watch it. This worked well until recently I tried your freshplayerplugin. After trying it I went back to my previous setup (flash 11 + libvdpau-va-gl) since I'm not getting automatic updates for pepperflash on my distro. I'm not sure if this is related to my test with freshplayerplugin but now every time when I'm starting mpv (which also uses vaapi) I'm getting a GPU HANG and a segfault in libflashplayer.so. Here is some data:
When I pause a video on youtube.com I'm getting this VDPAU_LOG:
[VS] {full} VdpOutputSurfaceRenderBitmapSurface destination_surface=4, destination_rect=(0,0,854,510),
source_surface=6, source_rect=(0,0,854,510)
blend_state.blend_factor_source_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
blend_state.blend_factor_source_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
blend_state.blend_equation_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_state.blend_equation_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_constant = ( 0,000000, 0,000000, 0,000000, 0,000000)
flags = VDP_OUTPUT_SURFACE_RENDER_ROTATE_0
colors=[]
[VS] {full} VdpPresentationQueueDisplay presentation_queue=3, surface=4, clip_width=0, clip_height=0,
earliest_presentation_time=0
[VS] {full} VdpPresentationQueueBlockUntilSurfaceIdle presentation_queue=3, surface=5
[VS] {full} VdpOutputSurfaceRenderOutputSurface destination_surface=5, destination_rect=(0,0,854,480),
source_surface=7, source_rect=(0,0,854,480)
blend_state.blend_factor_source_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO
blend_state.blend_factor_source_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO
blend_state.blend_equation_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_state.blend_equation_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_constant = ( 0,000000, 0,000000, 0,000000, 0,000000)
flags = VDP_OUTPUT_SURFACE_RENDER_ROTATE_0
colors=[]
[VS] {full} VdpOutputSurfaceRenderBitmapSurface destination_surface=5, destination_rect=(0,0,854,510),
source_surface=6, source_rect=(0,0,854,510)
blend_state.blend_factor_source_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
blend_state.blend_factor_source_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
blend_state.blend_equation_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_state.blend_equation_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_constant = ( 0,000000, 0,000000, 0,000000, 0,000000)
flags = VDP_OUTPUT_SURFACE_RENDER_ROTATE_0
colors=[]
[VS] {full} VdpPresentationQueueDisplay presentation_queue=3, surface=5, clip_width=0, clip_height=0,
earliest_presentation_time=0
[VS] {full} VdpPresentationQueueBlockUntilSurfaceIdle presentation_queue=3, surface=4
[VS] {full} VdpOutputSurfaceRenderOutputSurface destination_surface=4, destination_rect=(0,0,854,480),
source_surface=7, source_rect=(0,0,854,480)
blend_state.blend_factor_source_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO
blend_state.blend_factor_source_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ZERO
blend_state.blend_equation_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_state.blend_equation_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_constant = ( 0,000000, 0,000000, 0,000000, 0,000000)
flags = VDP_OUTPUT_SURFACE_RENDER_ROTATE_0
colors=[]
This sequence repeats for ever.
Then I start mpv and I'm getting this:
.
.
.
[VS] {full} VdpOutputSurfaceRenderBitmapSurface destination_surface=5, destination_rect=(0,0,854,510),
source_surface=6, source_rect=(0,0,854,510)
blend_state.blend_factor_source_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
blend_state.blend_factor_source_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE
blend_state.blend_factor_destination_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
blend_state.blend_equation_color=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_state.blend_equation_alpha=VDP_OUTPUT_SURFACE_RENDER_BLEND_EQUATION_ADD
blend_constant = ( 0,000000, 0,000000, 0,000000, 0,000000)
flags = VDP_OUTPUT_SURFACE_RENDER_ROTATE_0
colors=[]
intel_do_flush_locked failed: input/output error
###!!! [Parent][MessageChannel::Call] Error: Channel error: cannot send/recv
dmesg:
[25870.342018] [drm] stuck on render ring
[25870.346229] [drm] GPU HANG: ecode 5:0:0x9ffdffff, in plugin-containe [12310], reason: Ring hung, action: reset
[25870.346334] [drm:i915_set_reset_status [i915]] *ERROR* gpu hanging too fast, banning!
[25870.358712] drm/i915: Resetting chip after gpu hang
[25870.372973] plugin-containe[12326]: segfault at 7fa59d3586fb ip 00007fa5ad0f32e0 sp 00007fa59bffcb30 error 4 in libflashplayer.so[7fa5acf13000+1189000]
Any ideas?
flash player seems to crash alot when using newest firefox (version 30.0)
steps to reproduce:
launch some(play it) video in tab
launch 2nd video in the new tab
and here on my machine it crashes instantly
im using newest libvdpau-va-gl on ubuntu 14.04 x86-64
heres the console output from firefox running
[VS] Software VDPAU backend library initialized
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
libva info: VA-API version 0.35.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
[VS] warning (vdpDeviceDestroy): non-zero reference count (12). Trying to free child objects.
###!!! [Parent][MessageChannel::InterruptCall] Error: Channel error: cannot send/recv
###!!! [Parent][MessageChannel::Call] Error: Channel error: cannot send/recv
###!!! [Parent][MessageChannel::Call] Error: Channel error: cannot send/recv
###!!! [Parent][MessageChannel::Call] Error: Channel error: cannot send/recv
###!!! [Parent][MessageChannel::Call] Error: Channel error: cannot send/recv
###!!! [Parent][MessageChannel::Call] Error: Channel error: cannot send/recv
###!!! [Parent][MessageChannel::Call] Error: Channel error: cannot send/recv
During the RPMFusion review for libvdpau-va-gl we discussed ways to enable this by default for people who have the hardware. We'd like to move that discussion upstream.
Doing it in the intel driver seems to have been rejected, and you seemed to think patching vdpau wouldn't fly either. Is there another way this could be done properly?
Alternatively, maybe an /etc/profile.d hack to set VDPAU_DRIVER
could be considered in the interim? Is there a decent way to detect if compatible hardware is in use other than checking if the kernel module is loaded?
Also Nicolas mentioned optimus hardware as a potential issue also. If we decided to hack the environment variable in we'd probably want to see about patching optirun
to drop it as well.
Thanks for any suggestions!
Flash is very slow, choppy and unstable after commit 3fa6d6a (move presentation queue display to another thread).
[VS] error (softVdpVideoSurfaceGetBitsYCbCr): not implemented conversion VA FOURCC � -> VDP_YCBCR_FORMAT_NV12
[VS] error (softVdpVideoSurfaceGetBitsYCbCr): not implemented conversion VA FOURCC � -> VDP_YCBCR_FORMAT_NV12
[VS] error (softVdpVideoSurfaceGetBitsYCbCr): not implemented conversion VA FOURCC � -> VDP_YCBCR_FORMAT_NV12
[VS] error (softVdpVideoSurfaceGetBitsYCbCr): not implemented conversion VA FOURCC � -> VDP_YCBCR_FORMAT_NV12
[VS] error (softVdpVideoSurfaceGetBitsYCbCr): not implemented conversion VA FOURCC -> VDP_YCBCR_FORMAT_NV12
[VS] warning (softVdpDeviceDestroy): non-zero reference count (14). Trying to free child objects.
although the stream play and render under hw accelerate fine, just be curious if this is harmless?
libvdpau-va-gl-0.4.0 fails to build with clang with the following error:
/home/armin/src/libvdpau-va-gl-0.4.0/src/api-device.cc:60:14: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
The fix for this is to add #include <string>
to the mentioned file.
This is a Gentoo system with all listed dependencies installed, please let me know if there is something i missed:
[ 68%] Building C object src/CMakeFiles/vdpau_va_gl_obj.dir/reverse-constant.c.o
cd /var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4_build/src && /usr/bin/x86_64-pc-linux-gnu-gcc -DNDEBUG -march=core-avx-i -O2 -pipe -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libdrm -I/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4_build -I/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src -I/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4_build/glsl -std=gnu99 -Wall -fvisibility=hidden -fPIC -o CMakeFiles/vdpau_va_gl_obj.dir/reverse-constant.c.o -c /var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src/reverse-constant.c
/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src/api-video-surface.c: In function ‘vdpau_ycbcr_to_av_pixfmt’:
/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src/api-video-surface.c:302:44: error: ‘AV_PIX_FMT_NV12’ undeclared (first use in this function)
/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src/api-video-surface.c:302:44: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src/api-video-surface.c:303:44: error: ‘AV_PIX_FMT_YUV420P’ undeclared (first use in this function)
/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src/api-video-surface.c:304:44: error: ‘AV_PIX_FMT_UYVY422’ undeclared (first use in this function)
/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src/api-video-surface.c:305:44: error: ‘AV_PIX_FMT_YUYV422’ undeclared (first use in this function)
/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4/src/api-video-surface.c:306:44: error: ‘AV_PIX_FMT_NONE’ undeclared (first use in this function)
make[2]: *** [src/CMakeFiles/vdpau_va_gl_obj.dir/api-video-surface.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4_build'
make[1]: *** [src/CMakeFiles/vdpau_va_gl_obj.dir/all] Error 2
make[1]: Leaving directory `/var/tmp/portage/x11-libs/libvdpau-va-gl-0.3.4/work/libvdpau-va-gl-0.3.4_build'
make: *** [all] Error 2
libvdpau-va-gl 0.1.0-2webupd8saucy
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_34
libva info: va_openDriver() returns 0
/chrome/chrome --type=plugin --plugin-path=/usr/lib/flashplugin-installer/libflashplayer.so --lang=de --channel=23916.14769.13447061: gen6_mfd.c:545: gen6_mfd_avc_slice_state: Zusicherung »slice_param->num_ref_idx_l1_active_minus1 == 0« nicht erfüllt.
works for most flash videos but crashes on this
http://tvthek.orf.at/programs/3118485-Wiener-Vorlesungen/episodes/6605207-Wiener-Vorlesungen
Fedora 19 x64.
Usually when I compile and install this it gets added under
/usr/local/
Which is fine, its a self-compiled app, understandable. This time though I set
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.