CESNET / UltraGrid

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

[h264_cuvid @ 0x7f28600213c0] cuvid decode callback error #239

Closed alatteri closed 2 years ago

alatteri commented 2 years ago

Hello,

I am testing using h264_cuvid decoding.

Receiver: uv -d gl fs -r alsa:pulse --param alsa-playback-buffer=72000,audio-buffer-len=1000 --audio-scale none --param use-hw-accel,force-lavd-decoder=h264_cuvid

Encoder: uv -m 1316 -t decklink:codec=R10k -c libavcodec:encoder=libx264:bitrate=30M -s embedded --audio-capture-format channels=8 --audio-codec=AAC:bitrate=192K -P 5004

I'm getting these errors.

[2022-07-20 11:13:25] [h264_cuvid @ 0x7f28600213c0] cuvid decode callback error
[2022-07-20 11:13:25] [lavd]  Error while decoding frame (rc == -22): Invalid argument.
[2022-07-20 11:13:25] [h264_cuvid @ 0x7f28600213c0] cuvid decode callback error
[2022-07-20 11:13:25] [lavd]  Error while decoding frame (rc == -22): Invalid argument.
[2022-07-20 11:13:25] [h264_cuvid @ 0x7f28600213c0] cuvid decode callback error
[2022-07-20 11:13:25] [lavd]  Error while decoding frame (rc == -22): Invalid argument.
[2022-07-20 11:13:25] [h264_cuvid @ 0x7f28600213c0] cuvid decode callback error
[2022-07-20 11:13:25] [lavd]  Error while decoding frame (rc == -22): Invalid argument.
[2022-07-20 11:13:25] [h264_cuvid @ 0x7f28600213c0] cuvid decode callback error
[2022-07-20 11:13:25] [lavd]  Error while decoding frame (rc == -22): Invalid argument.
[2022-07-20 11:13:25] [h264_cuvid @ 0x7f28600213c0] cuvid decode callback error
[2022-07-20 11:13:25] [lavd]  Error while decoding frame (rc == -22): Invalid argument.
[2022-07-20 11:13:25] [h264_cuvid @ 0x7f28600213c0] cuvid decode callback error
[2022-07-20 11:13:25] [lavd]  Error while decoding frame (rc == -22): Invalid argument.
[2022-07-20 11:13:25] [h264_cuvid @ 0x7f28600213c0] cuvid decode callback error
MartinPulec commented 2 years ago

Which card it is? I've tried with Kepler-based Titan and the card didn't supported intra refresh, so encoder was needed to set -c libavcodec:encoder=libx264:disable_intra_refresh.

The Titan also doesn't support 4:4:4 subsampling so subsampling=420 was needed and it decoded to 8-bit only, but it worked at least. I am also trying with 2080 Ti but it seems there are some glitches so I cannot test now.

(Just FYI, use-hw-accel is pointless here -- it tries to use VAAPI, VDPAU or Videotoolbox, which is incompatible with cuvid decoder.)

MartinPulec commented 2 years ago

BTW, does it even make sense to capture R10k and not UYVY? I am not 100% sure but it seems to me that CUVID for H.264 doesn't support higher specs (subsampling/bitrate) so you'd perhaps get 8-bit 4:2:2 YCbCr from the decoder, anyways.

alatteri commented 2 years ago

Hi Martin,

Encoder card was Quadro P6000, receiver card was GTX 1650. I'll be getting access soon to T1000 for encoder. But in the end, your right, probably not even worth spending time on H.264 at this point. Will focus on H.265 which I started a Discussion on. Thanks.