[FFmpeg-user] Green line with vaapi scaling
Mark Thompson
sw at jkqxz.net
Sun Jun 17 23:32:41 EEST 2018
On 13/06/18 21:00, André Hänsel wrote:
>> Can you retest with git head?
>>
>> Build FFmpeg from source and retest.
>
> I don't think I can do that easily, but I found a static build on the FFmpeg website. It's supposed to support VAAPI:
>
> # ./ffmpeg -hwaccels
>
> ffmpeg version N-46272-g3a56ade1f-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers
> built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
> configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
> libavutil 56. 18.102 / 56. 18.102
> libavcodec 58. 20.100 / 58. 20.100
> libavformat 58. 17.100 / 58. 17.100
> libavdevice 58. 4.100 / 58. 4.100
> libavfilter 7. 25.100 / 7. 25.100
> libswscale 5. 2.100 / 5. 2.100
> libswresample 3. 2.100 / 3. 2.100
> libpostproc 55. 2.100 / 55. 2.100
> Hardware acceleration methods:
> vdpau
> vaapi
>
>
> However, when I try this command:
>
> # ./ffmpeg -loglevel trace -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -i bbb.mp4 out.mp4
>
> ffmpeg version N-46272-g3a56ade1f-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2018 the FFmpeg developers
> built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
> configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
> libavutil 56. 18.102 / 56. 18.102
> libavcodec 58. 20.100 / 58. 20.100
> libavformat 58. 17.100 / 58. 17.100
> libavdevice 58. 4.100 / 58. 4.100
> libavfilter 7. 25.100 / 7. 25.100
> libswscale 5. 2.100 / 5. 2.100
> libswresample 3. 2.100 / 3. 2.100
> libpostproc 55. 2.100 / 55. 2.100
> Splitting the commandline.
> Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'trace'.
> Reading option '-vaapi_device' ... matched as option 'vaapi_device' (set VAAPI hardware device (DRM path or X11 display name)) with argument '/dev/dri/renderD128'.
> Reading option '-hwaccel' ... matched as option 'hwaccel' (use HW accelerated decoding) with argument 'vaapi'.
> Reading option '-i' ... matched as input url with argument 'bbb.mp4'.
> Reading option 'out.mp4' ... matched as output url.
> Finished splitting the commandline.
> Parsing a group of options: global .
> Applying option loglevel (set logging level) with argument trace.
> Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128.
> [AVHWDeviceContext @ 0x6189cc0] No VA display found for device: /dev/dri/renderD128.
> Device creation failed: -22.
> Failed to set value '/dev/dri/renderD128' for option 'vaapi_device': Invalid argument
> Error parsing global options: Invalid argument
>
>
> According to strace it doesn't even try to open the device.
libva generally depends on the dynamic linker to work - it loads the driver at runtime.
It looks like this is built with CONFIG_VAAPI but not HAVE_VAAPI_X11 or HAVE_VAAPI_DRM, and then statically linked with libva. That's not going to be able to get a VAAPI device or load a driver, so it won't work - see <http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavutil/hwcontext_vaapi.c#l1437>. (A library built in this way could work with external support for the loading, but given a static executable there is no way to do this.)
- Mark
More information about the ffmpeg-user
mailing list