Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert key frame interval to 10
  • Loading branch information
romtsn committed Oct 8, 2024
commit d6ee508133a5ae0a1cdcea18d305c1928c4fb6e8
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ internal class SimpleVideoEncoder(
)
format.setInteger(MediaFormat.KEY_BIT_RATE, bitRate)
format.setFloat(MediaFormat.KEY_FRAME_RATE, muxerConfig.frameRate.toFloat())
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, -1) // use -1 to force always non-key frames, meaning only partial updates to save the video size
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 10) // use 10 to force non-key frames, meaning only partial updates to save the video size. Every 10th second is a key frame, which is useful for buffer mode

format
}
Expand Down