obs-ffmpeg: Disable NVENC/AMF DTS adjustment for AV1 #10996
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Aligns AV1 DTS and PTS, since AV1 doesn't use b-frame delay (similar to VP9/VP8). AV1 instead handles reordering of frames transparently by outputting frames that aren't displayed in the same encode call; e.g. with b-frames enabled the first time data is returned by these encoders there will generally be a keyframe in the output that can be displayed immediately, and the next time data is returned (with the next dts) will contain various frames that aren't displayed and one frame that is displayed
in the image below, frames with green underline are output in the same encode call:
consider also the ertmp (v1 and later) spec https://github.com/veovera/enhanced-rtmp/blob/6445c80106c418ebe6bb18602e1c86645b2c1778/docs/enhanced/enhanced-rtmp-v1.md where
PacketTypeCodedFrames
for AV1 does not includeSI24 = [CompositionTime Offset]
Motivation and Context
AV1 timestamps are currently misaligned for NVENC/AMF in multi codec ladders for Enhanced Broadcasting/Multitrack Video on Twitch
How Has This Been Tested?
Twitch Enhanced Broadcasting Beta, inspected timestamps via broadcast performance metrics logs
Types of changes
Checklist: