CESNET / UltraGrid

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

NVENC: Single slice intra refresh needs SDK 11.1 at build time #289

Closed alatteri closed 1 year ago

alatteri commented 1 year ago

Looking at NVENC again, and I tested single-slice-intra-refresh=1 which reported this error: [lavc hevc_nvenc @ 0x7f44c850dc80] Single slice intra refresh needs SDK 11.1 at build time

I wonder 2 things:

  1. Would single-slice-intra-refresh minimize the GOP pulse issue?
  2. Would single-slice-intra-refresh help with the software based decode performance?

Thanks.

MartinPulec commented 1 year ago
  1. Would single-slice-intra-refresh minimize the GOP pulse issue?

I don't think so, see also here. Actually, I don't know what is the advantage of using just one slice for refresh when otherwise the stream uses more. Maybe to slightly reduce the bandwidth, because when intraframe data transmitted during intra refresh consume more space?

  1. Would single-slice-intra-refresh help with the software based decode performance?

Again I am now writing only with an a priori knowledge but I don't think that there is a potential. The other way round, if the decoder supports slice-based parallelism, this would perhaps hurt the performance, wouldn't it? Because during the refresh wave (which is UltraGrid set to produce continually), only one slice would be present.

Anyways, if you wish to test, I've enrolled a testing build with current NV SDK (here is AppImage backup link, not sure if GH allows you download the build artifacts)

alatteri commented 1 year ago

You are right, I saw no difference in behavior of either of the items.

--param lavc-rc-buffer-size-factor=0 does seem to eliminate the GOP pulse, but I think I remember there is a downside to using that too.

MartinPulec commented 1 year ago

but I think I remember there is a downside to using that too.

not sure if it is the one you have on your mind, but from UltraGrid perspective it is negative that this effectively disables an attempt to equalize frame sizes. So you don't have pulsation, but the particular IDR frames may be quite huge, meaning that you'll need multiple times the link width than nominal bitrate. Something in-between can be also chosen - if you choose "lavc-rc-buffer-size-factor=2", you'll need a link capacity approximately twice as much as nominal bitrate to accommodate the peaks (and it may still slightly pulsate, but less - default factor is 1).