[FFmpeg-trac] #10137(avcodec:open): hevc_nvenc [Clipping lookahead depth] and surfaces
FFmpeg
trac at avcodec.org
Tue Jan 10 06:32:36 EET 2023
#10137: hevc_nvenc [Clipping lookahead depth] and surfaces
-------------------------------------+-------------------------------------
Reporter: colemarc | Owner: (none)
Type: defect | Status: open
Priority: normal | Component: avcodec
Version: unspecified | Resolution:
Keywords: hevc_nvenc | Blocked By:
scenecut lookahead clipping |
surfaces |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by quinkblack):
From "NVIDIA VIDEO CODEC SDK - ENCODER Programming Guide",
```
The number of frames to be looked ahead should be set in
NV_ENC_INITIALIZE_PARAMS::encodeconfig->rcParams.lookaheadDepth which can
be up to 32.
```
From nvEncodeAPI.h:
```
uint16_t lookaheadDepth;
/**< [in]: Maximum depth of lookahead with range 0-(31 - number of B
frames).
lookaheadDepth is only used if enableLookahead=1.*/
```
You don't need a super large lookahead to enable scenecut. -rc-lookahead 1
works for scenecut. You can verify it by a super large gop size, for
example,
```
ffmpeg -hwaccel cuda -i ~/video/cctv.mp4 -an -c:v hevc_nvenc -rc-lookahead
1 -b:v 3M -t 60 -g 2500 /tmp/test.mp4
```
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10137#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list