Comments (15)
Current versions of VLC don't have the issue. "Fixing" commit was videolan/vlc@c61b433#diff-4e89dea6d2b66dcaac6f076da940fba2L400. Note, they started to compare surfaces geometry with coded width and height from AVCodecContext
structure.
Newer VLC versions started to use another bit of VDPAU, so I've added required mockup code in e10ef7a. It doesn't work they way it should work, but should be fine anyway.
from libvdpau-va-gl.
Hi.
There is noticeable artifacts in video at about 00:00:01
, perhaps video stream is broken. I've tried to play it though vaapi path in mpv
and also through vdpau path with help of libvdpau-va-gl
on both mplayer
and mpv
. And all those were fine, without lockups or error messages. It could be hardware dependent. I tested on Intel HD 4000 (embedded graphics in i7-3632qm processor).
Could you check on your hardware how
mpv --hwdec=vaapi --vo=gl big_buck_bunny_480p_H264_AAC_25fps_1800K_short.MP4
works, please?
from libvdpau-va-gl.
Your command works fine for me:
mpv --hwdec=vaapi --vo=gl big_buck_bunny_480p_H264_AAC_25fps_1800K_short.MP4
Driver 'gl' has been replaced with 'opengl'!
Playing: big_buck_bunny_480p_H264_AAC_25fps_1800K_short.MP4
(+) Video --vid=1 (*) (h264)
(+) Audio --aid=1 --alang=und (*) (aac)
File tags:
Artist: created with SUPER(C).v2011.bld.49
Comment: 14:06:42
Title: big_buck_bunny_480p_surround-fix.avi_041.AVI.MP4
libva info: VA-API version 0.38.1
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_38
libva info: va_openDriver() returns 0
AO: [pulse] 44100Hz stereo 2ch float
Using hardware decoding (vaapi).
VO: [opengl] 854x480 vaapi
AV: 00:00:01 / 00:00:04 (27%) A-V: 0.000
from libvdpau-va-gl.
Then it's a bug in libvdpau-va-gl indeed. I'll try to dig further.
from libvdpau-va-gl.
Oh, I've tried VLC (2.2.2-3+b1, Debian testing), and now can see the same bug. Now there are higher chances to find out what's happening.
from libvdpau-va-gl.
Just to be sure. Does
mpv --hwdec=vdpau --vo=vdpau big_buck_bunny_480p_H264_AAC_25fps_1800K_short.MP4
show video?
from libvdpau-va-gl.
Yes, it works too. So, this may be a bug in VLC?
from libvdpau-va-gl.
Looks like there is an issue in VLC code.
Here is trace output from vlc big_buck_bunny_480p_H264_AAC_25fps_1800K_short.MP4
:
VLC media player 2.2.2 Weatherwax (revision 2.2.2-0-g6259d80)
[000000000198bdf8] pulse audio output error: PulseAudio server connection failure: Connection refused
[00000000018b3388] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[VS] Software VDPAU backend library initialized
[VS] {full} vdp_imp_device_create_x11 display=0x7f59b404aee0, screen=0
libva info: VA-API version 0.38.1
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_38
libva info: va_openDriver() returns 0
[VS] libva (version 0.38) library initialized
[VS] {part} VdpVideoSurfaceQueryCapabilities device=1, surface_chroma_type=VDP_CHROMA_TYPE_420
[VS] {part} VdpDecoderQueryCapabilities device=1, profile=VDP_DECODER_PROFILE_H264_MAIN
[VS] {full} VdpGetInformationString
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=854, height=480
[VS] {full} VdpDecoderCreate device=1, profile=VDP_DECODER_PROFILE_H264_MAIN, width=854, height=480, max_references=16
[00007f59d4c08d88] avcodec decoder: Using OpenGL/VAAPI/libswscale backend for VDPAU for hardware decoding.
[VS] {full} VdpDecoderDestroy decoder=23
[VS] {full} VdpVideoSurfaceDestroy surface=2
[VS] {full} VdpVideoSurfaceDestroy surface=3
[VS] {full} VdpVideoSurfaceDestroy surface=4
[VS] {full} VdpVideoSurfaceDestroy surface=5
[VS] {full} VdpVideoSurfaceDestroy surface=6
[VS] {full} VdpVideoSurfaceDestroy surface=7
[VS] {full} VdpVideoSurfaceDestroy surface=8
[VS] {full} VdpVideoSurfaceDestroy surface=9
[VS] {full} VdpVideoSurfaceDestroy surface=10
[VS] {full} VdpVideoSurfaceDestroy surface=11
[VS] {full} VdpVideoSurfaceDestroy surface=12
[VS] {full} VdpVideoSurfaceDestroy surface=13
[VS] {full} VdpVideoSurfaceDestroy surface=14
[VS] {full} VdpVideoSurfaceDestroy surface=15
[VS] {full} VdpVideoSurfaceDestroy surface=16
[VS] {full} VdpVideoSurfaceDestroy surface=17
[VS] {full} VdpVideoSurfaceDestroy surface=18
[VS] {full} VdpVideoSurfaceDestroy surface=19
[VS] {full} VdpVideoSurfaceDestroy surface=20
[VS] {full} VdpVideoSurfaceDestroy surface=21
[VS] {full} VdpVideoSurfaceDestroy surface=22
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {part} VdpVideoSurfaceCreate, device=1, chroma_type=VDP_CHROMA_TYPE_420, width=864, height=480
[VS] {full} VdpDecoderCreate device=1, profile=VDP_DECODER_PROFILE_H264_MAIN, width=864, height=480, max_references=16
[VS] {part} VdpDecoderRender decoder=23, target=24, picture_info=0x7f59b4f7a8c0, bitstream_buffer_count=2
[h264 @ 0x7f59d4c2a0e0] hardware accelerator failed to decode picture
[VS] {part} VdpDecoderRender decoder=23, target=25, picture_info=0x7f59b0045e80, bitstream_buffer_count=2
[h264 @ 0x7f59d4cb6740] hardware accelerator failed to decode picture
[VS] {part} VdpDecoderRender decoder=23, target=26, picture_info=0x7f59a8047920, bitstream_buffer_count=2
[h264 @ 0x7f59d4cfdea0] hardware accelerator failed to decode picture
[VS] {part} VdpDecoderRender decoder=23, target=27, picture_info=0x7f59ac048bc0, bitstream_buffer_count=2
[h264 @ 0x7f59d4d456c0] hardware accelerator failed to decode picture
So, VLC creates video surfaces, then creates decoder, then destroys decoder (id=23), then creates a new set of video surfaces and a new decoder. And then tries to use recently deleted decoder with id 23.
Here is what happens. In VLC 2.2.2 code, in the file /modules/hw/vdpau/avcodec.c
there is a function Setup()
, which is called at least twice. Once at initial setup, and next time for a frame decoded. First time it gets video size 854x480
. Second time it gets actual frame size 864x480
(decoded frame is later cropped to get 854x480
). Function detect size change, destroys decoder and creates new. But changing value of sys->context->decoder
is not enough, libavcodec could save decoder resource identifier and use it later. Which, probably, the case.
It could be that previous versions of libavcodec allowed such change, but current version doesn't.
from libvdpau-va-gl.
Great that you found the source. Would you like me to report the bugs to VLC devs?
from libvdpau-va-gl.
I don't see similar code in VLC's master branch. Most probably they've fixed it already. But on the other hand that version tries to use VDPAU part which is not implemented in libvdpau-va-gl, so I can't be sure.
from libvdpau-va-gl.
I have asked one of VLC dev to have a look.
from libvdpau-va-gl.
Also found that mpv
tries Constrained Baseline profile, and falls back to software decoding if profile is not available. 8c26e71 fixes that.
from libvdpau-va-gl.
Thanks! A release in the next weeks would be welcome (otherwise, I will use a git snapshot).
from libvdpau-va-gl.
Here it is: https://github.com/i-rinat/libvdpau-va-gl/releases/tag/v0.3.6
from libvdpau-va-gl.
Thanks, I did upload this new version in Debian. Let's hope they do a VLC release soon. I close this issue.
from libvdpau-va-gl.
Related Issues (20)
- cmake issue HOT 5
- Segmentation fault in dri2_unbind_context HOT 5
- Change license to MIT (expat) HOT 7
- Wrong scaling in fullscreen VLC (was: Problems playing videos in VLC) HOT 24
- Vlc using vdpau, no decoding HOT 6
- Unable to compile HOT 12
- cppcheck errors HOT 3
- Build failure with clang/libc++ on Linux HOT 2
- GPU memory leak in VLC on Intel HOT 4
- Archlinux integration !
- When playing .webm files with video-output default (VDPAU) VLC ends up consuming a lot of RAM (using lib64vdpau-va-gl1-0.4.0-1.mga6 on Intel Graphics) HOT 5
- VLC with "--vout vdpau" won't play the video of a certain .mp4 file (generates an error) HOT 11
- flash video freezes the whole system HOT 3
- VLC's memory consumption steadily increases after switching to next videos HOT 4
- Some videos cause complete system hang with 0.4.0 HOT 7
- Create lists of supported hardware and software. HOT 2
- Discrepancy in decoder capabilities reported by `vainfo` and `vdpauinfo` wrt Kabylake. HOT 1
- vdpauinfo crash with VDPAU_DRIVER=va_gl on nouveau drivers HOT 1
- hardware accelerator failed to decode picture HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libvdpau-va-gl.