Skip to content
Discussion options

You must be logged in to vote

The TimeStamp mentioned here refers to something different from the CMSampleBuffer.presentationTimeStamp.
https://datatracker.ietf.org/doc/html/draft-sharabayko-srt-01#section-4.5

When using H.264 Main profile or higher, or when using H.265, B-frames become enabled.
In that case, the order of PTS (presentationTimeStamp) will match the result you observed.

Therefore, you will need to choose one of the two approaches:

  1. Buffer a certain number of frames and sort CMSampleBuffers by their PTS.
  2. Disable B-frames
    videoSettings.allowFrameReordering = false

Option 2 relies on the VideoToolbox feature.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@noho501
Comment options

Answer selected by noho501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
SRT Indicates that an issue, pull request, or discussion is concerns the SRT.
2 participants