[FFmpeg-trac] #10715(ffmpeg:new): QSV decoder fails to get configured and issues Error initializing the MFX video decoder: unsupported (-3)

FFmpeg trac at avcodec.org
Sat Dec 2 16:29:36 EET 2023


#10715: QSV decoder fails to get configured and issues Error initializing the MFX
video decoder: unsupported (-3)
-------------------------------------+-------------------------------------
             Reporter:  tipoman      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:
             Keywords:  ffmpeg ,     |  unspecified
  qsv, intel, hevc , hardware        |               Blocked By:
  decoding                           |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I have a RTSP server streaming h265(HEVC) video.

 I can play the video with Intel HW acceleration like this:

 {{{
 ffplay -loglevel info  -vcodec hevc_qsv -rtsp_transport tcp -i
 rtsp://192.168.1.88
 }}}

 This uses two-way data RTP+RTCP exchange via additional UDP port.
 I need to be able to play the video by only receiving the RTP stream.
 I disabled incoming traffic on the server, made the server stream the
 video to the client IP on UDP port 5600.
 By looking at the messages log I sniffed the SDP info and saved it to a
 file named 60.sdp
 Added  a=rtcp-mux option and was able to successfully see the video with
 this pipeline:

 {{{
 ffmpeg -loglevel trace -protocol_whitelist udp,file,hevc,rtp,crypto -i
 ~/Videos/60.sdp -vcodec rawvideo -f matroska - | ffplay -i -
 }}}

 **60.sdp file**

 {{{
 v=0
 o=StreamingServer 38990265062388 38990265062388 IN IP4 0.0.0.0
 s=RTSP Session
 c=IN IP4 127.0.0.1
 t=0 0
 a=range:npt=0-
 m=video 5600 RTP/AVP 97
 a=control:video
 a=rtpmap:97 H265/90000
 a=fmtp:97 profile-level-id=016000; packetization-mode=1;
 a=framerate:60
 a=recvonly
 a=rtcp-mux
 }}}

 So far everything worked as expected.

 Then I added the HW acceleration option like this:

 {{{
 ffmpeg -hide_banner -loglevel trace -vcodec hevc_qsv -protocol_whitelist
 udp,file,hevc,rtp,crypto -i ~/Videos/60.sdp -vcodec rawvideo -f matroska -
 | ffplay -hide_banner -i -
 }}}

 and got this error:

 {{{
 [AVHWDeviceContext @ 0x5555b8020ac0] VAAPI driver: Intel iHD driver for
 Intel(R) Gen Graphics - 23.3.2 ().
 [AVHWDeviceContext @ 0x5555b8020ac0] Driver not found in known nonstandard
 list, using standard behaviour.
 [hevc_qsv @ 0x5555b7fe5500] Initialized an internal MFX session using
 hardware accelerated implementation
 [hevc_qsv @ 0x5555b7fe5500] Error initializing the MFX video decoder:
 unsupported (-3)
 Error while decoding stream #0:0: Function not implemented

 }}}

 Just to confirm, I'm able to play the same video stream on the local UDP
 port  with hardware acceleration with GStreamer like this :

 {{{
 gst-launch-1.0 udpsrc port=5600 buffer-size=65536 caps="application/x-rtp,
 media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265" !
 rtph265depay ! queue max-size-buffers=1 ! vaapih265dec ! autovideosink
 sync=false

 }}}
 Some details on the system.
 {{{
 i3-1215u, Ubuntu 22.04.3
 vainfo
 Trying display: wayland
 Trying display: x11
 libva info: VA-API version 1.19.0
 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
 libva info: Found init function __vaDriverInit_1_19
 libva info: va_openDriver() returns 0
 vainfo: VA-API version: 1.19 (libva 2.19.0)
 vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics -
 23.3.2 ()

 ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg
 developers

 }}}

 Seems there is some problem of configuring the Intel QSV decoder from the
 ffmpeg pipeline.
 I think SPS/PPS/VPS settings are not set, but I can not be sure.
 Am I missing something or this is an issue in libavcodec/qsvdec.c ?
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10715>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list