Skip to content

Commit 8e2cd15

Browse files
committed
Force color range and color standard
1 parent 75bcb3f commit 8e2cd15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/src/main/java/com/dan/videostab/VideoEncoder.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class VideoEncoder(
4949
format.setInteger(MediaFormat.KEY_BIT_RATE, bitRate)
5050
format.setInteger(MediaFormat.KEY_FRAME_RATE, fps)
5151
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 5)
52+
format.setInteger(MediaFormat.KEY_COLOR_RANGE, MediaFormat.COLOR_RANGE_FULL)
53+
format.setInteger(MediaFormat.KEY_COLOR_STANDARD, MediaFormat.COLOR_STANDARD_BT709)
5254

5355
val encoder = MediaCodec.createEncoderByType(mimeType)
5456
encoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE)

0 commit comments

Comments
 (0)