Estou executando este comando:
ffmpeg -init_hw_device qsv=hw -filter_hw_device -f rawvideo -pix_fmt yuv420p -s:v 2560x1440 -i normal-desktop-use-1440p.mkv -c:v h264_qsv -
b:v 5M output.mp4
Estou tendo o erro a seguir:
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'qsv=hw'.
Reading option '-filter_hw_device' ... matched as option 'filter_hw_device' (set hardware device used when filtering) with argument 'hw'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'rawvideo'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'.
Reading option '-s:v' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '2560x1440'.
Reading option '-i' ... matched as input url with argument 'normal-desktop-use-1440p.mkv'.
Reading option '-vf' ... matched as option 'vf' (set video filters) with argument '-c:v'.
Reading option 'h264_qsv' ... matched as output url.
Reading option '-b:v' ... matched as option 'b' (video bitrate (please use -b:v)) with argument '15M'.
Reading option '-framerate' ... matched as AVOption 'framerate' with argument '30'.
Reading option 'output.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument qsv=hw.
[AVHWDeviceContext @ 0x556f744cf5c0] Cannot open X11 display .
[AVHWDeviceContext @ 0x556f744cf5c0] Opened VA display via DRM device /dev/dri/renderD128.
[AVHWDeviceContext @ 0x556f744cf5c0] libva: VA-API version 1.1.0
[AVHWDeviceContext @ 0x556f744cf5c0] libva: va_getDriverName() returns 0
[AVHWDeviceContext @ 0x556f744cf5c0] libva: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
[AVHWDeviceContext @ 0x556f744cf5c0] libva: Found init function __vaDriverInit_1_1
[AVHWDeviceContext @ 0x556f744cf5c0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x556f744cf5c0] Initialised VAAPI connection: version 1.1
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x48323234 -> yuv422p.
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x556f744cf5c0] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x556f744cf5c0] VAAPI driver: Intel i965 driver for Intel(R) Skylake - 2.1.0.
[AVHWDeviceContext @ 0x556f744cf5c0] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x556f744cf140] Error initializing an MFX session: -3.
Device creation failed: -1313558101.
Failed to set value 'qsv=hw' for option 'init_hw_device': Unknown error occurred
Error parsing global options: Unknown error occurred
Eu esperava que o ffmpeg codificasse meu vídeo usando um codificador h264 acelerado por hw via Intel QuickSync.
Informações úteis sobre minha compilação ffmpeg:
ffmpeg version N-93636-g6829c3c Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-27ubuntu1~18.04)
configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libmfx --enable-nonfree
--enable-libmfx
habilitei .
Usando este processador:model name : Intel(R) Xeon(R) CPU E3-1578L v5 @ 2.00GHz
Se eu fizer ffmpeg -encoders | grep qsv
isso, recebo o seguinte:
V..... h264_qsv H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
V..... hevc_qsv HEVC (Intel Quick Sync Video acceleration) (codec hevc)
V..... mjpeg_qsv MJPEG (Intel Quick Sync Video acceleration) (codec mjpeg)
V..... mpeg2_qsv MPEG-2 video (Intel Quick Sync Video acceleration) (codec mpeg2video)