CESNET / UltraGrid

UltraGrid low-latency audio and video network transmission system
http://www.ultragrid.cz
Other
489 stars 55 forks source link

QSV decoder fail #271

Closed alatteri closed 1 year ago

alatteri commented 1 year ago

Encoder stream: UltraGrid.AppImage --tool uv -m 1316 -t decklink:device=0 -c libavcodec:encoder=libsvt_hevc:qp=22 -s embedded --audio-capture-format channels=8 --audio-codec=AAC:bitrate=256K 10.55.118.60

Ubuntu 22.04 Desktop, GUI logged in as administrator and added to the render group

Receiver:

uv -d decklink --param force-lavd-decoder=hevc_qsv
UltraGrid 1.7+ (tags/continuous rev dd5fda2 built Dec  3 2022 17:57:33)

Display device   : decklink
Capture device   : none
Audio capture    : none
Audio playback   : none
MTU              : 9000 B
Video compression: none
Audio codec      : PCM
Network protocol : UltraGrid RTP
Audio FEC        : none
Video FEC        : none

[Decklink display] Card number unset, using first found (see -d decklink:help)!
[Decklink display] Using low-latency mode. In case of problems, you can try '-d decklink:no-low-latency'.
[Decklink display] Using device UltraStudio 4K Mini
[Decklink display] Setting output signal as progressive, see option "Use1080PsF" to use PsF or keep default.
[Decklink display] bmdDeckLinkConfigVideoOutputIdleOperation set to: 1818322529
Control socket listening on port 41511
[video dec.] New incoming video format detected: 3840x2160 @23.98p, codec H.265
[lavc hevc_qsv @ 0x7f2a14005340] Invalid pkt_timebase, passing timestamps as-is.
[lavd] Using decoder: hevc_qsv
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an internal MFX session: unsupported (-3)
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an MFX session
[lavc hevc_qsv @ 0x7f2a14005340] Error decoding header
[lavd]  Error while decoding frame (rc == -38): Function not implemented.
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an internal MFX session: unsupported (-3)
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an MFX session
[lavc hevc_qsv @ 0x7f2a14005340] Error decoding header
[lavd]  Error while decoding frame (rc == -38): Function not implemented.
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an internal MFX session: unsupported (-3)
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an MFX session
[lavc hevc_qsv @ 0x7f2a14005340] Error decoding header
[lavd]  Error while decoding frame (rc == -38): Function not implemented.
SSRC 0x728e7da0: 128/128 packets received (100.0000%), 0 lost, max loss 0
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an internal MFX session: unsupported (-3)
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an MFX session
[lavc hevc_qsv @ 0x7f2a14005340] Error decoding header
[lavd]  Error while decoding frame (rc == -38): Function not implemented.
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an internal MFX session: unsupported (-3)
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an MFX session
[lavc hevc_qsv @ 0x7f2a14005340] Error decoding header
[lavd]  Error while decoding frame (rc == -38): Function not implemented.
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an internal MFX session: unsupported (-3)
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an MFX session
[lavc hevc_qsv @ 0x7f2a14005340] Error decoding header
[lavd]  Error while decoding frame (rc == -38): Function not implemented.
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an internal MFX session: unsupported (-3)
[lavc hevc_qsv @ 0x7f2a14005340] Error initializing an MFX session
[lavc hevc_qsv @ 0x7f2a14005340] Error decoding header
MartinPulec commented 1 year ago

I think that we'd need more information:

  1. uv -t testcard -c libavcodec:encoder=libx265:subsampling=420 -d dummy --param force-lavd-decoder=hevc_qsv works? So, does it without subsampling=420 (== with subsampling 4:4:4)
  2. if not does the similar with H.264 work? (uv -t testcard -c libavcodec:encoder=libx264:subsampling=420 -d dummy --param force-lavd-decoder=h264_qsv)
  3. you can try also with (libavcodec) :disable_intra_refresh
  4. what is the GPU

I've tested with various encode combinations - something works, something doesn't, it really depends on device capabilities. The safest is to use YUV 4:2:0 without IntraRefresh first. But I did rather get "invalid (video) parameters" than "unsupported". Also you may try decode directly with FFmpeg:

ffmpeg -i lavfi -i smptebars -t 10 -c:v libx265 smpte.mp4      # prepare data
ffmpeg -c:v hevc_qsv -i smpte.mp4 out.mp4
alatteri commented 1 year ago

I'm going to close this as it is superseded by the recent work Martin has been doing for QSV on NUC12.