What should I put into NV_ENC_PIC_PARAMS.inputDuration? According to the documentation inputTimeStamp can be any monotonically growing value, but I am struggling to find anything on inputDuration.
Should it just be frame.inputTimeStamp - prevFrame.inputTimeStamp?
You can use whatever unit you choose, it doesn't impact the encoding process at all.
NV_ENC_PIC_PARAMSinputTimeStampandinputDurationare copied toNV_ENC_LOCK_BITSTREAMoutputTimeStampandoutputDurationrespectively to keep track which picture produced which bitstream.The
inputTimeStampcan be additionally used to invalidate reference frames withNvEncInvalidateRefFrames.