From 624b84b94a47e63d1697b6c71cffe6e62a7e2a68 Mon Sep 17 00:00:00 2001 From: Leo Ma Date: Sat, 23 Apr 2016 19:32:04 +0800 Subject: [PATCH] Adjust FPS and GOP parameters GOP indicates the interval frames of I-frames which have larger sizes than P-frames have. And therefore the larger GOP setting comes with less bandwidth overhead. For instance, GOP=60 and FPS=15 means every 4 seconds comes with an I-frame which is better for pictures with less movements. Signed-off-by: Leo Ma --- app/src/main/java/net/ossrs/sea/SrsEncoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/net/ossrs/sea/SrsEncoder.java b/app/src/main/java/net/ossrs/sea/SrsEncoder.java index 17426a4..86d097a 100644 --- a/app/src/main/java/net/ossrs/sea/SrsEncoder.java +++ b/app/src/main/java/net/ossrs/sea/SrsEncoder.java @@ -26,8 +26,8 @@ public class SrsEncoder { public static int vbitrate = 500 * 1000; // 500kbps public static final int VENC_WIDTH = 384; // Note: the stride of resolution must be set as 16x for hard encoding with some chip like MTK public static final int VENC_HEIGHT = 640; // Since Y component is quadruple size as U and V component, the stride must be set as 32x - public static final int VFPS = 25; - public static final int VGOP = 10; + public static final int VFPS = 15; + public static final int VGOP = 60; public static int VFORMAT = ImageFormat.YV12; public static final int ASAMPLERATE = 44100; public static final int ACHANNEL = AudioFormat.CHANNEL_IN_STEREO; @@ -523,4 +523,4 @@ public class SrsEncoder { Log.i(TAG, String.format("vencoder %s choose color format 0x%x(%d)", vmci.getName(), matchedColorFormat, matchedColorFormat)); return matchedColorFormat; } -} \ No newline at end of file +}