0

How do I use ffmpeg on Windows using Intel Quick Sync Video (qsv) to encode a video in VP9? The command that I am using now is:

ffmpeg.exe -init_hw_device qsv=hw -filter_hw_device hw -i input.mkv -vf hwupload=extra_hw_frames=64,format=qsv -c:v vp9_qsv -b:v 10M -maxrate 10M -preset veryslow output.mkv

Which produces the following error message:enter image description here

I must be quite close because if I use the same command but hevc_qsv instead of vp9_qsv it runs and gives the expected outcome. So what am I doing wrong?

I am using Windows 11 Pro and an 11th Gen Intel i5-1145G7 CPU, which is Tiger Lake and should support vp9_qsv according to this support table.

Bazzz
  • 167
  • 2
  • 10
  • Are you trying to encode and decode VP9? Try encoding only: `ffmpeg.exe -i input.mkv -c:v vp9_qsv output.mkv`. In case it's not working, try updating Intel HD Graphics Driver. – Rotem Jul 22 '22 at 21:34
  • @Rotem it is encoding only. Your suggested command is how I started but then it complains about needing to open a hardware device. I am fairly sure my command as posted is the right approach because it works for `h264_qsv` and for `hevc_qsv`, which are family members of `vp9_qsv` and have the same interface. Updating the GPU drivers is worth a shot. Just for the record, this is not Intel HD graphics, but Xe graphics. – Bazzz Jul 23 '22 at 06:59
  • My CPU doesn't support VP9 encoding, so I can't test it. The following command `ffmpeg.exe -y -i input.mkv -c:v h264_qsv output.mkv` is working. When I add `hwupload=extra_hw_frames=64,format=qsv` there is an error (without `-init_hw_device`). When adding `-b:v 10M -maxrate 10M`, FFmpeg halts... You may try the latest stable (static build) from [gyan.dev](https://www.gyan.dev/ffmpeg/builds/) and from [BtbN](https://github.com/BtbN/FFmpeg-Builds/releases). I had a case when one worked and the other didn't. – Rotem Jul 23 '22 at 08:20

1 Answers1

0

Intel's QSV VP9 encoder wrapper implementation in FFmpeg is only supported on Linux at the moment. See this commit for more details, specifically because VP9 encoding is tied to the low-power mode(s) exposed by the iHD driver's VDENC interface(s).

Dennis Mungai
  • 3,074
  • 1
  • 22
  • 33