Opened 3 months ago

#10715 new defect

QSV decoder fails to get configured and issues Error initializing the MFX video decoder: unsupported (-3)

Reported by: tipoman Owned by:
Priority: normal Component: ffmpeg
Version: unspecified Keywords: ffmpeg, qsv, intel, hevc, hardware decoding
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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 ?

Change History (0)

Note: See TracTickets for help on using tickets.