[FFmpeg-user] hwaccel vaapi and "No VA display found for device"
sw at jkqxz.net
Wed Nov 23 12:00:25 EET 2016
On 23/11/16 03:09, desktop ready wrote:
> I would like to confirm a bug/problem before submitting a bug report.
> I am working on Debian Jessie/Stable amd64 on an Intel Skylake i3-6320
> and would like to decode an HEVC 8-bit encoded UHD movie.
> With a fresh ffmpeg github checkout I am able to use the following
> command without errors:
> ffmpeg -hwaccel vaapi -i castle.mp4 -f null -
> However with ffmpeg release 3.2, I have the following errors:
> [AVHWDeviceContext @ 0x7fdcf83adba0] No VA display found for device: .
> [vaapi @ 0x30a61e0] Failed to create a VAAPI device
> vaapi hwaccel requested for input stream #0:0, but cannot be
> [hevc @ 0x52bad20] Error parsing NAL unit #0.
The device selection for VAAPI works as follows, stopping at the first usable device it finds:
1) If the user passed a device name, try to open that name an X11 display.
2) If they didn't, try to open the default X11 display (i.e. $DISPLAY).
3) If the user passed a device name, try to open that name as the path to a DRM device.
4) If they didn't, try to open /dev/dri/renderD128 as a DRM device.
Step 4 was added after the release of ffmpeg 3.2, so you only get steps 1-3 there. Since you didn't pass a device name and (presumably) aren't running X, it doesn't manage to open anything.
In general, you always want to give it a device name; the implicit selection may be right in some cases but it's better not to rely on it.
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i castle.mp4 -f null -
> However what is strange is that the ffmpeg version 3.2.2 on Debian
> Jessie Backports also works without error (but with a high CPU
> workload, which may indicate that hwaccel is not working as expected).
> Ouput of ls -al /dev/dri:
> ls -al /dev/dri
> total 0
> drwxr-xr-x 2 root root 100 nov. 23 00:40 .
> drwxr-xr-x 19 root root 3520 nov. 23 03:59 ..
> crw-rw----+ 1 root video 226, 0 nov. 23 03:19 card0
> crw-rw---- 1 root video 226, 64 nov. 23 00:40 controlD64
> crw-rw----+ 1 root video 226, 128 nov. 23 00:40 renderD128
> Is hwaccel vaapi working or not working on ffmpeg 3.2 to decode HEVC
> 8-bit encoded media ?
More information about the ffmpeg-user